From 4e3b07ede58c96abfe11a68ab86ef05e1a92a77a Mon Sep 17 00:00:00 2001 From: zeppi Date: Mon, 23 Aug 2021 11:05:33 -0400 Subject: [PATCH] disable aniview --- ui/component/app/view.jsx | 30 +++++++++---------- .../viewers/videoViewer/internal/videojs.jsx | 16 +++++----- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/ui/component/app/view.jsx b/ui/component/app/view.jsx index aadc719e4..00505e48a 100644 --- a/ui/component/app/view.jsx +++ b/ui/component/app/view.jsx @@ -5,7 +5,7 @@ import { lazyImport } from 'util/lazyImport'; import classnames from 'classnames'; import analytics from 'analytics'; import { buildURI, parseURI } from 'lbry-redux'; -import { SIMPLE_SITE, ENABLE_PREROLL_ADS } from 'config'; +import { SIMPLE_SITE } from 'config'; import Router from 'component/router/index'; import ReactModal from 'react-modal'; import { openContextMenu } from 'util/context-menu'; @@ -325,21 +325,21 @@ function App(props: Props) { } }, [previousRewardApproved, isRewardApproved]); - // Load IMA3 SDK for aniview + // Load IMA3 SDK for aniview: DISABLED FOR NOW // @if TARGET='web' - useEffect(() => { - if (ENABLE_PREROLL_ADS) { - const script = document.createElement('script'); - script.src = `https://imasdk.googleapis.com/js/sdkloader/ima3.js`; - script.async = true; - // $FlowFixMe - document.body.appendChild(script); - return () => { - // $FlowFixMe - document.body.removeChild(script); - }; - } - }); + // useEffect(() => { + // if (ENABLE_PREROLL_ADS) { + // const script = document.createElement('script'); + // script.src = `https://imasdk.googleapis.com/js/sdkloader/ima3.js`; + // script.async = true; + // // $FlowFixMe + // document.body.appendChild(script); + // return () => { + // // $FlowFixMe + // document.body.removeChild(script); + // }; + // } + // }); // @endif // @if TARGET='app' diff --git a/ui/component/viewers/videoViewer/internal/videojs.jsx b/ui/component/viewers/videoViewer/internal/videojs.jsx index 73ee97457..a3fcc48de 100644 --- a/ui/component/viewers/videoViewer/internal/videojs.jsx +++ b/ui/component/viewers/videoViewer/internal/videojs.jsx @@ -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'; @@ -14,7 +14,8 @@ import recsys from './plugins/videojs-recsys/plugin'; import qualityLevels from 'videojs-contrib-quality-levels'; import isUserTyping from 'util/detect-typing'; // @if TARGET='web' -import './plugins/videojs-aniview/plugin'; +// Disabled for now. +// import './plugins/videojs-aniview/plugin'; // @endif const isDev = process.env.NODE_ENV !== 'production'; @@ -56,7 +57,7 @@ type Props = { adUrl: ?string, claimId: ?string, userId: ?number, - allowPreRoll: ?boolean, + // allowPreRoll: ?boolean, shareTelemetry: boolean, }; @@ -194,7 +195,7 @@ export default React.memo(function VideoJs(props: Props) { adUrl, claimId, userId, - allowPreRoll, + // allowPreRoll, shareTelemetry, } = props; @@ -587,9 +588,10 @@ export default React.memo(function VideoJs(props: Props) { // 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 TARGET='web' - if ((allowPreRoll && SIMPLE_SITE) || isDev) { - vjs.aniview(); - } + // DISABLED FOR NOW + // if ((allowPreRoll && SIMPLE_SITE) || isDev) { + // vjs.aniview(); + // } // @endif // fixes #3498 (https://github.com/lbryio/lbry-desktop/issues/3498)