disable preroll ads

This commit is contained in:
Anthony 2021-12-15 19:29:06 +01:00 committed by Thomas Zarebczan
parent a7e571c3b9
commit c214209747
2 changed files with 15 additions and 15 deletions

View file

@ -7,7 +7,7 @@ import classnames from 'classnames';
import analytics from 'analytics'; import analytics from 'analytics';
import { setSearchUserId } from 'redux/actions/search'; import { setSearchUserId } from 'redux/actions/search';
import { buildURI, parseURI } from 'util/lbryURI'; import { buildURI, parseURI } from 'util/lbryURI';
import { SIMPLE_SITE, SHOW_ADS } from 'config'; import { SIMPLE_SITE } from 'config';
import Router from 'component/router/index'; import Router from 'component/router/index';
import ModalRouter from 'modal/modalRouter'; import ModalRouter from 'modal/modalRouter';
import ReactModal from 'react-modal'; import ReactModal from 'react-modal';
@ -345,19 +345,19 @@ function App(props: Props) {
}, [previousRewardApproved, isRewardApproved]); }, [previousRewardApproved, isRewardApproved]);
// Load IMA3 SDK for aniview // Load IMA3 SDK for aniview
useEffect(() => { // useEffect(() => {
if (!isAuthenticated && SHOW_ADS) { // if (!isAuthenticated && SHOW_ADS) {
const script = document.createElement('script'); // const script = document.createElement('script');
script.src = imaLibraryPath; // script.src = imaLibraryPath;
script.async = true; // script.async = true;
// $FlowFixMe // // $FlowFixMe
document.body.appendChild(script); // document.body.appendChild(script);
return () => { // return () => {
// $FlowFixMe // // $FlowFixMe
document.body.removeChild(script); // document.body.removeChild(script);
}; // };
} // }
}, []); // }, []);
// add OneTrust script // add OneTrust script
useEffect(() => { useEffect(() => {

View file

@ -196,7 +196,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
// this seems like a weird thing to have to check for here // this seems like a weird thing to have to check for here
if (!player) return; if (!player) return;
runAds(internalFeatureEnabled, allowPreRoll, player, embedded); // runAds(internalFeatureEnabled, allowPreRoll, player, embedded);
initializeEvents(); initializeEvents();