seems to be working

This commit is contained in:
Anthony 2021-09-10 19:01:46 +02:00 committed by zeppi
parent d5e582050a
commit 11a6c78928
2 changed files with 22 additions and 4 deletions

View file

@ -302,10 +302,10 @@ export default React.memo<Props>(function VideoJs(props: Props) {
// as the listener to update static texts.
const setLabel = (controlBar, childName, label) => {
const c = controlBar.getChild(childName);
if (c) {
c.controlText(label);
}
// const c = controlBar.getChild(childName);
// if (c) {
// c.controlText(label);
// }
};
const player = playerRef.current;

View file

@ -374,13 +374,31 @@ function VideoViewer(props: Props) {
// player.muted(true);
// another version had player.play()
}
console.log('running here!')
} else {
console.log('running here123')
const isPaused = player.paused();
console.log('is paused');
console.log(isPaused)
if (IS_IOS && isPaused) {
document.getElementsByClassName('video-js--tap-to-unmute')[0].style.visibility = 'visible';
player.muted(true);
const iosResponse = player.play();
console.log(iosResponse)
}
setTimeout(function(){
console.log('running here124')
const isPaused = player.paused();
console.log('is paused');
console.log(isPaused)
if (IS_IOS && isPaused) {
document.getElementsByClassName('video-js--tap-to-unmute')[0].style.visibility = 'visible';
player.muted(true);
const iosResponse = player.play();
console.log(iosResponse)
}
}, 1000)
}
setIsLoading(false);
setIsPlaying(false);