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(FEC-10513): iOS14 - cannot enter to full screen from PiP #484

Merged
merged 4 commits into from
Oct 19, 2020

Conversation

yairans
Copy link
Contributor

@yairans yairans commented Sep 24, 2020

Description of the Changes

  • Fix isFullscreen - was return true on PiP
  • exit from PiP before applying full screen

Solves FEC-10513

CheckLists

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • test are passing in local environment
  • Travis tests are passing (or test results are not worse than on master branch :))
  • Docs have been updated

@yairans yairans requested a review from a team September 24, 2020 12:44
@yairans yairans self-assigned this Sep 24, 2020
@yairans yairans changed the base branch from master to FEC-10510 September 24, 2020 21:37
@yairans yairans changed the title fix(FEC-10513): iOS14 - cannot enter to full screen from PiP fix(FEC-10513,FEC-10514): iOS14 - cannot enter to full screen from PiP Sep 29, 2020
// Second condition is because flow does not support this API yet
if (document.pictureInPictureEnabled && typeof this._el.requestPictureInPicture === 'function') {
if (typeof this._el.webkitSetPresentationMode === 'function') {
this._el.webkitSetPresentationMode('picture-in-picture');
Copy link
Contributor

Choose a reason for hiding this comment

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

please move 'picture-in-picture' to const

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's browser's string. we use it as is (like 'function', 'inline', 'playsinline' and many more)

src/fullscreen/fullscreen-controller.js Outdated Show resolved Hide resolved
} else if (typeof this._el.webkitSetPresentationMode === 'function') {
this._el.webkitSetPresentationMode('picture-in-picture');
// Safari does not fire this event but Chrome does, normalizing the behaviour
setTimeout(() => this.dispatchEvent(new FakeEvent(Html5EventType.ENTER_PICTURE_IN_PICTURE)), 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

don't you miss this event on your change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no. it's not actually needed

Copy link
Contributor

@Yuvalke Yuvalke Oct 18, 2020

Choose a reason for hiding this comment

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

it changed on #483

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no. here I changed enterPictureInPicture. there I changed exitPictureInPicture.

Yuvalke
Yuvalke previously approved these changes Oct 18, 2020
@yairans yairans changed the base branch from FEC-10510 to master October 18, 2020 16:24
@yairans yairans dismissed Yuvalke’s stale review October 18, 2020 16:24

The base branch was changed.

@yairans yairans changed the title fix(FEC-10513,FEC-10514): iOS14 - cannot enter to full screen from PiP fix(FEC-10513): iOS14 - cannot enter to full screen from PiP Oct 18, 2020
OrenMe
OrenMe previously approved these changes Oct 18, 2020
videoElement.webkitEnterFullScreen();
if (this._player.isInPictureInPicture()) {
// iOS < 13 (iPad) has an issue to enter to full screen from PiP
setTimeout(() => videoElement.webkitEnterFullScreen(), 1000);
Copy link
Contributor

Choose a reason for hiding this comment

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

Let’s just move the 1000 magic number to const at the top, beside that LGTM.

@yairans yairans merged commit bdc8761 into master Oct 19, 2020
@yairans yairans deleted the FEC-10513 branch October 19, 2020 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants