webvtt.idl (1443B)
1 // GENERATED CONTENT - DO NOT EDIT 2 // Content was automatically extracted by Reffy into webref 3 // (https://github.com/w3c/webref) 4 // Source: WebVTT: The Web Video Text Tracks Format (https://w3c.github.io/webvtt/) 5 6 enum AutoKeyword { "auto" }; 7 typedef (double or AutoKeyword) LineAndPositionSetting; 8 enum DirectionSetting { "" /* horizontal */, "rl", "lr" }; 9 enum LineAlignSetting { "start", "center", "end" }; 10 enum PositionAlignSetting { "line-left", "center", "line-right", "auto" }; 11 enum AlignSetting { "start", "center", "end", "left", "right" }; 12 [Exposed=Window] 13 interface VTTCue : TextTrackCue { 14 constructor(double startTime, unrestricted double endTime, DOMString text); 15 attribute VTTRegion? region; 16 attribute DirectionSetting vertical; 17 attribute boolean snapToLines; 18 attribute LineAndPositionSetting line; 19 attribute LineAlignSetting lineAlign; 20 attribute LineAndPositionSetting position; 21 attribute PositionAlignSetting positionAlign; 22 attribute double size; 23 attribute AlignSetting align; 24 attribute DOMString text; 25 DocumentFragment getCueAsHTML(); 26 }; 27 28 enum ScrollSetting { "" /* none */, "up" }; 29 [Exposed=Window] 30 interface VTTRegion { 31 constructor(); 32 attribute DOMString id; 33 attribute double width; 34 attribute unsigned long lines; 35 attribute double regionAnchorX; 36 attribute double regionAnchorY; 37 attribute double viewportAnchorX; 38 attribute double viewportAnchorY; 39 attribute ScrollSetting scroll; 40 };