benzap / redditv

Subreddit Video Player
http://redditv.ca
Eclipse Public License 1.0
17 stars 1 forks source link

next video should start even if window is minimized #8

Open ghost opened 6 years ago

ghost commented 6 years ago

not sure what the current code logic is here - but i have noticed that the next video does not always play if the window is minimized

if i manually seek to 90% then minimize - it seems to work - but if i let the video play naturally it will not kick over to the next video if the window is minimized - it just sits there and does nothing until you restore the window then it will kick over to the next video

benzap commented 6 years ago

This might actually be an issue with the browser and how the embedded videos pick up on whether the elements are visible. The code logic is tied in with the render loop, which in turn tied up with requestAnimationFrame. requestAnimationFrame won't fire if the tab in your browser isn't active, but i'm not sure about minimized browsers. I'll have to look into that.