style: auto-fix linting issues
This commit is contained in:
parent
c4af3ea204
commit
3c51d45d74
1 changed files with 20 additions and 13 deletions
33
js/player.js
33
js/player.js
|
|
@ -109,19 +109,23 @@ export class Player {
|
|||
this._setupVideoSync();
|
||||
}
|
||||
|
||||
_resetDashPlayer() {
|
||||
if (this.dashInitialized && this.dashPlayer) {
|
||||
try { this.dashPlayer.attachView(null); } catch (e) {}
|
||||
try { this.dashPlayer.destroy(); } catch (e) {}
|
||||
this.dashPlayer = MediaPlayer().create();
|
||||
this.dashPlayer.updateSettings({
|
||||
streaming: {
|
||||
buffer: { fastSwitchEnabled: true },
|
||||
},
|
||||
});
|
||||
this.dashInitialized = false;
|
||||
_resetDashPlayer() {
|
||||
if (this.dashInitialized && this.dashPlayer) {
|
||||
try {
|
||||
this.dashPlayer.attachView(null);
|
||||
} catch (e) {}
|
||||
try {
|
||||
this.dashPlayer.destroy();
|
||||
} catch (e) {}
|
||||
this.dashPlayer = MediaPlayer().create();
|
||||
this.dashPlayer.updateSettings({
|
||||
streaming: {
|
||||
buffer: { fastSwitchEnabled: true },
|
||||
},
|
||||
});
|
||||
this.dashInitialized = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
_setupVideoSync() {
|
||||
if (!this.video || !this.audio) return;
|
||||
|
||||
|
|
@ -898,7 +902,10 @@ _resetDashPlayer() {
|
|||
console.error('DashPlayer initialize failed for audio:', e);
|
||||
throw new Error('DASH initialization failed');
|
||||
}
|
||||
} else if (streamUrl && (streamUrl.includes('.m3u8') || streamUrl.includes('application/vnd.apple.mpegurl'))) {
|
||||
} else if (
|
||||
streamUrl &&
|
||||
(streamUrl.includes('.m3u8') || streamUrl.includes('application/vnd.apple.mpegurl'))
|
||||
) {
|
||||
this.setupHlsVideo(activeElement, streamUrl, null);
|
||||
this.applyAudioEffects();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue