Skip to content

Bug: requestFullscreen correctly enters fullscreen, but gets stuck #1068

@dylanjha

Description

@dylanjha

Is there an existing issue for this?

  • I have searched the existing issues

Which Mux Elements/Packages does this apply to? Select all that apply

mux-player, mux-player-react

Which browsers are you using?

Chrome

Which operating systems are you using?

None

Description

To programmatically enter fullscreen I tried:

document.querySelector('mux-player').requestFullscreen()

This correctly enters fullscreen, but it seems like the player doesn't know we're in fullscreen because the fullscreen button does not change to show me the option to "exit full screen".

The workaround is to dispatch mediaenterfullscreenrequest via the mediaController:

const evt = new CustomEvent("mediaenterfullscreenrequest", { composed: true, bubbles: true })
document.querySelector('mux-player').mediaController.dispatchEvent(evt)

Since Mux Player mirrors the HTML5 video API, I would expect requestFullscreen to work?

Reduced test case

https://stream.new/v/013UuXYvxE6dmA6NQrVHmoxGWAEL7mzly

Steps to reproduce

Use the stream.new link and follow the instructions above by copy/pasting into the console.

Current Behavior

Enters fullscreen, but the player is stuck with no ability to click "exit full screen"

Expected Behavior

It should enter fullscreen and show me the button to exit fullscreen

Errors

No response

What version of the package are you using?

No response

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions