Skip to content

Commit

Permalink
fix eslint error
Browse files Browse the repository at this point in the history
  • Loading branch information
Florent-Bouisset committed Jan 9, 2025
1 parent 25cf4c5 commit 4b6acd7
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/main_thread/tracks_store/tracks_store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,15 +405,15 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
nextAdaptation === undefined &&
bufferType === "audio" &&
this.onAudioTracksNotPlayable === "continue" &&
findNextPlayableAdaptation(period, "video")
findNextPlayableAdaptation(period, "video") !== undefined
) {
// Audio is not playable but video is playable, let's continue the playback.
log.warn(`TS: No playable audio, continuing with video only`);
} else if (
nextAdaptation === undefined &&
bufferType === "video" &&
this.onVideoTracksNotPlayable === "continue" &&
findNextPlayableAdaptation(period, "audio")
findNextPlayableAdaptation(period, "audio") !== undefined
) {
// Video is not playable but audio is playable, let's continue the playback.
log.warn(`TS: No playable video, continuing with audio only`);
Expand All @@ -433,15 +433,16 @@ export default class TracksStore extends EventEmitter<ITracksStoreEvents> {
}
const switchingMode =
bufferType === "audio" ? this._defaultAudioTrackSwitchingMode : "reload";
const storedSettings = nextAdaptation
? {
adaptation: nextAdaptation,
switchingMode,
lockedRepresentations: new SharedReference<IRepresentationsChoice | null>(
null,
),
}
: null;
const storedSettings =
nextAdaptation !== undefined
? {
adaptation: nextAdaptation,
switchingMode,
lockedRepresentations: new SharedReference<IRepresentationsChoice | null>(
null,
),
}
: null;
typeInfo.storedSettings = storedSettings;
this.trigger("trackUpdate", {
period: toExposedPeriod(period),
Expand Down

0 comments on commit 4b6acd7

Please sign in to comment.