javascript - Adding a video element with Popcorn TTML subtitles -


i have page want insert video element ttml subtitle using popcornjs can see in this fiddle. working fine except subtitles. don't show. when <video src="myvideo.mp4" data-timeline-sources="data.ttml" /> subtitles work correctly.

so doing wrong here or not possible popcornjs insert video element, set data-timeline-sources attribute , play video subtitle file?

my data.ttml subtitle file looks this:

<tt xmlns:tts="http://www.w3.org/2006/04/ttaf1#styling" xmlns="http://www.w3.org/2006/04/ttaf1"> <body region="subtitlearea">   <div>     <p xml:id="subtitle1" begin="0.50s" end="2.5s">       test subtitle 1     </p>     <p xml:id="subtitle2" begin="3.0s" end="5.0s">       test subtitle 2     </p>     <p xml:id="subtitle3" begin="5.5s" end="8.5s" >       test subtitle 3a<br/>       test subtitle 3b     </p>     <p xml:id="subtitle4" begin="9.5s" end="12.0s">       test subtitle 4     </p>     <p xml:id="subtitle5" begin="13.0s" end="15.0s">       test subtitle 5     </p>   </div>     </body> </tt> 

the popcorn ttml parser script, put in script tag in following demos:

ie10 browser supports ttml natively. chrome supports webvtt. firefox supports neither. here tutorials each:


Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -