Fix player error
This commit is contained in:
parent
3d4a4cd960
commit
df360f7ccc
1 changed files with 3 additions and 0 deletions
|
@ -293,6 +293,9 @@ function VideoViewer(props: Props) {
|
|||
// center play button
|
||||
const playBT = document.getElementsByClassName('vjs-big-play-button')[0];
|
||||
const videoDiv = window.player.children_[0].closest('video-js-parent');
|
||||
|
||||
if (!videoDiv) return;
|
||||
|
||||
const controlBar = document.getElementsByClassName('vjs-control-bar')[0];
|
||||
const leftWidth = (videoDiv.offsetWidth - playBT.offsetWidth) / 2 + 'px';
|
||||
const availableHeight = videoDiv.offsetHeight - controlBar.offsetHeight;
|
||||
|
|
Loading…
Reference in a new issue