hide div properly
This commit is contained in:
parent
ed62423c02
commit
1a4bc2a543
1 changed files with 3 additions and 0 deletions
|
@ -245,6 +245,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
||||||
|
|
||||||
switch (tapButton) {
|
switch (tapButton) {
|
||||||
case TAP.NONE:
|
case TAP.NONE:
|
||||||
|
document.getElementsByClassName('video-js--tap-to-unmute')[0].style.visibility = 'hidden';
|
||||||
setButtonVisibility(tapToUnmuteRef, false);
|
setButtonVisibility(tapToUnmuteRef, false);
|
||||||
setButtonVisibility(tapToRetryRef, false);
|
setButtonVisibility(tapToRetryRef, false);
|
||||||
break;
|
break;
|
||||||
|
@ -340,8 +341,10 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function onInitialPlay() {
|
function onInitialPlay() {
|
||||||
const player = playerRef.current;
|
const player = playerRef.current;
|
||||||
|
// show the unmute button if the video is muted
|
||||||
if (player && (player.muted() || player.volume() === 0)) {
|
if (player && (player.muted() || player.volume() === 0)) {
|
||||||
// The css starts as "hidden". We make it visible here without
|
// The css starts as "hidden". We make it visible here without
|
||||||
// re-rendering the whole thing.
|
// re-rendering the whole thing.
|
||||||
|
|
Loading…
Reference in a new issue