Search completed in 1.21 seconds.
2 results for "getcueashtml":
Web Video Text Tracks Format (WebVTT) - Web APIs
Web › API › WebVTT API
The new keyword can be used for defining a new VTTRegion object which can then be used for containing the multiple cues. There are several properties of VTTRegion which are width, lines, regionAnchorX, RegionAnchorY, viewportAnchorX, viewportAnchorY and scroll that can be used to specify the look and feel of this VTT region...
... attribute double viewportAnchorY; attribute ScrollSetting scroll; }; Methods and properties The methods used in WebVTT are those which are used to alter the cue or region as the attributes for both interfaces are different. We can categorize them for better understanding relating to each interface in WebVTT: VTTCue The methods which are available in this interface are: GetCueAsHTML to get the HTML of that Cue. VTT Constructor for creating new objects of Cues. Autokeyword. DirectionSetting: to set the direction of caption or text in a file. LineAlignment: to adjust the line alignment. PositionAlignSetting: to adjust the position of text. VTTRegion The methods used for region are listed below along with description of their fu...
VTTCue - Web APIs
Web › API › VTTCue
g the alignment of the cue. This is used to determine what the VTTCue.position is anchored to. The default is auto. VTTCue.size Returns a double representing the size of the cue, as a percentage of the video size. VTTCue.textAlign Returns an enum representing the alignment of all the lines of text within the cue box. VTTCue.text Returns a DOMString with the contents of the cue. Methods getCueAsHTML() Returns the cue text as a DocumentFragment. Example HTML <video controls src="https://udn.realityripple.com/samples/c6/f8a3489533.webm"></video> CSS video { width: 320px; height: 180px; } JavaScript let video = document.querySelector('video'); video.addEventListener('loadedmetadata', () => { const track = video.addTextTrack("captions", "????Subtitles", "zh_CN"); track.mode = "s...