W3C home > Mailing lists > Public > public-html@w3.org > February 2013

programming difficulties with addcue

From: GIDEON ISAAC <mad.gideon.isaac@hotmail.com>
Date: Sat, 9 Feb 2013 16:37:23 -0500
Message-ID: <SNT135-W5541A1A53225E2D4FA7E0DD0040@phx.gbl>
To: <public-html@w3.org>

I don't know if this forum is appropriate for programming mistakes, but here is a problem I'm running into.  I have the following code:
    $(document).ready(function () {
                 myPlayer = document.getElementById("player");
            var myTextTrack;
         myTextTrack = myPlayer.addTextTrack( 'subtitles','myLabel','en' );
var cue0 = new TextTrackCue(3.400,18.190, ' One giant payback');
cue0.id = 'cue0';
var cue1 = new TextTrackCue(18.190,25.260, ' How can you catch a pink butterfly.!');
cue1.id = 'cue1';
var cue2 = new TextTrackCue(25.260,32.320, ' one last comment.');
cue2.id = 'cue2';
     });The actual video html is:
 <div id="HoldPlayer" style="position:relative">
 <video id='player'  controls autoplay width='783' height='587' preload onerror='failed(event)'>
<source src='http://www.rateforsuccess.com/mp4s/big-buck-bunny.webm' type='video/webm' />
This browser does not support this type of video
 </center>I think this should work, but in Internet Explorer I get a message that 'addTextTrack' is an unknown method, and in Chrome, the video plays, but I don't get any subtitles.
Just scanning this - is there something I'm missing?
Received on Saturday, 9 February 2013 21:37:52 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:16:31 UTC