[Bug 14309] New: Constructor for 'TextTrackCue' is not defined

http://www.w3.org/Bugs/Public/show_bug.cgi?id=14309

           Summary: Constructor for 'TextTrackCue' is not defined
           Product: HTML WG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: franko@microsoft.com
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


Spec text:

In this example, an audio element is used to play a specific sound-effect from
a sound file containing many sound effects. A cue is used to pause the audio,
so that it ends exactly at the end of the clip, even if the browser is busy
running some script. If the page had relied on script to pause the audio, then
the start of the next clip might be heard if the browser was not able to run
the script at the exact time specified.
var sfx = new Audio('sfx.wav');
var sounds = a.addTextTrack('metadata');

// add sounds we care about
sounds.addCue(new TextTrackCue('dog bark', 12.783, 13.612, '', '', '', true));
sounds.addCue(new TextTrackCue('kitten mew', 13.612, 15.091, '', '', '',
true));

function playSound(id) {
  sfx.currentTime = sounds.getCueById(id).startTime;
  sfx.play();
}

sfx.oncanplaythrough = function () {
  playSound('dog bark');
}
window.onbeforeunload = function () {
  playSound('kitten mew');
  return 'Are you sure you want to leave this awesome page?';
}

------------------------------------------------------------------------------
Issue description:

This example refers to a constructor, "new TextTrackCue" that is not defined
anywhere in the spec.  In fact, the spec does not provide any way to create an
instance of TextTrackCue without using a track element.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 27 September 2011 17:09:33 UTC