W3C home > Mailing lists > Public > public-html@w3.org > April 2014

RE: HTML5 CR "at risk" features

From: Jay Munro <jaymunro@microsoft.com>
Date: Mon, 14 Apr 2014 18:28:53 +0000
To: Silvia Pfeiffer <silviapfeiffer1@gmail.com>, Sam Ruby <rubys@intertwingly.net>
CC: public-html <public-html@w3.org>
Message-ID: <7d3bc9482bef402e8ee94f49654e0914@BY2PR03MB521.namprd03.prod.outlook.com>
I brought this up with Robin, and we tried it in a couple of browsers using the debugger. It appears to be supported by at least two. 

I wrote a demo that I use in my documentation, and I've posted it on the sample server. It appears to work fine in IE11 and Chrome. Firefox seems not to like the TextTrack info, but I didn't debug it. 

Here's the url: http://samples.msdn.microsoft.com/Workshop/samples/media/addtexttracktest.html

Sample's pretty simple: 

<!DOCTYPE html >

<html >
  <head>
    <title>Add Text Tracks example</title>
</head>
<body>

<video id="video1" controls="controls" muted="muted">
     <!-- change to your own mp4 video file -->
  <source src="http://ie.microsoft.com/testdrive/Videos/BehindIE9ModernWebStandards/Video.mp4" />    
HTML5 Video not supported 
</video>

 <script>
    var video = document.getElementById("video1");
    var startTime, endTime, message; 
    var newTextTrack = video.addTextTrack("captions", "sample");
    newTextTrack.mode = newTextTrack.SHOWING; // set track to display
    // create some cues and add them to the new track 
    for(var i=0;i<30;i++){
        startTime =  i * 5 ;
        endTime = ( (i * 5) +  5);
        message =  "This is number " + i; 
        newTextTrack.addCue(new TextTrackCue(startTime, endTime, message));
    }
    video.play();
  </script>
</body>
</html>


-----Original Message-----
From: Silvia Pfeiffer [mailto:silviapfeiffer1@gmail.com] 
Sent: Saturday, April 12, 2014 9:37 PM
To: Sam Ruby
Cc: public-html
Subject: Re: HTML5 CR "at risk" features

On Sat, Apr 12, 2014 at 8:31 PM, Sam Ruby <rubys@intertwingly.net> wrote:
> On 04/11/2014 09:41 PM, Silvia Pfeiffer wrote:
>>
>>> HTMLMediaElement.addTextTrack - Discussed at F2F meeting
>>
>>
>> I tried to find out from the minutes why addTextTrack is at risk, but 
>> it was only mentioned without reasons.
>
>
> From http://www.w3.org/2014/04/09-html-wg-minutes.html :
>
> ... lots of failures on HTMLMediaElement.addTextTrack ... mostly 
> failing at the moment

That's what I saw. I dug around a bit and assume it's based on this test:
http://w3c.github.io/html/test-results/less-than-2.html#test-file-62

At first sight, I think the test might expect the wrong kinds of errors.
Will investigate.

Cheers,
Silvia.
Received on Monday, 14 April 2014 18:29:34 UTC

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