turn off big play button
This commit is contained in:
parent
29dafce0a8
commit
abbd524ead
1 changed files with 26 additions and 25 deletions
|
@ -556,12 +556,13 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
|||
|
||||
if(isNotAndroidOrIos){
|
||||
el.classList.add('vjs-big-play-centered');
|
||||
|
||||
const playBT = document.getElementsByClassName('vjs-big-play-button')[0];
|
||||
playBT.style.display = 'none';
|
||||
}
|
||||
|
||||
const player = playerRef.current;
|
||||
|
||||
const playBT = document.getElementsByClassName('vjs-big-play-button')[0];
|
||||
playBT.style.display = 'none';
|
||||
|
||||
// this seems like a weird thing to have to check for here
|
||||
if (!player) return;
|
||||
|
@ -593,29 +594,29 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
|||
// })
|
||||
|
||||
// on ios, show a play button when paused
|
||||
if (IS_IOS) {
|
||||
const playBT = document.getElementsByClassName('vjs-big-play-button')[0];
|
||||
|
||||
player.on('pause', function() {
|
||||
playBT.style.removeProperty('display');
|
||||
|
||||
const videoDiv = player.children_[0];
|
||||
const controlBar = document.getElementsByClassName('vjs-control-bar')[0];
|
||||
const leftWidth = ((videoDiv.offsetWidth - playBT.offsetWidth) / 2) + 'px';
|
||||
const availableHeight = videoDiv.offsetHeight - controlBar.offsetHeight;
|
||||
const topHeight = (((availableHeight - playBT.offsetHeight) / 2) + 11) + 'px';
|
||||
|
||||
playBT.style.top = topHeight;
|
||||
playBT.style.left = leftWidth;
|
||||
playBT.style.margin = 0;
|
||||
});
|
||||
|
||||
player.on('ended', function() {
|
||||
if (showAutoplayCountdown) {
|
||||
playBT.style.display = 'none';
|
||||
}
|
||||
});
|
||||
}
|
||||
// if (IS_IOS) {
|
||||
// const playBT = document.getElementsByClassName('vjs-big-play-button')[0];
|
||||
//
|
||||
// player.on('pause', function() {
|
||||
// playBT.style.removeProperty('display');
|
||||
//
|
||||
// const videoDiv = player.children_[0];
|
||||
// const controlBar = document.getElementsByClassName('vjs-control-bar')[0];
|
||||
// const leftWidth = ((videoDiv.offsetWidth - playBT.offsetWidth) / 2) + 'px';
|
||||
// const availableHeight = videoDiv.offsetHeight - controlBar.offsetHeight;
|
||||
// const topHeight = (((availableHeight - playBT.offsetHeight) / 2) + 11) + 'px';
|
||||
//
|
||||
// playBT.style.top = topHeight;
|
||||
// playBT.style.left = leftWidth;
|
||||
// playBT.style.margin = 0;
|
||||
// });
|
||||
//
|
||||
// player.on('ended', function() {
|
||||
// if (showAutoplayCountdown) {
|
||||
// playBT.style.display = 'none';
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
// Replace volume bar with custom LBRY volume bar
|
||||
LbryVolumeBarClass.replaceExisting(player);
|
||||
|
|
Loading…
Reference in a new issue