diff --git a/ui/component/viewers/videoViewer/internal/videojs.jsx b/ui/component/viewers/videoViewer/internal/videojs.jsx index 635299777..a7d210a61 100644 --- a/ui/component/viewers/videoViewer/internal/videojs.jsx +++ b/ui/component/viewers/videoViewer/internal/videojs.jsx @@ -84,7 +84,7 @@ if (!Object.keys(videojs.getPlugins()).includes('eventTracking')) { properties for this component should be kept to ONLY those that if changed should REQUIRE an entirely new videojs element */ export default React.memo(function VideoJs(props: Props) { - const { startMuted, source, sourceType, poster, isAudio, onPlayerReady } = props; + const { startMuted, source, sourceType, poster, isAudio, onPlayerReady, adsTest } = props; const [reload, setReload] = useState('initial'); let player: ?Player; @@ -102,20 +102,20 @@ export default React.memo(function VideoJs(props: Props) { plugins: { eventTracking: true }, }; - // if (adsTest) { - // videoJsOptions.sources = [ - // { - // src: - // 'https://cdn.lbryplayer.xyz/api/v3/streams/free/ted-cruz-obliterates-jack-dorsey/9c1d2dec8fd668a79966da4218b2c4d850f7e3c6/bd9c0e', - // type: 'video/mp4', - // }, - // ]; - // // videoJsOptions.plugins.vastClient = { - // // adTagUrl: 'https://rozamimo9za10.com/ceef/gdt3g0/tbt/1794126/tlk.xml', - // // adsCancelTimeout: 5000, - // // adsEnabled: true, - // // }; - // } + if (adsTest) { + videoJsOptions.sources = [ + { + src: + 'https://cdn.lbryplayer.xyz/api/v3/streams/free/ted-cruz-obliterates-jack-dorsey/9c1d2dec8fd668a79966da4218b2c4d850f7e3c6/bd9c0e', + type: 'video/mp4', + }, + ]; + // videoJsOptions.plugins.vastClient = { + // adTagUrl: 'https://rozamimo9za10.com/ceef/gdt3g0/tbt/1794126/tlk.xml', + // adsCancelTimeout: 5000, + // adsEnabled: true, + // }; + } videoJsOptions.muted = startMuted; diff --git a/ui/page/adsTest/view.jsx b/ui/page/adsTest/view.jsx index a8c1c1598..4d803e59c 100644 --- a/ui/page/adsTest/view.jsx +++ b/ui/page/adsTest/view.jsx @@ -1,7 +1,7 @@ // @flow import * as React from 'react'; import Page from 'component/page'; -// import VideoJs from 'component/viewers/videoViewer/internal/videojs'; +import VideoJs from 'component/viewers/videoViewer/internal/videojs'; export default function AdsTestPage() { const [show, setShow] = React.useState(false); @@ -10,19 +10,25 @@ export default function AdsTestPage() { script.src = 'https://sdk.adspruce.com/1/adsprucetag.js?pid=8394&sid=2"'; script.defer = true; + // $FlowFixMe document.head.appendChild(script); }, []); React.useEffect(() => { setTimeout(() => { setShow(true); - }, 3000); + }, 1000); }, []); return (

ads test

- {/* {show && } */} + {show && ( +
+ {/* $FlowFixMe */} + +
+ )}
); } diff --git a/ui/scss/init/_gui.scss b/ui/scss/init/_gui.scss index 6e18787fa..b8b3892e1 100644 --- a/ui/scss/init/_gui.scss +++ b/ui/scss/init/_gui.scss @@ -358,6 +358,15 @@ textarea { .ads-test { height: 50vh; + position: relative; + + .video-js { + height: 50vh; + } + + .video-js .vjs-tech { + height: 50vh; + } } .adspruce-bannerspot {