From 1a4bc2a543671f44197233423f42e31b4d018136 Mon Sep 17 00:00:00 2001 From: Anthony Date: Mon, 30 Aug 2021 20:44:27 +0200 Subject: [PATCH] hide div properly --- ui/component/viewers/videoViewer/internal/videojs.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/component/viewers/videoViewer/internal/videojs.jsx b/ui/component/viewers/videoViewer/internal/videojs.jsx index f964ea6af..3160120a1 100644 --- a/ui/component/viewers/videoViewer/internal/videojs.jsx +++ b/ui/component/viewers/videoViewer/internal/videojs.jsx @@ -245,6 +245,7 @@ export default React.memo(function VideoJs(props: Props) { switch (tapButton) { case TAP.NONE: + document.getElementsByClassName('video-js--tap-to-unmute')[0].style.visibility = 'hidden'; setButtonVisibility(tapToUnmuteRef, false); setButtonVisibility(tapToRetryRef, false); break; @@ -340,8 +341,10 @@ export default React.memo(function VideoJs(props: Props) { } } + function onInitialPlay() { const player = playerRef.current; + // show the unmute button if the video is muted if (player && (player.muted() || player.volume() === 0)) { // The css starts as "hidden". We make it visible here without // re-rendering the whole thing.