{"id":13908033,"url":"https://github.com/radiantmediaplayer/rmp-vast","last_synced_at":"2026-02-26T19:28:17.578Z","repository":{"id":20336160,"uuid":"89591470","full_name":"radiantmediaplayer/rmp-vast","owner":"radiantmediaplayer","description":"A client-side JavaScript solution to load, parse and display VAST 2, 3 \u0026 4 resources with HTML5 video","archived":false,"fork":false,"pushed_at":"2025-06-11T15:11:23.000Z","size":12518,"stargazers_count":99,"open_issues_count":6,"forks_count":35,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-01-02T04:59:37.344Z","etag":null,"topics":["ads","advertisement","html5","javascript","outstream-video-ads","vast","vast-player","video"],"latest_commit_sha":null,"homepage":"https://www.radiantmediaplayer.com/rmp-vast/app/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/radiantmediaplayer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-04-27T11:44:40.000Z","updated_at":"2025-11-03T13:26:10.000Z","dependencies_parsed_at":"2022-07-09T05:16:11.580Z","dependency_job_id":"ecfbfdd5-d849-453f-89a8-6b96de5f57d6","html_url":"https://github.com/radiantmediaplayer/rmp-vast","commit_stats":{"total_commits":167,"total_committers":1,"mean_commits":167.0,"dds":0.0,"last_synced_commit":"185ffd25e00a4fd81b17dae44c846d722b81ce4f"},"previous_names":[],"tags_count":125,"template":false,"template_full_name":null,"purl":"pkg:github/radiantmediaplayer/rmp-vast","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radiantmediaplayer%2Frmp-vast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radiantmediaplayer%2Frmp-vast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radiantmediaplayer%2Frmp-vast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radiantmediaplayer%2Frmp-vast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/radiantmediaplayer","download_url":"https://codeload.github.com/radiantmediaplayer/rmp-vast/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radiantmediaplayer%2Frmp-vast/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29868447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T18:42:30.764Z","status":"ssl_error","status_checked_at":"2026-02-26T18:41:47.936Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ads","advertisement","html5","javascript","outstream-video-ads","vast","vast-player","video"],"created_at":"2024-08-06T23:02:25.543Z","updated_at":"2026-02-26T19:28:17.566Z","avatar_url":"https://github.com/radiantmediaplayer.png","language":"JavaScript","funding_links":[],"categories":["HarmonyOS","Video Ads, VAST and CTV"],"sub_categories":["Windows Manager"],"readme":"# rmp-vast\n\nA client-side JavaScript solution to load, parse, ping and display VAST resources (advertising).\n\nIt aims at implementing the [IAB VAST specification](https://iabtechlab.com/standards/vast/) for web-based environments - e.g. browser, WebView (Ionic, Flutter, Cordova, Electron ...) \u0026 smart TV - where both HTML5 video and JavaScript are available. We support VAST 3 and VAST 4 up to VAST 4.3. VAST 2 support has been deprecated with rmp-vast 15 and we no longer test for VAST 2 tags.\n\nrmp-vast comes as a compiled library (./dist/ folder) but it can also be imported as a ES2015 module.\n\nrmp-vast makes use of [vast-client-js](https://github.com/dailymotion/vast-client-js) for fetching and parsing VAST XML resources.\n\nrmp-vast is used and maintained by [Radiant Media Player](https://www.radiantmediaplayer.com/).\n\n## Documentation sections\n\n- [Quick start guide](#quick-start-guide)\n- [Supported VAST features](#supported-vast-features)\n- [Supported environments](#supported-environments)\n- [CORS requirements](#cors-requirements)\n- [Video ads from Google Ads network and rmp-vast](#video-ads-from-google-ads-network-and-rmp-vast)\n- [Debugging](#debugging)\n- [Parameters, API events and methods](#parameters-api-events-and-methods)\n- [Companion ads support](#companion-ads-support)\n- [AdVerifications OM Web SDK](#adverifications-om-web-sdk)\n- [SIMID support](#simid-support)\n- [VPAID support (DEPRECATED)](#vpaid-support)\n- [HLS creatives support](#hls-creatives-support)\n- [Macros](#macros)\n- [Autoplay support](#autoplay-support)\n- [Fullscreen management](#fullscreen-management)\n- [Pre, mid and post rolls](#pre-mid-and-post-rolls)\n- [Outstream ads](#outstream-ads)\n- [TypeScript support](#typescript-support)\n- [Contributing](#contributing)\n- [License](#license)\n- [Radiant Media Player](#radiant-media-player)\n\n## Quick start guide\n\nFirst download latest rmp-vast package from the [release tab](https://github.com/radiantmediaplayer/rmp-vast/releases).\n\nYou must use rmp-vast in a well-formed HTML document. This means a web-page with a valid HTML5 DOCTYPE and other elements that are commonly available in today's web.\n\n- Secondly we add rmp-vast library (./dist/rmp-vast.min.js) on our page - in \u0026lt;head\u0026gt; for example.\n\n```html\n\u003cscript src=\"./dist/rmp-vast.min.js\"\u003e\n```\n\n- Then we must adhere to a specific HTML layout pattern. This pattern is as follows:\n\n```html\n\u003cdiv class=\"rmp-container\" id=\"vast-player\"\u003e\n  \u003cdiv class=\"rmp-content\"\u003e\n    \u003cvideo\n      class=\"rmp-video\"\n      src=\"https://www.rmp-streaming.com/media/big-buck-bunny-360p.mp4\"\n      playsinline\n      muted\n      controls\n    \u003e\u003c/video\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\nDo NOT rename CSS classes or alter this HTML layout. The HTML5 video tag used for content must use the src property on the HTML5 video (e.g. do not use \u0026lt;source\u0026gt; tag).\n\n- We need to explicitly set the size of div.rmp-container element, for example with CSS we could add to our page:\n\n```html\n\u003cstyle\u003e\n  .rmp-container {\n    width: 960px;\n    height: 540px;\n    margin: auto;\n  }\n\u003c/style\u003e\n```\n\n- Init the library with JavaScript:\n\n```javascript\n// our VAST tag to be displayed\nconst adTag =\n  \"https://www.radiantmediaplayer.com/vast/tags/inline-linear-1.xml\";\nconst id = \"vast-player\";\nconst params = {\n  ajaxTimeout: 5000,\n  maxNumRedirects: 10,\n  fetchOptions: {\n    headers: { \"x-api-key\": \"1234\" },\n  },\n};\n// create RmpVast instance\nconst rmpVast = new RmpVast(id, params);\n// call loadAds - this will start the ad loading process, display the ad and resume content automatically\n// in this case we use autoplay\nrmpVast.loadAds(adTag);\n\n// or if autoplay is not wanted the call to loadAds must be the result\n// of a user interaction (click, touchend ...)\n// playButton.addEventListener('click', function() {\n//   rmpVast.loadAds(adTag);\n// });\n```\n\nA complete implementation example is provided in app/index.html. You should look at app/js/app.js.\nThis example can be found live at https://www.radiantmediaplayer.com/rmp-vast/app/.\n\nAlternatively, you may also create a RmpVast instance while passing a reference to the player container. This can come in handy for some web frameworks. Note that the element must be an instanceof HTMLElement.\n\n```javascript\n// We already have a reference to the player container (e.g. element with \"rmp-container\" class)\nconst element = this.element;\n// create RmpVast instance\nconst rmpVast = new RmpVast(element, params);\n```\n\n- rmp-vast is written in ES2017 and compiled as a library with [Webpack](https://webpack.js.org/). See .browserslistrc for a list of targeted environments for the compiled library. If you want to use rmp-vast as a module (e.g. not using the compiled library), it is up to you to compile it in your project. Please refer to babel.config.js and webpack.dev.config.js for guidance.\n\n[Back to documentation sections](#documentation-sections)\n\n## Supported VAST features\n\nWe support VAST standard up to VAST 4.3, this includes:\n\n- Inline and Wrapper Ads\n- Linear Ads\n- Skippable Linear Ads\n- Linear creatives in MP4/WebM progressive download\n- Linear creatives in HLS format on all supported devices (with hls.js where MSE is available or native HLS otherwise)\n- Non Linear Ads (image/iframe/HTML)\n- Companion Ads (image/iframe/HTML)\n- Tracking Events (tracking URLs must return an image - typically a 1px GIF/PNG/JPG/AVIF)\n- Error Reporting\n- Industry Icons (image/iframe/HTML)\n- VAST 4.3 Macros\n- AdVerifications with OM Web SDK (support for Creative Access Mode e.g. full only)\n- SIMID (Linear creative only)\n- VPAID 1 and 2 JavaScript \u003csup\u003eDEPRECATED\u003c/sup\u003e\n- Outstream ads\n- Ad Pods\n- Audio Ads (MP3/M4A/HLS where natively supported) in HTML5 video\n- ViewableImpression, Universal Ad ID, AdServingId, Survey and Ad Categories\n\n### Currently unsupported features\n\n- VMAP\n\n[Back to documentation sections](#documentation-sections)\n\n## Supported environments\n\n### rmp-vast compiled library (./dist/rmp-vast.min.js)\n\n#### Browsers\n\n- Latest Chrome for Android 6+\n- Chrome 55+ for Desktop\n- Latest Firefox for Android 6+\n- Firefox 53+ for Desktop\n- Opera 42+ for Desktop\n- Samsung Internet 9.2+ for Android 6+\n- Safari 12+ for Desktop\n- Safari for iOS 12+ and iPadOS 13+\n- MS Edge 79+ for Desktop\n- MS Edge Legacy 15+ for Desktop\n\nDesktop means Windows 7+, macOS 10.11+, Linux (latest LTS Ubuntu).\n\n#### WebViews (Ionic, Flutter, Cordova, WebView created from native code)\n\n- Android 6+\n- iOS 12+ (WKWebView)\n\nWith the announcement of Apple in december 2019, to remove support for UIWebView API by end 2020, we only support WKWebView API for iOS apps built with Ionic, Flutter, Cordova or WebView created from native code. [See this blog post](https://www.radiantmediaplayer.com/blog/updating-ios-apps-for-wkwebview.html) to help you update to WKWebView API.\n\nFor Flutter apps we support using rmp-vast with [webview_flutter](https://pub.dev/packages/webview_flutter) plugin. See a guide for adding WebView to your [Flutter app here](https://codelabs.developers.google.com/codelabs/flutter-webview).\n\n#### Smart TV \u0026 OTT (Native web, Cordova or WebView created from native code)\n\n- Samsung Tizen 4+ apps\n- LG webOS 4+ apps\n- Electron 6+ apps\n- Android TV 9+ apps with Cordova or WebView created from native code\n\n[Back to documentation sections](#documentation-sections)\n\n## CORS requirements\n\nrmp-vast uses JavaScript XMLHttpRequests to load VAST tags. Hence proper [CORS configuration](https://enable-cors.org/) is required on your ad-server in order for rmp-vast to be able to retrieve VAST tags. Refer to this [Google documentation](https://developers.google.com/interactive-media-ads/docs/sdks/html5/cors) for more information.\n\n[Back to documentation sections](#documentation-sections)\n\n## Video ads from Google Ads network and rmp-vast\n\nWhen serving ads from Google Ads network (DFP, ADX, AdSense for Video) we recommend using [Google IMA HTML5 SDK](https://developers.google.com/interactive-media-ads/docs/sdks/html5/). Radiant Media Player supports [Google IMA HTML5 SDK](https://www.radiantmediaplayer.com/docs/latest/video-ads-documentation.html) and is a certified [Google's video technology partner](https://support.google.com/admanager/answer/186110?hl=en). rmp-vast can display VAST ads from Google Ads network as well - though all features from Google Ads network may not be available.\n\n[Back to documentation sections](#documentation-sections)\n\n## Debugging\n\nrmp-vast compiled library (./dist/rmp-vast.min.js) does not print any log to the console. If you want those logs for debugging purposes please use ./dist/rmp-vast.js instead\n\n[Back to documentation sections](#debugging)\n\n## Parameters, API events and methods\n\nSource code for rmp-vast is available for review in ./src/ folder. Code comments should be available at key points to better understand rmp-vast inner workings.\n\n### Parameters when creating a rmp-vast instance\n\nOnce rmp-vast is loaded on your page you can create a new rmp-vast instance as follows:\n\n`new RmpVast(id: String, params: Object)`\n\n- `idOrElement: String|HTMLElement` the id or element for the player container. This is a required parameter.\n- `params: Object` is an optional object representing various parameters that can be passed to a rmp-vast instance and that will affect the player inner-workings. Available properties for the params object follow:\n  - `params.ajaxTimeout: Number` timeout in ms for an AJAX request to load a VAST tag from the ad server. Default 5000.\n  - `params.creativeLoadTimeout: Number` timeout in ms to load linear media creative from the server. Default 8000.\n  - `params.ajaxWithCredentials: Boolean` AJAX request to load VAST tag from ad server should or should not be made with credentials. Default: false.\n  - `params.fetchOptions: Object` Additional options to pass to the fetch request, like headers, cache, etc... Default: {}.\n  - `params.maxNumRedirects: Number` the number of VAST wrappers the player should follow before triggering an error. Default: 4. Capped at 30 to avoid infinite wrapper loops.\n  - `params.labels: Object` labels used to display information to the viewer.\n  - `params.labels.skipMessage: String` skip message. Default: 'Skip ad'.\n  - `params.labels.closeAd: String` close ad message. Default: 'Close ad'.\n  - `params.labels.textForInteractionUIOnMobile: String` on mobile devices the click-through URL for a linear ad is provided in a box located at the top right corner of the player. This setting set the text for this box. Default: 'Learn more'.\n  - `params.outstream: Boolean` Enables outstream ad mode. Default: false.\n  - `params.showControlsForAdPlayer: Boolean` Shows ad player HTML5 default video controls. Default: false.\n  - `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.\n  - `params.enableSimid: Boolean` Enables SIMID support or not. Default: true.\n  - `params.enableVpaid: Boolean` DEPRECATED. Enables VPAID support or not. Default: true.\n  - `params.vpaidSettings: Object` DEPRECATED. Information required to properly display VPAID creatives - note that it is up to the parent application of rmp-vast to provide those information - below values are default (see test/spec/vpaidSpec/ for examples):\n    - `params.vpaidSettings.width: Number` Default: 640.\n    - `params.vpaidSettings.height: Number` Default: 360.\n    - `params.vpaidSettings.viewMode: String` Default: 'normal'. Can be 'fullscreen' as well.\n    - `params.vpaidSettings.desiredBitrate: Number` Default: 500. In kbps.\n  - `params.useHlsJS: Boolean` Enables rendering of HLS creatives with hls.js in rmp-vast. Default: true.\n  - `params.debugHlsJS: Boolean` Enables debugging of HLS creatives with hls.js in rmp-vast. Default: false.\n  - `params.debugRawConsoleLogs: Boolean` Enables raw debug console log for Flutter apps and legacy platforms. Default: false.\n  - `params.omidSupport: Boolean` Enables OMID (OM Web SDK) support in rmp-vast. Default: false. Refer to the [AdVerifications OM Web SDK](#adverifications-om-web-sdk) section for more information.\n  - `params.omidAllowedVendors: Array` List of allowed vendors for ad verification. Vendors not listed will be rejected. Default: [].\n  - `params.omidRunValidationScript: Boolean` Allows to run OM Web SDK inside rmp-vast to run against IAB [validation-verification-script](https://interactiveadvertisingbureau.github.io/Open-Measurement-SDKJS/validation.html). Default: false.\n  - `params.omidAutoplay: Boolean` The content player will autoplay or not. The possibility of autoplay is not determined by rmp-vast, this information needs to be passed to rmp-vast ([see this script for example](https://github.com/video-dev/can-autoplay)). Default: false (means a click to play is required).\n  - `params.macros: Map` values for Macros to be used by rmp-vast for ping URLs (for those not handled automatically by rmp-vast).\n  - `params.partnerName: String` partnerName for OMID. Default: 'rmp-vast'.\n  - `params.partnerVersion: String` partnerVersion for OMID. Default: latest rmp-vast version.\n\n[Back to documentation sections](#documentation-sections)\n\n### Starting the rmp-vast player\n\nIt is important for the rmp-vast instance to be properly initialized to avoid playback issues.\n\nPlaying video ads in HTML5 video is a non-trivial process that requires the overlaying of multiple video tags. On mobile devices a user interaction is required to properly initialized a video tag and various restrictions are set by OSes to limit manipulation of a video tag with JavaScript.\n\nTo sum up: use the rmp-vast API `loadAds()` method to start playback. On mobile devices this should be the result of a direct user interaction. You can also use muted autoplay to start playback. Refer to the [autoplay](#autoplay-support) section.\n\nIf you do not want to call `loadAds()` method directly - call `initialize()` method (as a result of a user interaction) then call `loadAds()` later on when you wish to load a VAST tag.\n\n[Back to documentation sections](#documentation-sections)\n\n### API events\n\nrmp-vast will fire VAST-related events on the rmp-vast instance as they occur. Events are registered with the `on` method applied to the rmp-vast instance (`rmpVast` as shown above). They are unregistered with the `off` method. Example:\n\n```javascript\nconst rmpVast = new RmpVast(id, params);\nrmpVast.on(\"adstarted\", callbackA);\nrmpVast.loadAds(adTag);\n```\n\nYou can register multiple events for the same callback, example:\n\n```javascript\nconst rmpVast = new RmpVast(id, params);\nrmpVast.on(\"adloaded adstarted\", callbackA);\nrmpVast.loadAds(adTag);\n```\n\nYou can access the name of the event being fired:\n\n```javascript\nfunction callbackA(event) {\n  console.log(event.type); // name of the event being fired\n}\nconst rmpVast = new RmpVast(id, params);\nrmpVast.on(\"adloaded adstarted adclick\", callbackA);\nrmpVast.loadAds(adTag);\n```\n\nYou can unregister an event with the off method:\n\n```javascript\nrmpVast.off(\"adstarted\", callbackA);\n```\n\nYou can unregister multiple events for the same callback as well:\n\n```javascript\nrmpVast.off(\"adloaded adstarted adclick\", callbackA);\n```\n\nYou can also register an event where the callback is only executed once:\n\n```javascript\nconst rmpVast = new RmpVast(id, params);\nrmpVast.one(\"adstarted\", callbackA);\nrmpVast.loadAds(adTag);\n```\n\nAvailable events are:\n\n- `adloaded`\n- `addurationchange`\n- `adclick`\n- `adclosed`\n- `adimpression`\n- `adcreativeview`\n- `adcollapse`\n- `adstarted`\n- `adtagloaded`\n- `adprogress`\n- `adviewable`\n- `adviewundetermined`\n- `adinitialplayrequestfailed`\n- `adinitialplayrequestsucceeded`\n- `adpaused`\n- `adresumed`\n- `adtagstartloading`\n- `advolumemuted`\n- `advolumeunmuted`\n- `advolumechanged`\n- `adskipped`\n- `adskippablestatechanged`\n- `adfirstquartile`\n- `admidpoint`\n- `adthirdquartile`\n- `adcomplete`\n- `adplayerexpand`\n- `adplayercollapse`\n- `adfullscreen`\n- `adexitfullscreen`\n- `adiconclick`\n- `aderror`\n- `addestroyed`\n- `adpodcompleted`\n- `adtrackingcomplete`\n- `adtrackingeventsloaded` (return all tracking events specified in the VAST response after it has been parsed)\n\nThe `adinitialplayrequestfailed` event tells if the ad (or content in case of non-linear creatives) player was able to play on first attempt. Typically this event will fire when autoplay is requested but blocked by an interference engine (macOS Safari 11+, Chrome 66+, browser extensions ...). If the initial play request was a success, the `adinitialplayrequestsucceeded` event will fire.\n\nVPAID (DEPRECATED) related events:\n\n- `adlinearchange`\n- `adsizechange`\n- `adexpandedchange`\n- `adremainingtimechange`\n- `adinteraction`\n- `aduseracceptinvitation`\n- `adcollapse`\n\n[Back to documentation sections](#documentation-sections)\n\n### API methods\n\nOnce a rmp-vast instance is created you can query the API methods to interact with the player. Example:\n\n```javascript\nconst rmpVast = new RmpVast(id);\n...\nrmpVast.pause();\n...\nrmpVast.volume = 0.5;\n```\n\nFor linear ads rmp-vast exposes 2 players: a content player (for the actual content) and a ad player (for the loaded ad).\n\n**API methods**\n\n- `play()`: play content or ad player depending on what is on stage.\n- `pause()`: pause content or ad player depending on what is on stage.\n- `loadAds(vastUrl: String, regulationsInfo: Object, requireCategory: Boolean)`: load a new VAST tag and start displaying it - if rmp-vast is not initialized when loadAds is called then `initialize()` is called first. Input parameters are\n  - `vastUrl: String` the URI to the VAST resource to be loaded\n  - `regulationsInfo: Object` data for regulations as\n    - `regulationsInfo.regulations: String` coppa|gdpr for REGULATIONS macro\n    - `regulationsInfo.limitAdTracking: String` 0|1 for LIMITADTRACKING macro\n    - `regulationsInfo.gdprConsent: String` Base64-encoded Cookie Value of IAB GDPR consent info for GDPRCONSENT macro\n  - `requireCategory: Boolean` for enforcement of VAST 4 Ad Categories\n- `initialize()`: initialize rmp-vast - this method can be used in case of deferred use of `loadAds()` - Note that when autoplay is not wanted the call to `initialize()` must be the result of a direct user interaction.\n- `stopAds()`: stop playing the ad on stage. You may call loadAds again after invoking stopAds.\n- `destroy()`: stop playing the ad on stage and destroy the current RmpVast instance. You may not call loadAds again after invoking destroy, you will need to create a new RmpVast instance.\n- `skipAd()`: skips the creative on stage - this method only has effects if the creative on stage is a skippable ad and can be skipped (e.g. `adSkippableState` returns true).\n\n**API methods getter|setter**\n\nThe following getter|setter should be queried after the `adstarted` event has fired:\n\n- `adPaused`: getter-only returns `Boolean`, stating if the ad on stage is paused or not.\n- `volume`: getter returns `Number`, volume of (content|ad) player. Returned value is a number between 0 and 1. -1 is returned if this value is not available | setter sets volume of (content|ad) player.\n- `muted`: getter returns `Boolean`, the mute state of (content|ad) player | setter sets (content|ad) player mute state.\n- `adTagUrl`: getter-only returns `String`, representing the current VAST tag URL.\n- `adOnStage`: getter-only returns `Boolean`, stating if an ad is currently on stage.\n- `initialized`: getter-only returns `Boolean`, stating if rmp-vast has been initialized.\n- `adMediaUrl`: getter-only returns `String`, representing the selected creative URL.\n- `adLinear`: getter-only returns `Boolean`, representing the type of the selected creative either linear (true) or non linear (false).\n- `adSystem`: getter-only returns `{value: String, version: String}`, representing the VAST AdSystem tag.\n- `adUniversalAdIds`: getter-only returns `[{idRegistry: String, value: String}]`, representing the VAST UniversalAdId tag.\n- `adContentType`: getter-only returns `String`, representing the MIME type for the selected creative.\n- `adTitle`: getter-only returns `String`, representing the VAST AdTitle tag.\n- `adDescription`: getter-only returns `String`, representing the VAST Description tag.\n- `adAdvertiser`: getter-only returns `{id: String, value: String}`, representing the VAST Advertiser tag.\n- `adPricing`: getter-only returns `{value: String, model: String, currency: String}`, representing the VAST Pricing tag.\n- `adSurvey`: getter-only returns `String`, representing the VAST Survey tag.\n- `adAdServingId`: getter-only returns `String`, representing the VAST AdServingId tag.\n- `adCategories`: getter-only returns `{authority: String, value: String}[]`, representing the VAST Category tag.\n- `adBlockedAdCategories`: getter-only returns `{authority: String, value: String}[]`, representing the VAST BlockedAdCategories tag.\n- `adDuration`: getter-only returns `Number` in ms, representing the duration of the selected linear creative. -1 is returned if this value is not available.\n- `adCurrentTime`: getter-only returns `Number` in ms, representing the current timestamp in the selected linear creative. -1 is returned if this value is not available.\n- `adRemainingTime`: getter-only returns `Number` in ms, representing the current time remaining in the selected linear creative. -1 is returned if this value is not available.\n- `adMediaWidth`: getter-only returns `Number`, representing the width of the selected creative. -1 is returned if this value is not available.\n- `adMediaHeight`: getter-only returns `Number`, representing the height of the selected creative. -1 is returned if this value is not available.\n- `clickThroughUrl`: getter-only returns `String`, representing the click-through (e.g. destination) URL for the selected creative.\n- `isSkippableAd`: getter-only returns `Boolean`, stating if the loaded linear ad is a VAST skippable ad - can be queried when adloaded event fires.\n- `skipTimeOffset`: getter-only returns `Number` giving the skip offset when a skippable ad is displayed.\n- `adSkippableState`: getter-only returns `Boolean`, stating if the creative on stage can be skipped or not.\n- `contentPlayerCompleted`: getter returns `Boolean` | setter sets the contentPlayerCompleted state of the player. This is used when source of content player changes and we need to explicitly reset contentPlayerCompleted internal value so that content can resume as expected on next ad load.\n\nAdditional AdPod-related methods\n\n- `adPodInfo`: getter-only return `{adPodCurrentIndex: Number, adPodLength: Number}` giving information about the currently playing pod.\n\nAdditional VPAID-related methods\n\n- `resizeAd(width: Number, height: Number, viewMode: String)`: resizes the VPAID creative based on `width`, `height` and `viewMode`. viewMode should be either 'normal' or 'fullscreen'.\n- `expandAd()`: expands the VPAID creative on stage.\n- `collapseAd()`: collapses the VPAID creative on stage.\n- `adExpanded`: getter-only return `Boolean`, stating if the VPAID creative on stage is expanded or not.\n- `vpaidCompanionAds`: getter-only return `String`, providing ad companion details in VAST 3.0 format for the `\u003cCompanionAds\u003e` element.\n\nThe following methods should be queried after the `aderror` event has fired:\n\n- `adErrorMessage`: getter-only return `String`, representing the error message for the current error.\n- `adVastErrorCode`: getter-only return `Number`, representing the VAST error code for the current error. -1 is returned if this value is not available.\n- `adErrorType`: getter-only return `String`, representing the detected ad error type, possible values: 'adLoadError', 'adPlayError' or '' (if unknown error type).\n\nThe following methods provide context information for the rmp-vast instance:\n\n- `environment`: getter-only return `Object`, data about the environment that rmp-vast runs into.\n- `adPlayer`: getter-only return `HTMLMediaElement|null`, the ad player video tag.\n- `contentPlayer`: getter-only return `HTMLMediaElement|null`, the content player video tag.\n\n[Back to documentation sections](#documentation-sections)\n\n## Companion ads support\n\nWe support StaticResource, IFrameResource and HTMLResource in Companion tags.\n\nWe also support AltText, CompanionClickThrough, CompanionClickTracking, TrackingEvents tags in Companion tags.\n\nWe support \"required\" attribute for CompanionAds tag as well as \"adSlotId\" attribute for Companion tag.\n\nWe also support CompanionAds in wrappers/redirects (The CompanionAds nearer to the final linear creative will be selected).\n\nSee ./test/spec/companionSpec/ for examples of implementation.\n\nThe following methods must be queried when the `adstarted` event fires.\n\n- `getCompanionAdsList(width: Number, height: Number)`: return `Object[]`. Each Object in the Array represents a companion ad. Input `width` and `height` parameters are used to select companion ads based on available width and height for display. Each companion ad Object is represented as:\n\n```javascript\n{\n  adSlotId: \"RMPSLOTID-1\",\n  altText: \"Radiant Media Player logo\",\n  companionClickThroughUrl: \"https://www.radiantmediaplayer.com\",\n  companionClickTrackingUrl: \"https://www.radiantmediaplayer.com/vast/tags/ping.gif?creativeType=companion\u0026type=companionClickTracking\",\n  height: 250,\n  imageUrl: \"https://www.radiantmediaplayer.com/vast/mp4s/companion.jpg\",\n  trackingEventsUri: [\n    \"https://www.radiantmediaplayer.com/vast/tags/ping.gif?creativeType=companion\u0026type=creativeView\",\n    \"https://www.radiantmediaplayer.com/vast/tags/ping.gif?creativeType=companion\u0026type=creativeViewTwo\"\n  ],\n  width: 300\n}\n```\n\nNot all fields may be available, so check availability before usage.\n\n- `getCompanionAd(index: Number)`: return `HTMLElement|null` representing the companion ad. It takes a `Number` index parameter which represents the index of the wanted companion ad in the Array returned from `getCompanionAdsList` method. This method automates the required pinging for companion ads. Usage example:\n\n```javascript\nrmpVast.on(\"adstarted\", function () {\n  // we need to call getCompanionAdsList BEFORE calling getCompanionAd so that\n  // rmp-vast can first create a collection of available companion ads based on getCompanionAdsList\n  // input parameters\n  const list = rmpVast.getCompanionAdsList(900, 750);\n  if (list \u0026\u0026 list.length === 3) {\n    const img = rmpVast.getCompanionAd(2);\n    if (img) {\n      // we get our companion ad image and we can append it to DOM now\n      // VAST trackers will be called automatically when needed\n      const companionId = document.getElementById(\"companionId\");\n      companionId.appendChild(img);\n    }\n  }\n});\n```\n\n- `companionAdsRequiredAttribute`: getter-only return a `String` representing the \"required\" attribute for CompanionAds tag. Value can be all, any, none or an empty String when this attribute is not defined. See section 2.3.3.4 of VAST 3 specification for more information.\n\n[Back to documentation sections](#documentation-sections)\n\n## AdVerifications OM Web SDK\n\nrmp-vast supports AdVerifications through the [IAB OM Web SDK](https://iabtechlab.com/standards/open-measurement-sdk/). Our implementation is based on IAB GitHub [Open-Measurement-JSClients](https://github.com/InteractiveAdvertisingBureau/Open-Measurement-JSClients) and sports OM Web SDK version 1.4.12\n\n- This feature needs to be activated through `omidSupport: true` setting\n- You need to add ./externals/omweb-js-X.X.X/Service/omweb-v1.js and ./externals/omweb-js-X.X.X/Session-Client/omid-session-client-v1.js to your page through a script tag\n- Note that we currently only support Creative Access Mode (e.g. full)\n\nFeedback is welcome. Please see ./test/spec/omWebSpec/ for implementation examples.\n\n[Back to documentation sections](#documentation-sections)\n\n## SIMID support\n\n### As SIMID is a new format in the industry, feedback is welcome - open a PR/issue for bugs and improvements\n\n[SIMID](https://interactiveadvertisingbureau.github.io/SIMID/simid-1.1.0.html) replaces VPAID for interactive creatives. We only support linear SIMID creatives for the moment. See test/simidSpec/ for an implementation example. This feature is enabled by default but can be turned off with `enableSimid: false` setting.\n\n## VPAID support\n\n### --- DEPRECATED with rmp-vast 7 ---\n\nCurrent VPAID support limitations:\n\n- supports only linear VPAID\n- no support for changes in linearity (likely to cause playback issues)\n\n[Back to documentation sections](#documentation-sections)\n\n## HLS creatives support\n\nWe support linear creatives in HLS format on all supported devices for rmp-vast. This is made possible thanks to the [hls.js project](https://github.com/video-dev/hls.js). Make sure to add ./externals/hls/hls.min.js to your page and enable this feature with `useHlsJS: true` setting. See ./test/spec/inlineLinearSpec/hls-creative.html for an example.\n\n[Back to documentation sections](#documentation-sections)\n\n## Macros\n\nrmp-vast supports most [VAST 4.3 macros](https://interactiveadvertisingbureau.github.io/vast/vast4macros/vast4-macros-latest.html) automatically. There are however macros that need to be set explicitly or that are not currently supported by rmp-vast. You can pass values for those macros with the `macros` setting (they will be replaced by rmp-vast for ping URLs). Example:\n\n```javascript\nconst id = \"vast-player\";\nconst macrosMap = new Map();\nmacrosMap.set(\"CLIENTUA\", encodeURIComponent(\"MyPlayer/1.0 rmp-vast/15.0.0\"));\nmacrosMap.set(\"PLAYBACKMETHODS\", 2);\nconst params = {\n  showControlsForAdPlayer: true,\n  macros: macrosMap,\n};\nconst rmpVast = new RmpVast(id, params);\nrmpVast.loadAds(\"your-ad-tag-url\");\n```\n\nMacros that need to be set explicitly if you want to support them: CONTENTCAT, GPPSECTIONID, GPPSTRING, PLAYBACKMETHODS, STOREID, STOREURL, BREAKMAXADLENGTH, BREAKMAXADS, BREAKMAXDURATION, BREAKMINADLENGTH, PLACEMENTTYPE, TRANSACTIONID, CLIENTUA, DEVICEIP, IFA, IFATYPE, LATLONG, SERVERUA, APPBUNDLE, EXTENSIONS, OMIDPARTNER, VERIFICATIONVENDORS, CONTENTID, CONTENTURI, INVENTORYSTATE.\n\n## Autoplay support\n\nThis is done by simply calling `loadAds` method on page load (after HTML5 content video player is in DOM and rmp-vast library is loaded and instantiated). In many environments, only muted autoplay is available (iOS, Android, Desktop Chrome 66+ and Desktop Safari 11+), so add the `muted` attribute on the HTML5 content video player.\n\n[Back to documentation sections](#documentation-sections)\n\n## Fullscreen management\n\nrmp-vast supports fullscreen for the global player (e.g. content + ad players) but there is an extra layer to add to your application. See the ./app/js/app.js file around line 25 for an example of implementation.\n\n[Back to documentation sections](#documentation-sections)\n\n## Pre, mid and post rolls\n\nrmp-vast can handle pre/mid/post rolls ad breaks through the loadAds API method. See ./test/spec/apiSpec/pre-mid-post-roll.html for an example.\n\n[Back to documentation sections](#documentation-sections)\n\n## Outstream ads\n\nrmp-vast supports displaying outstream ads when parameter `outstream` is set to true. For an implementation example see ./test/spec/outstreamSpec/Simple.html.\n\n[Back to documentation sections](#documentation-sections)\n\n## TypeScript support\n\nMake sure to include ./types folder in your TypeScript configuration file and you can start using rmp-vast in a TypeScript environment. Note: the resulting .d.ts files are generated from JavaScript using JSDoc syntax.\n\n## Contributing\n\nContributions are welcome. Please review general code structure and stick to existing patterns.\nProvide test where appropriate (see ./test folder). Tests are written with Jasmine and automated with [selenium web driver](https://github.com/SeleniumHQ/selenium) and are validated in latest webdriver for Chrome and Firefox for Windows 11. Additionally we test on latest Chrome for Android and latest macOS and iOS Safari.\n\nTo develop rmp-vast do install it (you need to have node.js installed globally):\n\n`git clone https://github.com/radiantmediaplayer/rmp-vast.git`\n\n`npm install`\n\nMake changes to code and then run:\n\n`npm run dev`\n\nWhen your changes are ready for commit, build rmp-vast:\n\n`npm run build`\n\nBefore committing for a pull request - run test:\n\n`npm run test:patch`\n\nMake sure the ctrf-chrome.json file in report/v${version} has all test passed - test manually for false negative.\nAlso note we test on Safari for macOS and Chrome for Android. Some more advanced tests require manual verification and are located in test/spec/manualSpec/ and should be run in latest Chrome for Windows|macOS|Linux.\n\n[Back to documentation sections](#documentation-sections)\n\n## License\n\nrmp-vast is released under MIT.\n\n[Back to documentation sections](#documentation-sections)\n\n## Radiant Media Player\n\nIf you like rmp-vast you can check out [Radiant Media Player](https://www.radiantmediaplayer.com) - A Modern Go-everywhere HTML5 Video Player - Create web, mobile \u0026 OTT video apps in a snap.\n\nRadiant Media Player is a commercial HTML5 media player, not covered by rmp-vast MIT license.\n\nYou may request a free trial for Radiant Media Player at: [https://www.radiantmediaplayer.com/free-trial.html](https://www.radiantmediaplayer.com/free-trial.html).\n\n[Back to documentation sections](#documentation-sections)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradiantmediaplayer%2Frmp-vast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fradiantmediaplayer%2Frmp-vast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradiantmediaplayer%2Frmp-vast/lists"}