From b9213b48688a84344cacab88866aba4ffda87274 Mon Sep 17 00:00:00 2001 From: timaramazanov Date: Mon, 3 Jun 2024 19:01:45 +0100 Subject: [PATCH 1/5] fix(): added debug logs --- src/components/video-container/Video-container.component.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/video-container/Video-container.component.ts b/src/components/video-container/Video-container.component.ts index 2e95841..d063786 100644 --- a/src/components/video-container/Video-container.component.ts +++ b/src/components/video-container/Video-container.component.ts @@ -342,6 +342,7 @@ export class VideoContainer extends LitElement { }); break; case "loadeddata": + console.log('LOADED DATA!') dispatch(this, Types.Action.updateDuration, { initialized: true, duration: getVideoDuration(video), @@ -372,6 +373,7 @@ export class VideoContainer extends LitElement { dispatch(this, Types.Action.togglePip, { pipActivated: false }); break; case "loadedmetadata": + console.log('LOADED META DATA!') dispatch(this, Types.Action.canPlay); break; case "error": From 14c6da5980329002341b6f0a32e2b5d15f05af3a Mon Sep 17 00:00:00 2001 From: timaramazanov Date: Mon, 3 Jun 2024 19:16:50 +0100 Subject: [PATCH 2/5] fix(): added more logs --- src/components/video-container/Video-container.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/video-container/Video-container.component.ts b/src/components/video-container/Video-container.component.ts index d063786..3d9b015 100644 --- a/src/components/video-container/Video-container.component.ts +++ b/src/components/video-container/Video-container.component.ts @@ -104,6 +104,7 @@ export class VideoContainer extends LitElement { @listen(Types.Command.seek, { canPlay: true }) seek({ time }: { time: number }) { + console.log('GOING TO SEEK!!!') const [video] = this.videos; video.currentTime = time; if (video.paused && !this.castActivated) this.play(); From bf0803576fca9948b7d44f3abe381303db619d5c Mon Sep 17 00:00:00 2001 From: timaramazanov Date: Mon, 3 Jun 2024 19:19:55 +0100 Subject: [PATCH 3/5] fix(): set canplay to false --- src/state/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/state/index.ts b/src/state/index.ts index e6f11b8..b094174 100644 --- a/src/state/index.ts +++ b/src/state/index.ts @@ -13,7 +13,7 @@ export const initialState: State = { isPlaying: false, isInteracted: false, idle: false, - canPlay: true, + canPlay: false, cues: [], castActivated: false, played: false, From 79d134960b6ae33c5ef767ea41de2e0cd9241179 Mon Sep 17 00:00:00 2001 From: timaramazanov Date: Tue, 4 Jun 2024 15:05:19 +0100 Subject: [PATCH 4/5] fix(): remove debug logs --- src/components/video-container/Video-container.component.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/components/video-container/Video-container.component.ts b/src/components/video-container/Video-container.component.ts index 3d9b015..2e95841 100644 --- a/src/components/video-container/Video-container.component.ts +++ b/src/components/video-container/Video-container.component.ts @@ -104,7 +104,6 @@ export class VideoContainer extends LitElement { @listen(Types.Command.seek, { canPlay: true }) seek({ time }: { time: number }) { - console.log('GOING TO SEEK!!!') const [video] = this.videos; video.currentTime = time; if (video.paused && !this.castActivated) this.play(); @@ -343,7 +342,6 @@ export class VideoContainer extends LitElement { }); break; case "loadeddata": - console.log('LOADED DATA!') dispatch(this, Types.Action.updateDuration, { initialized: true, duration: getVideoDuration(video), @@ -374,7 +372,6 @@ export class VideoContainer extends LitElement { dispatch(this, Types.Action.togglePip, { pipActivated: false }); break; case "loadedmetadata": - console.log('LOADED META DATA!') dispatch(this, Types.Action.canPlay); break; case "error": From 43632765ebf1a9902d69f94936a4f0a2626afd86 Mon Sep 17 00:00:00 2001 From: timaramazanov Date: Tue, 4 Jun 2024 16:17:13 +0100 Subject: [PATCH 5/5] fix(state): disable canply by default only on iOS --- src/state/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/state/index.ts b/src/state/index.ts index b094174..ba8ad45 100644 --- a/src/state/index.ts +++ b/src/state/index.ts @@ -13,7 +13,7 @@ export const initialState: State = { isPlaying: false, isInteracted: false, idle: false, - canPlay: false, + canPlay: !device.isIos, cues: [], castActivated: false, played: false,