add back video player on adstest pagegaa

This commit is contained in:
Sean Yesmunt 2020-11-04 11:58:23 -05:00
parent 485a734c9b
commit fd5cde08c3
3 changed files with 33 additions and 18 deletions

View file

@ -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<Props>(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<Props>(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;

View file

@ -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 (
<Page className="ads-test">
<h1>ads test</h1>
{/* {show && <VideoJs adsTest />} */}
{show && (
<div style={{ marginTop: '5rem' }}>
{/* $FlowFixMe */}
<VideoJs adsTest />
</div>
)}
</Page>
);
}

View file

@ -358,6 +358,15 @@ textarea {
.ads-test {
height: 50vh;
position: relative;
.video-js {
height: 50vh;
}
.video-js .vjs-tech {
height: 50vh;
}
}
.adspruce-bannerspot {