Merge branch 'main' of github.com:monochrome-music/monochrome

This commit is contained in:
Samidy 2026-03-11 09:14:41 +03:00
commit 94d952da79

View file

@ -111,8 +111,12 @@ export class Player {
_resetDashPlayer() { _resetDashPlayer() {
if (this.dashInitialized && this.dashPlayer) { if (this.dashInitialized && this.dashPlayer) {
try { this.dashPlayer.attachView(null); } catch (e) {} try {
try { this.dashPlayer.destroy(); } catch (e) {} this.dashPlayer.attachView(null);
} catch (e) {}
try {
this.dashPlayer.destroy();
} catch (e) {}
this.dashPlayer = MediaPlayer().create(); this.dashPlayer = MediaPlayer().create();
this.dashPlayer.updateSettings({ this.dashPlayer.updateSettings({
streaming: { streaming: {
@ -898,7 +902,10 @@ _resetDashPlayer() {
console.error('DashPlayer initialize failed for audio:', e); console.error('DashPlayer initialize failed for audio:', e);
throw new Error('DASH initialization failed'); 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.setupHlsVideo(activeElement, streamUrl, null);
this.applyAudioEffects(); this.applyAudioEffects();