Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/mux-video/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,12 @@ export class MuxVideoBaseElement extends CustomVideoElement implements IMuxVideo
}

async addCuePoints<T = any>(cuePoints: CuePoint<T>[]) {
if (!this.nativeEl.currentSrc) {
console.warn(
'addCuePoints() was called before the media element has loaded. ' +
'Wait for the loadstart event before calling addCuePoints().'
);
}
return addCuePoints(this.nativeEl, cuePoints);
}

Expand All @@ -708,6 +714,12 @@ export class MuxVideoBaseElement extends CustomVideoElement implements IMuxVideo
}

async addChapters(chapters: Chapter[]) {
if (!this.nativeEl.currentSrc) {
console.warn(
'addChapters() was called before the media element has loaded. ' +
'Wait for the loadstart event before calling addChapters().'
);
}
return addChapters(this.nativeEl, chapters);
}

Expand Down
Loading