mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-05 23:18:53 -05:00
Hide fullscreen and PiP controls for audio and touch devices
Updated VideoJSPlayer to hide the fullscreen toggle for audio files and the picture-in-picture toggle for both audio files and touch devices, improving the control bar UI for these scenarios.
This commit is contained in:
parent
133e147b32
commit
af7b4f6212
@ -2109,11 +2109,11 @@ function VideoJSPlayer({ videoId = 'default-video' }) {
|
|||||||
// Custom control spacer
|
// Custom control spacer
|
||||||
customControlSpacer: true,
|
customControlSpacer: true,
|
||||||
|
|
||||||
// Fullscreen toggle button
|
// Fullscreen toggle button (hide for audio files since fullscreen doesn't work on mobile)
|
||||||
fullscreenToggle: true,
|
fullscreenToggle: mediaData.data?.media_type === 'audio' ? false : true,
|
||||||
|
|
||||||
// Picture-in-picture toggle button
|
// Picture-in-picture toggle button (hide for audio and touch devices)
|
||||||
pictureInPictureToggle: isTouchDevice ? false : true,
|
pictureInPictureToggle: isTouchDevice || mediaData.data?.media_type === 'audio' ? false : true,
|
||||||
|
|
||||||
// Remove default playback speed dropdown from control bar
|
// Remove default playback speed dropdown from control bar
|
||||||
playbackRateMenuButton: false,
|
playbackRateMenuButton: false,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user