Re: HTML5 CR "at risk" features

On Tue, Apr 15, 2014 at 4:28 AM, Jay Munro <jaymunro@microsoft.com> wrote:
> 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" />

You need to add an alternative source file in WebM or Ogg format for
Firefox and other browsers to work.

> 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));


TextTrackCue has no constructor any more, so this is not spec
conformant. You have to create a VTTCue or a DataCue.

Chrome and IE's support of the constructor need to be deprecated.
(This is the case for the WHATWG and the W3C specs).


HTH.

Cheers,
Silvia.

>     }
>     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 21:43:58 UTC