src/nodejs/jswebvtt

Types

VTTCue = ref object of JsRoot
  vertical*: cstring         ## https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/vertical
  align*: cstring            ## https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/align
  lineAlign*: cstring        ## https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/lineAlign
  positionAlign*: cstring    ## https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/positionAlign
  size*: SomeNumber          ## https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/size
  snapToLines*: bool         ## https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/snapToLines
  text*: cstring             ## https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/text
  line*: cstring or SomeNumber ## https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/line
  position*: cstring or SomeNumber ## https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/position
  region*: VTTRegion         ## https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/region
  
https://developer.mozilla.org/en-US/docs/Web/API/VTTCue
VTTRegion = ref object of JsRoot
  width*, lines*, regionAnchorX*, regionAnchorY*, viewportAnchorX*,
  viewportAnchorY*: SomeNumber
  id*: cstring
https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion

Procs

func getCueAsHTML(self: VTTCue): Node {.importjs: "#.$1()", ...raises: [], tags: [].}
func newVTTCue(startTime, endTime: float; text: cstring): VTTCue {.
    importjs: "(new VTTCue(#, #, #))", ...raises: [], tags: [].}
func newVTTCue(startTime, endTime: Natural; text: cstring): VTTCue {.
    importjs: "(new VTTCue(#, #, #))", ...raises: [], tags: [].}
func newVTTRegion(): VTTRegion {.importjs: "(new VTTRegion(@))", ...raises: [],
                                 tags: [].}