onTextTrackAddCue method
void
onTextTrackAddCue()
override
Implementation
@override
void onTextTrackAddCue(int textTrackUid, String id, int uid, double startTime, double endTime, String content) {
TextTrack? textTrack = _textTracks.firstWhereOrNull((item) => item.uid == textTrackUid);
if (textTrack == null) {
return;
}
Cue cue = CueImpl(id, uid, startTime, endTime, content);
textTrack.cues.add(cue);
(textTrack as TextTrackImpl).dispatchEvent(TextTrackAddCueEvent(track: textTrack, cue: cue));
}