Reputation: 21
Steps:
When go to next video, the player exit fullscreen. I nedeed that just like youtube, the next video of playlist keeps in fullscreen.
I know that fullscreen Browser API just accepted fullscreen mode when is triggered by a user gesture. But, as the user has already set up full screen mode, is there a way to continue in fullscreen when going to the next video?
I also know that exits fullscreen because when go to next video, is switchted to a different page.
"In addition, navigating to another page [...] while in fullscreen mode exits fullscreen mode as well. Fullscreen API
My question is, how YouTube manages to change the window.location without exiting fullscreen?
Upvotes: 0
Views: 1926
Reputation: 3434
Youtube doesn't load the next video by switching pages. It reloads/-renders the new content on the existing website.
That means that no navigation happens, and because of that, the fullscreen won't be exited.
As far as I know, they use a custom framework called SPFJS which stands for "Structured Page Fragments". It allows for insertion of new content in an already existing page.
Upvotes: 0