Expose requestFullscreen method from Vimeo Player via useVimeoPlayer
#33
Closed
adityapattani
started this conversation in
Ideas
Replies: 2 comments
-
|
I'll work on this feature over the weekend! |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
This has been implemented! 🎉 (v1.2.0) I've added support for the three fullscreen control methods:
These methods are now available on the player instance returned by Example usage: const player = useVimeoPlayer(vimeoUrl);
// Enter fullscreen
await player.requestFullscreen();
// Exit fullscreen
await player.exitFullscreen();
// Check fullscreen state
const isFullscreen = await player.getFullscreen();You can also listen to fullscreen changes using the fullscreenchange event: const fullscreenState = useVimeoEvent(player, 'fullscreenchange');
console.log(fullscreenState?.fullscreen); // true or falseCheck out the example app for a working demo! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, the
useVimeoPlayerhook exposes a limited set of Vimeo Player methods such asplay,pause, andseekTo. However, the official Vimeo Player JS API (Docs: https://github.com/vimeo/player.js/?tab=readme-ov-file#requestfullscreen-promisevoid-error) supportsrequestFullscreen()andexitFullscreen()methods, which are not accessible via the bridge.Expected Behavior
Calling
requestFullscreen()on the player should programmatically enter fullscreen mode on Android (and iOS, if supported).Calling
exitFullscreen()should exit fullscreen mode.Use Case
Beta Was this translation helpful? Give feedback.
All reactions