Fix play btn calcs as audio tag was not measuring as expected
This commit is contained in:
parent
5ee2f40608
commit
f09c6d7a50
1 changed files with 1 additions and 1 deletions
|
@ -292,7 +292,7 @@ function VideoViewer(props: Props) {
|
||||||
function centerPlayButton() {
|
function centerPlayButton() {
|
||||||
// center play button
|
// center play button
|
||||||
const playBT = document.getElementsByClassName('vjs-big-play-button')[0];
|
const playBT = document.getElementsByClassName('vjs-big-play-button')[0];
|
||||||
const videoDiv = window.player.children_[0];
|
const videoDiv = window.player.children_[0].closest('video-js-parent');
|
||||||
const controlBar = document.getElementsByClassName('vjs-control-bar')[0];
|
const controlBar = document.getElementsByClassName('vjs-control-bar')[0];
|
||||||
const leftWidth = (videoDiv.offsetWidth - playBT.offsetWidth) / 2 + 'px';
|
const leftWidth = (videoDiv.offsetWidth - playBT.offsetWidth) / 2 + 'px';
|
||||||
const availableHeight = videoDiv.offsetHeight - controlBar.offsetHeight;
|
const availableHeight = videoDiv.offsetHeight - controlBar.offsetHeight;
|
||||||
|
|
Loading…
Reference in a new issue