diff --git a/index.html b/index.html
index 5a253c3..2b72aec 100644
--- a/index.html
+++ b/index.html
@@ -2222,7 +2222,7 @@
0) {
- this.dashPlayer.seek(startTime);
+ if (startTime > 0) {
+ this.dashPlayer.seek(startTime);
+ }
+
+ const canPlay = await this.waitForCanPlayOrTimeout(activeElement);
+ if (!canPlay || this.playbackSequence !== currentSequence) return;
+ await this.safePlay(activeElement);
+ } catch (e) {
+ 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'))) {
+ this.setupHlsVideo(activeElement, streamUrl, null);
+ this.applyAudioEffects();
const canPlay = await this.waitForCanPlayOrTimeout(activeElement);
if (!canPlay || this.playbackSequence !== currentSequence) return;
+
+ if (startTime > 0) {
+ activeElement.currentTime = startTime;
+ }
await this.safePlay(activeElement);
- } else {
+ } else if (streamUrl) {
activeElement.src = streamUrl;
this.applyAudioEffects();
@@ -885,6 +922,8 @@ export class Player {
}
const played = await this.safePlay(activeElement);
if (!played) return;
+ } else {
+ throw new Error('Could not resolve stream URL');
}
}