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

calling player.exitFullscreen produces an error and is not caught by promise.catch #7298

Closed
gkatsev opened this issue Jul 1, 2021 · 0 comments · Fixed by #7299
Closed

calling player.exitFullscreen produces an error and is not caught by promise.catch #7298

gkatsev opened this issue Jul 1, 2021 · 0 comments · Fixed by #7299

Comments

@gkatsev
Copy link
Member

gkatsev commented Jul 1, 2021

Getting Uncaught (in promise) TypeError: Not in fullscreen mode when player.exitFullscreen() is called.
exitFullscreen returns a promise, but attaching .catch() to it still keeps the error uncaught.
Ideally, with player.exitFullscreen().catch((err)=>(console.log(err))), we should be able to catch this error.

gkatsev added a commit to gkatsev/video.js that referenced this issue Jul 1, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
In addition to mapping the promise to the executor's resolve, and reject
methods, we should also catch the error in the promise chain that's
created inside of exitFullscreenHelper_.

Fixes videojs#7298.
gkatsev added a commit to gkatsev/video.js that referenced this issue Jul 1, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
In addition to mapping the promise to the executor's resolve, and reject
methods, we should also catch the error in the promise chain that's
created inside exitFullscreenHelper_.

Fixes videojs#7298.
gkatsev added a commit that referenced this issue Jul 6, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
#7299)

Mapping the promise returned from the helpers to the executor's resolve, and reject
methods. We also need to catch the error in the promise chain that's
created inside exitFullscreenHelper_.

Fixes #7298.
@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

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
videojs#7299)

Mapping the promise returned from the helpers to the executor's resolve, and reject
methods. We also need to catch the error in the promise chain that's
created inside exitFullscreenHelper_.

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

Successfully merging a pull request may close this issue.

1 participant