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-10516): Fullscreen event dispatched twice from the player #489

Merged
merged 2 commits into from
Sep 30, 2020

Conversation

dan-ziv
Copy link
Contributor

@dan-ziv dan-ziv commented Sep 30, 2020

Description of the Changes

Add flag to overcome browsers which supports more than one fullscreenchange event.

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

@dan-ziv dan-ziv requested a review from a team September 30, 2020 10:27
@@ -19,6 +19,8 @@ class FullscreenController {
_player: Player;
_isInBrowserFullscreen: boolean;
_eventManager: EventManager;
// Flag to overcome browsers which supports more than one fullscreenchange event
_isFullscreenEventDispatched: boolean = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Which browsers does it?
It was in the past and I removed it since shaka polyfill cause this issue.

Copy link
Contributor Author

@dan-ziv dan-ziv Sep 30, 2020

Choose a reason for hiding this comment

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

Has nothing to do with Shaka AFAIK.
Happens on Safari which supports fullscreenchange and webkitfullscreenchange
and on IE/Edge which supports fullscreenchange and msfullscreenchange.

Copy link
Contributor

Choose a reason for hiding this comment

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

Shaka fixed this polyfill on their side

Copy link
Contributor

Choose a reason for hiding this comment

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

these are double events we getting from registering them all.
We will open a task to register the correct events like screenfull library is doing.

@dan-ziv dan-ziv merged commit 359bb68 into master Sep 30, 2020
@dan-ziv dan-ziv deleted the FEC-10516 branch September 30, 2020 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants