react-jw播放器或reactjs中的大量广告



什么是海量广告?以及如何在react-jw-player中使用Vast广告,以及调试的各种工具是什么?

VAST代表视频广告服务模板。简单地说,它是由IAB开发的一个XML脚本。最流行的广告标准,VAST创建了广告服务器和视频播放器之间的通信链路。VAST是由互动广告局定义和发布的规范,为广告服务器和视频播放器之间的通信要求设定了标准,以呈现视频广告。

现在在react中使用它使用react jw播放器是相当棘手的。我们可以在使用customProps的广告中使用广告对象。

import "./styles.css";
import ReactJWPlayer from "react-jw-player";
export default function App() {
let newScheduleArray = [
{
tag: [
"https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator=[timestamp]"
],
type: "linear",
offset: 25
},
{
tag: [
"https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator=[timestamp]"
],
type: "linear",
offset: 125
},
{
tag: [
"https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator=[timestamp]"
],
type: "linear",
offset: 225
}
];
const ads = {
admessage: "This video will resume in xx seconds",
adscheduleid: "your_ad_schedule_id",
client: "vast",
cuetext: "Advertisement",
outstream: false,
preloadAds: false,
vpaidcontrols: false,
rules: {
startOnSeek: "pre",
timeBetweenAds: 0
},
schedule: newScheduleArray
};
return (
<div className="App">
<h1>React JwPlayer with Vast Ads</h1>
<ReactJWPlayer
file="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
playerId="123"
playerScript="https://cdn.jwplayer.com/libraries/someid.js"
customProps={{ advertising: { ...ads } }}
/>
</div>
);
}

现在谈论广告是好的,但如何使用jwPlayer:的各种工具

  1. https://developer.jwplayer.com/jwplayer/reference/get_v2-advertising-schedules-ad-schedule-id-ad-schedule-extension
  2. https://developer-tools.jwplayer.com/ad-tester
  3. 大量演示广告:https://foliovision.com/player/vast/sample-vast-tags
  4. JW镜头:Chrome插件:https://extpose.com/ext/104286/en

这是所有人的

相关内容

  • 没有找到相关文章

最新更新