| ... | @@ -136,7 +136,7 @@ function hydrateVideoInner( | ... | @@ -136,7 +136,7 @@ function hydrateVideoInner( |
| 136 | } | 136 | } |
| 137 | video.src = src; | 137 | video.src = src; |
| 138 | video.controls = true; | 138 | video.controls = true; |
| 139 | onCloverVideoInit?.(id, video); | 139 | window.onCloverVideoInit?.(id, video); |
| 140 | return; | 140 | return; |
| 141 | } | 141 | } |
| 142 | if (mode === "av1" && !hasDash) { | 142 | if (mode === "av1" && !hasDash) { |
| ... | @@ -239,10 +239,10 @@ function hydrateVideoInner( | ... | @@ -239,10 +239,10 @@ function hydrateVideoInner( |
| 239 | enableSafariAirplay(); | 239 | enableSafariAirplay(); |
| 240 | player.attachView(video); | 240 | player.attachView(video); |
| 241 | if (objectUrl) video.play(); | 241 | if (objectUrl) video.play(); |
| 242 | onCloverVideoInit?.(id, video); | 242 | window.onCloverVideoInit?.(id, video); |
| 243 | }); | 243 | }); |
| 244 | video.controls = true; | 244 | video.controls = true; |
| 245 | onCloverVideoInit?.(id, video); | 245 | window.onCloverVideoInit?.(id, video); |
| 246 | | 246 | |
| 247 | // This proxying is for ManagedMediaSource, exposing the HLS stream for AirPlay | 247 | // This proxying is for ManagedMediaSource, exposing the HLS stream for AirPlay |
| 248 | function enableSafariAirplay() { | 248 | function enableSafariAirplay() { |
| ... | @@ -273,7 +273,7 @@ function hydrateVideoInner( | ... | @@ -273,7 +273,7 @@ function hydrateVideoInner( |
| 273 | hlsSource.src = hlsFile; | 273 | hlsSource.src = hlsFile; |
| 274 | video.appendChild(hlsSource); | 274 | video.appendChild(hlsSource); |
| 275 | video.controls = true; | 275 | video.controls = true; |
| 276 | onCloverVideoInit?.(id, video); | 276 | window.onCloverVideoInit?.(id, video); |
| 277 | } else if (mode === "hls-polyfill") { | 277 | } else if (mode === "hls-polyfill") { |
| 278 | hls!.then((hls) => { | 278 | hls!.then((hls) => { |
| 279 | // @ts-expect-error suspicious | 279 | // @ts-expect-error suspicious |
| ... | @@ -281,12 +281,12 @@ function hydrateVideoInner( | ... | @@ -281,12 +281,12 @@ function hydrateVideoInner( |
| 281 | player.loadSource(hlsFile); | 281 | player.loadSource(hlsFile); |
| 282 | player.attachMedia(video); | 282 | player.attachMedia(video); |
| 283 | video.controls = true; | 283 | video.controls = true; |
| 284 | onCloverVideoInit?.(id, video); | 284 | window.onCloverVideoInit?.(id, video); |
| 285 | }); | 285 | }); |
| 286 | } else { | 286 | } else { |
| 287 | video.src = src; | 287 | video.src = src; |
| 288 | video.controls = true; | 288 | video.controls = true; |
| 289 | onCloverVideoInit?.(id, video); | 289 | window.onCloverVideoInit?.(id, video); |
| 290 | } | 290 | } |
| 291 | } | 291 | } |
| 292 | | 292 | |