Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

How to add Caption Plugin?

15 replies [Last post]

so i have been trying to add the Caption plugin for 2 days straigh now .

this is the code im using right now for the caption code.

<script type='text/javascript' src='http://funnystation.net/filmes/player/swfobject.js'></script>

<div id='mediaspace'>This text will be replaced</div>

<script type='text/javascript'>
var so = new SWFObject('http://funnystation.net/filmes/player/player-viral.swf','mpl','900','370','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('file','http://85.17.72.197/1final/The Spy Next Door.mp4');
so.addVariable('captions.file','http://www.funnystation.net/filmes/temp/The.Spy.Next.Door.2010.R6.DVDRip.LiNE.XviD-iMAGiNE1.xml');
so.addVariable('plugins','captions-1');
so.write('mediaspace');
</script>

The video works fine but the XML file dosnt and i also think thre is a problem with it . i also want to know exaclty how to convert SRT to XML bc i have also tryed to link the SRT file but it wont work so can you please help me.

 
404 File not found

http://www.funnystation.net/filmes/temp/The.Spy.Next.Door.2010.R6.DVDRip.LiNE.XviD-iMAGiNE1.xml

http://www.funnystation.net/filmes/player/swfobject.js

Also, you need to use MP4Box to interleave the boxes.
MP4Box -inter 0.5 "The Spy Next Door.mp4"

Thanks Alf for responding but here is the new code that i have..

here is where the video is

http://funnystation.net/filmes/test.html

<script type='text/javascript' src='http://funnystation.net/filmes/jwplayer/swfobject.js'></script>

<div id='mediaspace'>This text will be replaced</div>

<script type='text/javascript'>
var so = new SWFObject('http://www.funnystation.net/filmes/jwplayer/player-viral.swf','mpl','965','370','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('file','http://85.17.72.197/1final/The Spy Next Door.mp4');
so.addVariable('backcolor','000000');
so.addVariable('frontcolor','FFFFFF');
so.addVariable('captions.file','http://www.funnystation.net/filmes/temp/The.Spy.Next.Door.2010.R6.DVDRip.LiNE.XviD-iMAGiNE1.xml');
so.addVariable('plugins','captions-1');
so.addVariable('controlbar','over');
so.write('mediaspace');
</script>

also i was wondering if its posible to use the SRT file instead of xml.

Yes you can use SRT files.

Your captions file is being loaded from here - http://www.funnystation.net/filmes/temp/The.Spy.Next.Door.2010.R6.DVDRip.LiNE.XviD-iMAGiNE1.xml, but it cannot be found - that is the issue!

so i can use it like this instead?

<script type='text/javascript' src='http://funnystation.net/filmes/jwplayer/swfobject.js'></script>

<div id='mediaspace'>This text will be replaced</div>

<script type='text/javascript'>
var so = new SWFObject('http://www.funnystation.net/filmes/jwplayer/player-viral.swf','mpl','965','370','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('file','http://85.17.72.197/1final/The Spy Next Door.mp4');
so.addVariable('backcolor','000000');
so.addVariable('frontcolor','FFFFFF');
so.addVariable('captions.file','http://www.funnystation.net/filmes/pages/comedia/The Spy Next Door/The spy next door.srt');
so.addVariable('plugins','captions-1');
so.addVariable('controlbar','over');
so.write('mediaspace');
</script>

because with that code the SRT file is linked

Should work fine.

the videot akes too long to load in the begginning so what is this

MP4Box -inter 0.5

about?

also i just tired the code with that video linked to to the SRT file and it does not work

http://www.funnystation.net/filmes/test.html

also i was wondering if this has anything to do with me not hostigng the video since it would take hours for me to upload the video to my server.

Well, on that link you are still pointing to a non-existent XML file and your MP4 never loads for me...

but the link is not a XML but a SRT file. and the video works fine for me in IE but it takes a long time.

This is the code with the video and the SRT file linked to it but the Captions still wont work at all.

LINk : http://www.funnystation.net/filmes/test.html

<script type='text/javascript' src='http://funnystation.net/filmes/jwplayer/swfobject.js'></script>

<div id='mediaspace'>This text will be replaced</div>

<script type='text/javascript'>
var so = new SWFObject('http://www.funnystation.net/filmes/jwplayer/player-viral.swf','mpl','965','370','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('file','http://85.17.72.197/1final/The Spy Next Door.mp4');
so.addVariable('backcolor','000000');
so.addVariable('frontcolor','FFFFFF');
so.addVariable('captions.file','http://www.funnystation.net/filmes/pages/comedia/The Spy Next Door/The spy next door.srt');
so.addVariable('plugins','captions-1');
so.addVariable('controlbar','over');
so.write('mediaspace');
</script>

The video is not hosted on my server though Ethan said it shiould still work and the SRT file is good.

i have also converted the SRT t XML but it still wont work.

is tehre anything wrong with that ?

also the JW player and the video does not load on Firefox for some reason and the mp4 takes too long to load on IE , can someone also copy the code above and add the MP4Box -inter 0.5 bc i dont quite understand that at all.

Sorry Ethan i copied the wrong link.

http://developer.longtailvideo.com/trac/testing/?player=v5&plugins=captions&file=http%3A%2F%2F85.17....

i stried that with my own files and it dosnt work,.

This is the SRT File Location

http://funnystation.net/filmes/spy.srt

This is the VIDEO FILE Location

http://85.17.72.197/1final/The Spy Next Door.mp4

i dont know why the video dosnt load for you at all but in IE it works but it takes a minute for it to load also how do i add that MP4Box -inter 0.5 code to make the file player when the page loads.?

Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: http://developer.longtailvideo.com/player/plugins/captions/v4/captions.swf cannot load data from http://funnystation.net/filmes/spy.srt.
at com.jeroenwijering.plugins::Captions()

You need to make sure you have a crossdomain.xml file set up no your site to use the plugin across domains - http://wiki.longtailvideo.com/wiki/index.php/Crossdomain.xml