MCPcopy Create free account
hub / github.com/SpringRoll/SpringRoll / start

Method start

src/localization/captions/Caption.js:107–112  ·  view source on GitHub ↗

* Sets time and line index of caption. * * @param {Number} [time=0] - Time in milliseconds. * @memberof Caption

(time = 0, renderer = { lineBegin: () => { }, lineEnd: () => { } })

Source from the content-addressed store, hash-verified

105 * @memberof Caption
106 */
107 start(time = 0, renderer = { lineBegin: () => { }, lineEnd: () => { } }) {
108 this.reset();
109 this.renderer = renderer;
110 this.updateTimeIndex(time);
111 this.updateState(this.time, this.lines[this.lineIndex].startTime - 1);
112 }
113
114 /**
115 * Updates the current time and index of the caption instance

Callers

nothing calls this directly

Calls 3

resetMethod · 0.95
updateTimeIndexMethod · 0.95
updateStateMethod · 0.95

Tested by

no test coverage detected