reenable prerolls

This commit is contained in:
zeppi 2021-08-10 15:41:49 -04:00 committed by jessopb
parent 68bc4e3b90
commit 892a6deeaf

View file

@ -1,6 +1,6 @@
// @flow
import React, { useEffect, useRef, useState } from 'react';
// import { SIMPLE_SITE } from 'config';
import { SIMPLE_SITE } from 'config';
import Button from 'component/button';
import * as ICONS from 'constants/icons';
import classnames from 'classnames';
@ -13,7 +13,7 @@ import hlsQualitySelector from './plugins/videojs-hls-quality-selector/plugin';
import recsys from './plugins/videojs-recsys/plugin';
import qualityLevels from 'videojs-contrib-quality-levels';
import isUserTyping from 'util/detect-typing';
// import './plugins/videojs-aniview/plugin';
import './plugins/videojs-aniview/plugin';
const isDev = process.env.NODE_ENV !== 'production';
@ -193,7 +193,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
adUrl,
claimId,
userId,
// allowPreRoll,
allowPreRoll,
shareTelemetry,
} = props;
@ -585,9 +585,9 @@ export default React.memo<Props>(function VideoJs(props: Props) {
// This must be initialized earlier than everything else
// otherwise a race condition occurs if we place this in the onReady call back
// allow if isDev because otherwise you'll never see ads when basing to master
// if ((allowPreRoll && SIMPLE_SITE) || isDev) {
// vjs.aniview();
// }
if ((allowPreRoll && SIMPLE_SITE) || isDev) {
vjs.aniview();
}
// fixes #3498 (https://github.com/lbryio/lbry-desktop/issues/3498)
// summary: on firefox the focus would stick to the fullscreen button which caused buggy behavior with spacebar