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

feat: adds disablePictureInPicture method to the player API. #6378

Merged
merged 8 commits into from
Apr 22, 2020

Conversation

gjanblaszczyk
Copy link
Member

Description

A proposed fix for #6341

Specific Changes proposed

Add disablePictureInPicture method the the player API.

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 (Chome, Firefox, IE)
    • Unit Tests updated or fixed
    • Docs/guides updated
    • Example created (starter template on JSBin)
  • Reviewed by Two Core Contributors

@gjanblaszczyk
Copy link
Member Author

This PR is also related to #5824

@kevinfaveri
Copy link

Any news on this?

@gjanblaszczyk
Copy link
Member Author

I'm still waiting for review. I am pretty sure that @gkatsev will do the review sooner or later but it is hard to tell when this will happen exactly...

Copy link
Member

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

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

Thanks @gjanblaszczyk. Only thought is about switching to an event rather than calling the PiPToggle directly.

src/js/player.js Outdated Show resolved Hide resolved
src/js/control-bar/picture-in-picture-toggle.js Outdated Show resolved Hide resolved
@@ -1747,7 +1764,8 @@ Html5.resetMediaElement = function(el) {
// Wrap native properties with a setter in this format:
// set + toTitleCase(name)
// The list is as follows:
// setVolume, setSrc, setPoster, setPreload, setPlaybackRate, setDefaultPlaybackRate
// setVolume, setSrc, setPoster, setPreload, setPlaybackRate, setDefaultPlaybackRate,
// setDisablePictureInPicture
Copy link
Member

Choose a reason for hiding this comment

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

thanks for adding that here. Makes grepping through the code possible.

@@ -39,6 +39,7 @@ QUnit.test('should be able to access expected player API methods', function(asse
assert.ok(player.textTracks, 'textTracks exists');
assert.ok(player.requestFullscreen, 'requestFullscreen exists');
assert.ok(player.exitFullscreen, 'exitFullscreen exists');
assert.ok(player.disablePictureInPicture, 'disablePictureInPicture exists');
Copy link
Member

Choose a reason for hiding this comment

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

thanks, though, I wonder if these tests even run anymore... 🤔

@gkatsev
Copy link
Member

gkatsev commented Mar 25, 2020

Thanks for your patience, needed to take some time away from answering issues and reviewing PRs. Back at it, at least in some capacity now.

@gjanblaszczyk
Copy link
Member Author

Thanks @gkatsev for the review. I have just added changes according to your comments.

@gkatsev gkatsev merged commit dbd5203 into videojs:master Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants