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

In iOS, fullscreenchange event is not firing while exit from the full screen #6645

Closed
senthil88 opened this issue May 12, 2020 · 4 comments
Closed

Comments

@senthil88
Copy link

senthil88 commented May 12, 2020

Description

In iOS safari browser, when I am clicking on fullscreen icon fullscreenchange event is triggering.
The same event should be trigger while clicking on Exit fullscreen icon. But it's not triggering.

Results

Expected

fullscreenchange event should be trigger on both the fullscreen & exit fullscreen mode.

Actual

fullscreenchange is not triggering.

Additional Information

This issue might be on because of #6424 . Still I am not sure.

When ever clicks on the fullscreen icon in the iOS safari browser, native player starts to play the video in fullscreen and also triggers the fullscreenerror event. On fullscreenerror, it's removing the following listener fullscreenchange, fullscreenerror. DomData (fullscreenchange,fullscreenerror) WeakMap reference also got removed. Dispatcher & elem is not available while running this code

this.trigger('fullscreenchange', {isFullscreen: false});

versions

videojs

7.8.1

browsers

Mobile Safari

OSes

iOS

@welcome
Copy link

welcome bot commented May 12, 2020

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@LaughSun0513
Copy link

LaughSun0513 commented May 15, 2020

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

same here .

  1. My toast is showing when pause event is trigger
    I want to exitFullScreen and continue video playing and hide my Toast;
videoPlayer.on('pause', function () {
            $(Toast).show()
 });

  1. In IphoneXR, the control bar play icon is error class when I exitFullScreen . expect .vjs-playing but i got .vjs-paused and the video is playing too. I have to
videoPlayer.on('fullscreenchange', function () {
            if (!this.isFullscreen_) { 
                $('.vjs-control-bar .vjs-play-control').addClass('.vjs-paused');
                $('.vjs-control-bar .vjs-play-control').removeClass('.vjs-playing');
            }
 });

  1. when I exitFullScreen will trigger video paused event by default.However, I want to autoplay when exitFullScreen.

That's all.
How should I do?
Thanks!!!

@chandarsunderraj
Copy link

can you try this ?
video.addEventListener('webkitendfullscreen', (e) => { //code to destroy my custom modal on close of x icon in ios native close button });

I had a similar use case #6574

@gkatsev
Copy link
Member

gkatsev commented Jul 7, 2020

Thank you for everyone's patience. We have a potential fix for this with #6735. You can give it a shot here https://deploy-preview-6735--videojs-docs.netlify.app/test-example/. If you do, please let us know if it fixes the issue for you.
I'll be testing it this week and hopefully we can get the fix out this soon.

@gkatsev gkatsev closed this as completed in fdd807b Jul 7, 2020
gkatsev pushed a commit that referenced this issue Jul 8, 2020
The Fullscreen API is unsupported in iOS, so self.fsApi_.fullscreenerror and self.fsApi_.fullscreenchange are undefined, which was breaking the player after entering fullscreen by removing all bound player events.

Fixes #6707, fixes #6684, fixes #6645.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2022
edirub pushed a commit to edirub/video.js that referenced this issue Jun 8, 2023
The Fullscreen API is unsupported in iOS, so self.fsApi_.fullscreenerror and self.fsApi_.fullscreenchange are undefined, which was breaking the player after entering fullscreen by removing all bound player events.

Fixes videojs#6707, fixes videojs#6684, fixes videojs#6645.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants