Fix play/pause toggle bug
Sometimes, while casting, WT thinks the video isn't visible and the play/pause toggle stops working
This commit is contained in:
@@ -54,8 +54,8 @@ module.exports = class PlaybackController {
|
||||
|
||||
// force rerendering if window is hidden,
|
||||
// in order to bypass `raf` and play/pause media immediately
|
||||
if (!state.window.isVisible) {
|
||||
var mediaTag = document.querySelector('video,audio')
|
||||
var mediaTag = document.querySelector('video,audio')
|
||||
if (!state.window.isVisible && mediaTag) {
|
||||
if (state.playing.isPaused) mediaTag.play()
|
||||
else mediaTag.pause()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user