Skip to content

Commit

Permalink
add documentation for AdPlayer.Pro video module
Browse files Browse the repository at this point in the history
  • Loading branch information
artem committed Sep 20, 2024
1 parent 6bcb275 commit a02100a
Show file tree
Hide file tree
Showing 3 changed files with 181 additions and 0 deletions.
24 changes: 24 additions & 0 deletions dev-docs/modules/adplayerproVideoProvider.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
layout: page_v2
page_type: module
title: Module - AdPlayer.Pro Video Submodule
description: Allows Prebid to integrate directly with AdPlayer.Pro video player.
module_code : adplayerproVideoProvider
display_name : AdPlayer.Pro Video Provider
enable_download : true
vendor_specific: true
sidebarType : 1
---

# AdPlayer.Pro Video Provider

The AdPlayer.Pro Video Provider is a submodule of the Prebid Video Module.

The AdPlayer.Pro Vendor Code for the Video Module is `3`.

For information on how to use the Video Module with AdPlayer.Pro please visit the [docs]({{site.github.url}}/prebid-video/video-module.html).

## Additional Information

- If you would like to further customize your AdPlayer.Pro experience, please visit our [Developer docs](https://docs.adplayer.pro/whitelabel-standalone-script/).
- To learn more [about us](https://adplayer.pro/).
3 changes: 3 additions & 0 deletions prebid-video/video-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ The following Video Players are currently supported:
|--------------|----------------|-------------|
| [JW Player](https://info.jwplayer.com/sign-up/?utm_source=developer&utm_medium=CTA) | jwplayerVideoProvider | 1 |
| [video.js](https://videojs.com/) | videojsVideoProvider | 2 |
| [AdPlayer.Pro](https://adplayer.pro/) | adplayerproVideoProvider | 3 |

Not seeing your desired video player ? Learn how to add support by reading our [contribution guide](#Video-Module-Contributing)

Expand Down Expand Up @@ -69,6 +70,8 @@ For the list of properties in the `video` object of the ad unit please visit the

[JW Player]({{site.baseurl}}/prebid-video/video-module/integration-examples/jwplayer.html)

[AdPlayer.Pro]({{site.baseurl}}/prebid-video/video-module/integration-examples/adplayerpro.html)

### Features for Publishers

Integrating with the Video Module gives publishers access to the following features
Expand Down
154 changes: 154 additions & 0 deletions prebid-video/video-module/integration-examples/adplayerpro.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
<html lang="en">

<head>
<script src="https://serving.stat-rock.com/player/prebidAdPlayerPro.js"></script>
<script async src="https://cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js"></script>

<title>AdPlayer.Pro Event Listeners</title>

<!-- This demo listens to every video event and logs the event payload. -->

<script>
// Setup ad units
var adUnits = [{
code: 'div-gpt-ad-51545-0',
mediaTypes: {
video: {"context": "outstream"}
},
video: {
divId: 'player', // required to indicate which player is being used to render this ad unit.
},
bids: [
{
bidder: 'ix',
params: {
siteId: '300',
}
}
]
}];

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];

pbjs.que.push(function () {
pbjs.setConfig({
video: {
providers: [{
divId: 'player', // required, this is the id of the div element where the player will be placed
vendorCode: 3, // AdPlayer.Pro vendorCode
playerConfig: {
placementId: 'c9gebfehcqjE', // required, this placementId is only for demo purposes
params: {
'type': 'inView',
'muted': true,
'autoStart': true,
'advertising': {
'controls': true,
'closeButton': true,
// 'tag': {'client': 'googima'},
},
'width': '600',
'height': '300'
}
},
},]
},
debugging: {
enabled: true,
intercept: [
{
when: {
adUnitCode: 'div-gpt-ad-51545-0',
},
then: {
context: "outstream",
cpm: 10,
mediaType: "video",
vastXml: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><VAST version=\"3.0\"><Ad><InLine><AdSystem>GDFP</AdSystem><AdTitle>Demo</AdTitle><Description><![CDATA[Demo]]></Description><Creatives><Creative><Linear ><Duration>00:00:11</Duration><VideoClicks><ClickThrough><![CDATA[https://adplayer.pro/]]></ClickThrough></VideoClicks><MediaFiles><MediaFile delivery=\"progressive\" width=\"640\" height=\"360\" type=\"video/mp4\" scalable=\"true\" maintainAspectRatio=\"true\"><![CDATA[https://static.adplayer.pro/video/demo_v2.mp4]]></MediaFile></MediaFiles></Linear></Creative></Creatives></InLine></Ad></VAST>",
renderer: {},
}
},
]
}
});
pbjs.addAdUnits(adUnits);

pbjs.onEvent('videoSetupComplete', e => {
console.log('player setup complete: ', e);
});

pbjs.onEvent('videoSetupFailed', e => {
console.log('player setup failed: ', e);
});

pbjs.onEvent('videoDestroyed', e => {
console.log('player destroyed: ', e);
});

pbjs.onEvent('videoAdImpression', (e) => {
console.log('videos pb ad impression: ', e);
});

pbjs.onEvent('videoAdStarted', (e) => {
console.log('videos pb ad started: ', e);
});

pbjs.onEvent('videoAdPlay', (e) => {
console.log('videos pb ad play: ', e);
});

pbjs.onEvent('videoAdPause', (e) => {
console.log('videos pb ad pause: ', e);
});

pbjs.onEvent('videoAdComplete', (e) => {
console.log('videos pb ad complete: ', e);
});

pbjs.onEvent('videoAdSkipped', (e) => {
console.log('videos pb ad skipped: ', e);
});

pbjs.onEvent('videoAdClick', (e) => {
console.log('videos pb ad click: ', e);
});

pbjs.onEvent('videoAdError', (e) => {
console.log('videos pb ad error: ', e);
});

pbjs.onEvent('videoAuctionAdLoadAttempt', (e) => {
console.log('videos pb auction ad load attempt: ', e);
});

pbjs.onEvent('videoAuctionAdLoadQueued', (e) => {
console.log('videos pb auction ad load queued: ', e);
});

pbjs.onEvent('videoAuctionAdLoadAbort', (e) => {
console.log('videos pb auction ad load attempt: ', e);
});

pbjs.onEvent('videoBidImpression', (e) => {
console.log('videos pb bid Impression: ', e);
});

pbjs.onEvent('videoBidError', (e) => {
console.log('videos pb bid Error: ', e);
});

pbjs.requestBids();
});
</script>

</head>

<body>
<h2>AdPlayer.Pro Event Listeners</h2>

<h5>Div-1: Player placeholder div</h5>
<div id='player'></div>
</body>

</html>

0 comments on commit a02100a

Please sign in to comment.