CueImplWeb constructor
CueImplWeb()
Implementation
CueImplWeb(super.id, super.uid, super.startTime, super.endTime, super.content, this._nativeTextTrackCue) {
enterEventListener = allowInterop((CueEnterEventJS event) {
dispatchEvent(CueEnterEvent(cue: this));
});
exitEventListener = allowInterop((CueExitEventJS event) {
dispatchEvent(CueExitEvent(cue: this));
});
updateEventlistener = allowInterop((CueUpdateEventJS event) {
var cue = event.cue;
update(cue.endTime, jsObjectToJsonString(cue.content) ?? "");
dispatchEvent(CueUpdateEvent(cue: this));
});
this._nativeTextTrackCue.addEventListener(TextTrackCueEventTypes.ENTER.toLowerCase(), enterEventListener);
this._nativeTextTrackCue.addEventListener(TextTrackCueEventTypes.ENTER.toLowerCase(), exitEventListener);
this._nativeTextTrackCue.addEventListener(TextTrackCueEventTypes.ENTER.toLowerCase(), updateEventlistener);
}