Skip to content

Commit

Permalink
12.0.0
Browse files Browse the repository at this point in the history
- Adds BETA support for SIMID (linear creatives only)
- Removes some unnecessary code for VPAID ads
  • Loading branch information
radiantmediaplayer committed Sep 11, 2023
1 parent e865ea9 commit f4ac3f2
Show file tree
Hide file tree
Showing 29 changed files with 6,046 additions and 1,964 deletions.
7 changes: 5 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "eslint:recommended",
"ignorePatterns": [
"externals/*",
"externals/hls/*",
"externals/omweb-js-1.4.2/*",
"src/assets/*",
"dist/*",
"test/lib/*"
Expand Down Expand Up @@ -56,6 +57,8 @@
"RMP_VAST_VERSION": true,
"RmpVast": true,
"OmidSessionClient": true,
"Hls": true
"Hls": true,
"SimidPlayer": true,
"SimidProtocol": true
}
}
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ rmp-vast is used and maintained by [Radiant Media Player](https://www.radiantmed
- [Parameters, API events and methods](#parameters-api-events-and-methods)
- [Companion ads support](#companion-ads-support)
- [AdVerifications OM Web SDK](#adverifications-om-web-sdk)
- [VPAID support](#vpaid-support)
- [SIMID support](#simid-support)
- [VPAID support (DEPRECATED)](#vpaid-support)
- [HLS creatives support](#hls-creatives-support)
- [Autoplay support](#autoplay-support)
- [Fullscreen management](#fullscreen-management)
Expand Down Expand Up @@ -234,6 +235,7 @@ Once rmp-vast is loaded on your page you can create a new rmp-vast instance as f
- `params.outstream: Boolean` Enables outstream ad mode. Default: false.
- `params.showControlsForVastPlayer: Boolean` Shows VAST player HTML5 default video controls. Default: false.
- `params.vastXmlInput: Boolean` Instead of a VAST URI, we provide directly to rmp-vast VAST XML. Default: false. See test/spec/inlineLinearSpec/raw-xml-input.html for an example.
- `params.enableSimid: Boolean` Enables SIMID support or not. This feature is currently in BETA. Default: false.
- `params.enableVpaid: Boolean` Enables VPAID support or not. Default: true.
- `params.vpaidSettings: Object` information required to properly display VPAID creatives - note that it is up to the parent application of rmp-vast to provide those informations - below values are default (see test/spec/vpaidSpec/ for examples):
- `params.vpaidSettings.width: Number` Default: 640.
Expand Down Expand Up @@ -271,46 +273,46 @@ rmp-vast will fire VAST-related events on the rmp-vast instance as they occur. E
```javascript
const rmpVast = new RmpVast(id, params);
rmpVast.on('adstarted', callbackA);
rmpVast.on("adstarted", callbackA);
rmpVast.loadAds(adTag);
```
You can register multiple events for the same callback, example:
```javascript
const rmpVast = new RmpVast(id, params);
rmpVast.on('adloaded adstarted', callbackA);
rmpVast.on("adloaded adstarted", callbackA);
rmpVast.loadAds(adTag);
```
You can access the name of the event being fired:
```javascript
function callbackA (event) {
function callbackA(event) {
console.log(event.type); // name of the event being fired
}
const rmpVast = new RmpVast(id, params);
rmpVast.on('adloaded adstarted adclick', callbackA);
rmpVast.on("adloaded adstarted adclick", callbackA);
rmpVast.loadAds(adTag);
```
You can unregister an event with the off method:
```javascript
rmpVast.off('adstarted', callbackA);
rmpVast.off("adstarted", callbackA);
```
You can unregister multiple events for the same callback as well:
```javascript
rmpVast.off('adloaded adstarted adclick', callbackA);
rmpVast.off("adloaded adstarted adclick", callbackA);
```
You can also register an event where the callback is only executed once:
```javascript
const rmpVast = new RmpVast(id, params);
rmpVast.one('adstarted', callbackA);
rmpVast.one("adstarted", callbackA);
rmpVast.loadAds(adTag);
```
Expand Down Expand Up @@ -513,12 +515,16 @@ Feedback is welcome. Please see ./test/spec/omWebSpec/ for implementation exampl
[Back to documentation sections](#documentation-sections)
## SIMID support
### This is a BETA feature - open an issue for bugs and improvements
[SIMID](https://interactiveadvertisingbureau.github.io/SIMID/simid-1.1.0.html) replaces VPAID for interactive creatives. With rmp-vast 12 we support SIMID as a BETA feature. We only support linear SIMID creatives for the moment. See test/simidSpec/ for an implementation example. This feature needs to be enabled with `enableSimid: true` setting.
## VPAID support
### --- DEPRECATED with rmp-vast 7 ---
### --- SIMID is meant to replace VPAID. SIMID is not yet implemented in rmp-vast. Contributions are welcomed ---
It is no secret that VPAID in the industry is a jungle and we need your help to best implement it.
Any feedback and test adTags that can improve VPAID support in rmp-vast are welcome - open an issue when needed.
Current VPAID support limitations:
Expand Down
20 changes: 18 additions & 2 deletions app/dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,27 @@
</div>
<script>
var id = 'rmp';
const params = {
showControlsForVastPlayer: true,
enableSimid: true
};
var container = document.getElementById(id);
var ADTAG;
ADTAG = 'https://www.radiantmediaplayer.com/vast/tags/test2.xml';
/*ADTAG = 'https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/simid&description_url=https%3A%2F%2Fdevelopers.google.com%2Finteractive-media-ads&sz=640x480&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=' + Date.now();*/

var rmpVast = new RmpVast(id);
/*ADTAG = 'https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinearvpaid2js&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator='+ Date.now()*/

//ADTAG = 'https://www.radiantmediaplayer.com/vast/tags/simid.xml';
//ADTAG = 'https://www.radiantmediaplayer.com/vast/tags/simid-error-interactive-creative-file.xml';
//ADTAG = 'https://www.radiantmediaplayer.com/vast/tags/simid-survey.xml';
//ADTAG = 'https://www.radiantmediaplayer.com/vast/tags/simid-selector.xml';
//ADTAG = 'https://www.radiantmediaplayer.com/vast/tags/simid-error-interactive-media-file.xml';
//ADTAG = 'https://www.radiantmediaplayer.com/vast/tags/simid-extender.xml';
//ADTAG = 'https://www.radiantmediaplayer.com/vast/tags/simid-map.xml';
//ADTAG = 'https://www.radiantmediaplayer.com/vast/tags/simid-non-linear.xml';
//ADTAG = 'https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/simid&description_url=https%3A%2F%2Fdevelopers.google.com%2Finteractive-media-ads&sz=640x480&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=' + Date.now();

var rmpVast = new RmpVast(id, params);
rmpVast.loadAds(ADTAG);
</script>
</body>
2 changes: 2 additions & 0 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ <h4>Open-source client-side JavaScript solution to load, parse and display VAST
<h4>Implementation example</h4>
<p><a href="https://github.com/radiantmediaplayer/rmp-vast">See source on GitHub</a> - a <a
href="https://www.radiantmediaplayer.com">Radiant Media Player</a> project</p>
<p>NEW: SIMID support <sup>BETA</sup> - <a href="https://github.com/radiantmediaplayer/rmp-vast/issues">feedback
is welcome!</a></p>
<div class="rmp-container" id="rmp">
<div class="rmp-content">
<video class="rmp-video" src="https://www.rmp-streaming.com/media/big-buck-bunny-360p.mp4"
Expand Down
1 change: 1 addition & 0 deletions app/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ const params = {
},
outstream: false,
showControlsForVastPlayer: true,
enableSimid: true,
enableVpaid: true,
vpaidSettings: {
width: 640,
Expand Down
Loading

0 comments on commit f4ac3f2

Please sign in to comment.