Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exits fullscreen on playing next video #8

Open
Booom3 opened this issue Jul 10, 2017 · 5 comments
Open

Exits fullscreen on playing next video #8

Booom3 opened this issue Jul 10, 2017 · 5 comments

Comments

@Booom3
Copy link

Booom3 commented Jul 10, 2017

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.

@adeora7
Copy link
Owner

adeora7 commented Jul 11, 2017

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

@Booom3
Copy link
Author

Booom3 commented Jul 25, 2017

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.

@adeora7
Copy link
Owner

adeora7 commented Jul 26, 2017

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.

@Booom3
Copy link
Author

Booom3 commented Jul 29, 2017

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
Copy link
Author

Booom3 commented Jul 29, 2017

#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants