mirror of
https://github.com/streamwall/streamwall.git
synced 2026-01-31 17:32:48 -05:00
Work around bug waiting for Twitch playback start
This commit is contained in:
@@ -209,15 +209,16 @@ async function findVideo(kind) {
|
|||||||
document.body.appendChild(video)
|
document.body.appendChild(video)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
video.play()
|
||||||
|
|
||||||
if (!video.videoWidth) {
|
if (!video.videoWidth) {
|
||||||
|
// TODO: figure out why 'playing' event doesn't fire on Twitch when video offscreen
|
||||||
const videoReady = new Promise((resolve) =>
|
const videoReady = new Promise((resolve) =>
|
||||||
video.addEventListener('canplay', resolve, { once: true }),
|
video.addEventListener('play', resolve, { once: true }),
|
||||||
)
|
)
|
||||||
await videoReady
|
await videoReady
|
||||||
}
|
}
|
||||||
|
|
||||||
video.play()
|
|
||||||
|
|
||||||
const info = {
|
const info = {
|
||||||
title: document.title,
|
title: document.title,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user