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

fix: Exit PIP if entering fullscreen #8082

Merged
merged 2 commits into from
Feb 1, 2023

Conversation

jacobhamblin
Copy link
Contributor

Description

Updates video.js to exit PiP when requesting fullscreen per this issue.

Specific Changes proposed

  • A check at the top of requestFullscreen for isInPictureInPicture, calling exitPictureInPicture if so.

Should more be done here?

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Change has been verified in an actual browser (Chrome, Firefox, IE)
    • Unit Tests updated or fixed
    • Docs/guides updated
    • Example created (starter template on JSBin)
  • Reviewed by Two Core Contributors

@welcome
Copy link

welcome bot commented Jan 19, 2023

💖 Thanks for opening this pull request! 💖

Things that will help get your PR across the finish line:

  • Run npm run lint -- --errors locally to catch formatting errors earlier.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@mister-ben mister-ben changed the title Exit PIP if entering fullscreen fix: Exit PIP if entering fullscreen Jan 24, 2023
@codecov
Copy link

codecov bot commented Jan 27, 2023

Codecov Report

Merging #8082 (1342c59) into main (df71bb0) will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #8082      +/-   ##
==========================================
+ Coverage   81.91%   81.97%   +0.06%     
==========================================
  Files         110      110              
  Lines        7342     7341       -1     
  Branches     1772     1771       -1     
==========================================
+ Hits         6014     6018       +4     
+ Misses       1328     1323       -5     
Impacted Files Coverage Δ
src/js/player.js 89.77% <100.00%> (+0.01%) ⬆️
src/js/poster-image.js 75.60% <0.00%> (ø)
src/js/tech/html5.js 67.18% <0.00%> (+0.87%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@mister-ben mister-ben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, although a test would be nice.

@mister-ben mister-ben merged commit 267b5c6 into videojs:main Feb 1, 2023
@welcome
Copy link

welcome bot commented Feb 1, 2023

Congrats on merging your first pull request! 🎉🎉🎉

@jacobhamblin jacobhamblin deleted the issue-7921 branch February 1, 2023 23:10
edirub pushed a commit to edirub/video.js that referenced this pull request Jun 8, 2023
* exit PIP if entering fullscreen

* assert that entering full screen leaves PiP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants