2020-10-30 05:19:05 +01:00
|
|
|
// @flow
|
|
|
|
import * as React from 'react';
|
|
|
|
import Page from 'component/page';
|
2020-11-04 17:58:23 +01:00
|
|
|
import VideoJs from 'component/viewers/videoViewer/internal/videojs';
|
2020-11-02 18:00:49 +01:00
|
|
|
|
|
|
|
export default function AdsTestPage() {
|
|
|
|
const [show, setShow] = React.useState(false);
|
|
|
|
React.useEffect(() => {
|
|
|
|
const script = document.createElement('script');
|
|
|
|
script.src = 'https://sdk.adspruce.com/1/adsprucetag.js?pid=8394&sid=2"';
|
|
|
|
script.defer = true;
|
|
|
|
|
2020-11-04 17:58:23 +01:00
|
|
|
// $FlowFixMe
|
2020-11-02 18:00:49 +01:00
|
|
|
document.head.appendChild(script);
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
React.useEffect(() => {
|
|
|
|
setTimeout(() => {
|
|
|
|
setShow(true);
|
2020-11-04 17:58:23 +01:00
|
|
|
}, 1000);
|
2020-11-02 18:00:49 +01:00
|
|
|
}, []);
|
2020-10-30 05:19:05 +01:00
|
|
|
|
|
|
|
return (
|
|
|
|
<Page className="ads-test">
|
|
|
|
<h1>ads test</h1>
|
2020-11-04 17:58:23 +01:00
|
|
|
{show && (
|
|
|
|
<div style={{ marginTop: '5rem' }}>
|
|
|
|
{/* $FlowFixMe */}
|
|
|
|
<VideoJs adsTest />
|
|
|
|
</div>
|
|
|
|
)}
|
2020-10-30 05:19:05 +01:00
|
|
|
</Page>
|
|
|
|
);
|
|
|
|
}
|