Add play button on pause ios #6975
1 changed files with 6 additions and 6 deletions
|
@ -59,7 +59,7 @@ type Props = {
|
|||
userId: ?number,
|
||||
// allowPreRoll: ?boolean,
|
||||
shareTelemetry: boolean,
|
||||
showAutoplayCountdown: boolean
|
||||
showAutoplayCountdown: boolean,
|
||||
};
|
||||
|
||||
// type VideoJSOptions = {
|
||||
|
@ -569,13 +569,13 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
|||
player.on('pause', function () {
|
||||
const videoDiv = player.children_[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 topHeight = (((availableHeight - playBT.offsetHeight) / 2) + 3) + 'px';
|
||||
const topHeight = (availableHeight - playBT.offsetHeight) / 2 + 3 + 'px';
|
||||
|
||||
playBT.style.top = topHeight;
|
||||
playBT.style.left = leftWidth;
|
||||
playBT.style.margin = 0;
|
||||
playBT.style.margin = '0';
|
||||
});
|
||||
|
||||
player.on('ended', function () {
|
||||
|
|
Loading…
Reference in a new issue