From af7b4f6212899789c55265886eee39b0a4a72f2c Mon Sep 17 00:00:00 2001 From: Yiannis Christodoulou Date: Thu, 16 Oct 2025 16:55:05 +0300 Subject: [PATCH] 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. --- .../src/components/video-player/VideoJSPlayer.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend-tools/video-js/src/components/video-player/VideoJSPlayer.jsx b/frontend-tools/video-js/src/components/video-player/VideoJSPlayer.jsx index a8718747..97ebbe2a 100644 --- a/frontend-tools/video-js/src/components/video-player/VideoJSPlayer.jsx +++ b/frontend-tools/video-js/src/components/video-player/VideoJSPlayer.jsx @@ -2109,11 +2109,11 @@ function VideoJSPlayer({ videoId = 'default-video' }) { // Custom control spacer customControlSpacer: true, - // Fullscreen toggle button - fullscreenToggle: true, + // Fullscreen toggle button (hide for audio files since fullscreen doesn't work on mobile) + fullscreenToggle: mediaData.data?.media_type === 'audio' ? false : true, - // Picture-in-picture toggle button - pictureInPictureToggle: isTouchDevice ? false : true, + // Picture-in-picture toggle button (hide for audio and touch devices) + pictureInPictureToggle: isTouchDevice || mediaData.data?.media_type === 'audio' ? false : true, // Remove default playback speed dropdown from control bar playbackRateMenuButton: false,