youtube_queue_extension icon indicating copy to clipboard operation
youtube_queue_extension copied to clipboard

Exits fullscreen on playing next video

Open Booom3 opened this issue 7 years ago • 5 comments

Pretty much what the title of the issue says.

Now I haven't looked at the code so correct me if I'm wrong but it seems like it simply redirects the tab to the next video and uses the standard browser code for playing the next video.

My solution to this problem would be to simply check if the video is fullscreen before redirecting and, if it is, maximizing the video player after the next tab is loaded. A bit hacky but it should work fine.

Booom3 avatar Jul 10 '17 18:07 Booom3

yes, I was about to release a new version today. It will resolve this issue. Do checkout. Thank :)

adeora7 avatar Jul 11 '17 02:07 adeora7

It does not seem to fix this issue. Where was your fix exactly?

I am also a developer and is even maintaining my own Chrome/FF addon so I can take a look at the code.

Booom3 avatar Jul 25 '17 20:07 Booom3

I didn't fix it yet. You can have a look at the in page script which sends a message to Content script via promise. There is a local variable in an object on top of background.js in which a new local variable for full screen can be added. On detecting full screen mode, send message from content.js to background.js to set variable and force it in whenever a new video is played either because one video ended or because someone explicitly played another one.

adeora7 avatar Jul 26 '17 06:07 adeora7

Failed to execute 'requestFullscreen' on 'Element': API can only be initiated by a user gesture.

Apparently this is completely impossible.

Edit: The way it is now, that is. The way around it might be to switch to youtube.com/embed/ and let the user press F11 for fullscreen.

Booom3 avatar Jul 29 '17 11:07 Booom3

#9

Created a pull request to make the video use embed rather than the full youtube page. The main advantage here is that you can press F11 to keep the video playing in fullscreen between page updates.

Booom3 avatar Jul 29 '17 12:07 Booom3