Skip to content

Commit

Permalink
fix(player): relax no text track label to warning from error
Browse files Browse the repository at this point in the history
closes #1216
  • Loading branch information
mihar-22 committed Apr 3, 2024
1 parent 18be0a5 commit e66a8bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/vidstack/src/core/tracks/text/text-track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class TextTrack extends EventsTarget<TextTrackEvents> {
}

if (__DEV__ && isTrackCaptionKind(this) && !this.label) {
throw Error(`[vidstack] captions text track created without label: \`${this.src}\``);
console.warn(`[vidstack] captions text track created without label: \`${this.src}\``);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class NativeHLSTextTracks {
const track = new VdsTextTrack({
id: nativeTrack.id,
kind: nativeTrack.kind,
label: nativeTrack.label,
label: nativeTrack.label ?? '',
language: nativeTrack.language,
type: 'vtt',
});
Expand Down

0 comments on commit e66a8bd

Please sign in to comment.