{"_id":"@dailymotion/vmap","_rev":"8-ea24b673e76f9a9da1765c7fe682bdeb","name":"@dailymotion/vmap","dist-tags":{"latest":"3.3.3"},"versions":{"3.3.0":{"name":"@dailymotion/vmap","version":"3.3.0","keywords":["vmap","ad","advertising","iab","in-stream","video"],"author":{"url":"https://developer.dailymotion.com/","name":"Dailymotion","email":"vast-client@dailymotion.com"},"license":"MIT","_id":"@dailymotion/vmap@3.3.0","maintainers":[{"name":"dm-npm","email":"github@dailymotion.com"},{"name":"ztaifour","email":"zacharie.taifour@dailymotion.com"},{"name":"rumeshm","email":"rumeshm@gmail.com"}],"homepage":"https://github.com/dailymotion/vmap-js#readme","bugs":{"url":"https://github.com/dailymotion/vmap-js/issues"},"dist":{"shasum":"03a3be8544407f609183afff1b71638ba0fab3c7","tarball":"https://registry.npmjs.org/@dailymotion/vmap/-/vmap-3.3.0.tgz","fileCount":27,"integrity":"sha512-g/+nbBK+1ICPx6WOt5dmJCJ1H0HrrLCWs57IzHzYjBs1frOceh53BWaqK99l8MrF9akOWeVtVh30e0oWNbk4Ew==","signatures":[{"sig":"MEUCIQCnGGP8eZo5+KE67iWCCaYbYr/OkaJVGJp7pTgzMMqmHAIgb4Yya/8UGzNFSOk9/fRyuMZbSPpVOEHudW3zyzBOxrU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39499,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzeqzCRA9TVsSAnZWagAAUSAP/AsxBIh7iXXUvf0U7op3\nuuZkYJju1L3PqzGrbQ65NZKSb/hpZXqGq4Xz5nvsADrYTdRDYoEscGsByZdZ\njCkx96OXK/SqeV4ZLnTLdAsKcNfOHoUgf4d2DzsMmsOquU/33ti8X1F6JiJq\nDJS0eQtIkTcqDQ7pEibB9F6E/eoVRfiWWuBbZIQabvqpy9BE31XOMQ/zKHM0\n5MKWni8bZeyLyh4MCjtxeIs8W0BW2o9d4u/I/SCN5cLQZ587lrAFiNc2EOQ0\n1WO1hSzx1DGUIz1rTTVabDNlkYRbkkwdzp+rFns6GDnLaaOoZQD2dxFYgjXY\n1YYoNd6QWE3QJ8H8b6O5qRrZvG3jJ7Ppg+V+KqtwUxD4b3ogLZlLbzEEPuVc\nIyCeToYOu+Ql+N+5V6aQOKhFM6I7kBc6RpSMZmVTMdqfAkRSYcXVdMt0JBDC\n2+tXgX4qXsKCkSBfUngeHR+qkuNjH9h+sIKOD/UfFXuAGYmxPw5d1oghgQLZ\n7e5iEpy7CR4IBgMKcdUAuxFutR0yc1ZcCpZc5jfgPp3DWq/nMkBgwtccVqzX\n2hDGpAdYS0WjMktTNuiphsoDUxhouJ5zMwjW6eN1XDwBed1k+Hcx3E+bXkq2\nHqrF9WsofcDpmq8lm6CBVsHrqUwSxAQxw6esE92bRPLz4ptsZv1j+oHgL9Ee\ne0X+\r\n=M8x3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/vmap-js-node.js","module":"src/index.js","engines":{"node":">=8.9.4"},"gitHead":"688ea71f605f6a31467f12ba87cfa87ad8968da8","scripts":{"dev":"rollup -c rollup.config.js --watch","lint":"eslint --fix . && prettier --write \"**/*.js\"","test":"jasmine","build":"rollup -c rollup.config.js","precommit":"eslint --fix . && pretty-quick --staged"},"_npmUser":{"name":"ztaifour","email":"zacharie.taifour@dailymotion.com"},"repository":{"url":"git+https://github.com/dailymotion/vmap-js.git","type":"git"},"_npmVersion":"6.14.8","description":"Javascript VMAP Parser","directories":{},"_nodeVersion":"14.15.1","_hasShrinkwrap":false,"devDependencies":{"path":"^0.12.7","husky":"^4.3.6","eslint":"^7.17.0","rollup":"^2.35.1","xmldom":"github:xmldom/xmldom#0.7.0","jasmine":"^3.6.3","prettier":"2.2.1","@babel/core":"^7.12.10","babel-eslint":"^10.1.0","pretty-quick":"^3.1.0","@babel/register":"^7.12.10","@babel/preset-env":"^7.12.11","rollup-plugin-babel":"^4.3.3","eslint-plugin-import":"^2.22.1","rollup-plugin-terser":"^7.0.2","eslint-plugin-no-for-of-loops":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/vmap_3.3.0_1632236943520_0.11508083817227477","host":"s3://npm-registry-packages"}},"3.3.1":{"name":"@dailymotion/vmap","version":"3.3.1","keywords":["vmap","ad","advertising","iab","in-stream","video"],"author":{"url":"https://developer.dailymotion.com/","name":"Dailymotion","email":"vast-client@dailymotion.com"},"license":"MIT","_id":"@dailymotion/vmap@3.3.1","maintainers":[{"name":"dm-npm","email":"github@dailymotion.com"},{"name":"ztaifour","email":"zacharie.taifour@dailymotion.com"},{"name":"rumeshm","email":"rumeshm@gmail.com"}],"homepage":"https://github.com/dailymotion/vmap-js#readme","bugs":{"url":"https://github.com/dailymotion/vmap-js/issues"},"dist":{"shasum":"d12b477426e3a584e3d73fba9ed4614982122798","tarball":"https://registry.npmjs.org/@dailymotion/vmap/-/vmap-3.3.1.tgz","fileCount":27,"integrity":"sha512-0+JbHbK/ePKtQYAyrZWr7q/ec2hA355hOm5qwlNUt175ml6IBqKsSSjpz9cLe+0sYCKZGega7ED6gc+uoR5pbQ==","signatures":[{"sig":"MEUCIBJQl/lb9v/M/5KZ8/iPqep7Ana+/ZTzgCFd1RGcb1VtAiEAgnPXLjGRjuC0R6qa1MzP54xc4MQuTEVZrds47jR/Lbw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSWCwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpcnw//WPSEOnwfJgysKDqNm+tn7Tap/c+mBy8Gif2SpCH3fsbTbnCn\r\nFRCd4zmkrUvCBozZ2UyoHGf7WbHCdEZcUm5AlUa3oKmAxIqkvOZGGmlgHJTr\r\nXQuuOlrN+LAi7jmjlvvpK0KN4F/h1r6Caau+pJqqNZazXGkxNJoSNtHbBUpV\r\ndVHec8co1Tv8nlbiKh0J3O3R/uxPMqIQ1Wy0IF+n8/vvhDLc1a/ShiZvSkn0\r\nS/8oNUK5Etwxa3JIpf+o4h/ueb7RGRWXzk1bsdFxso+EnIkUr72OqOoULXpD\r\n/kMZXu+sRsJSVdgmxWjWy+c1ujTBJB7OAwvCQPWMUdFFEjSeOs0p3hsiUz0f\r\nS8rckDIp+aEqzwx8pO7cibeXVOXtmSMIF6NWhyRFvYrLCz9kG87IAmSz3t7M\r\nFdeWOQzdsSZAKp0cqkvlw94n+5E8uiM2cy4/PfU7k6rHJvL9MWiW3/o+Yl/E\r\nXJ/ultVevXyHNULKzxFD580u/90+3Vp8+gfwMMvrP2yxMIrTSJfGHBDLmqR/\r\n65K1/53epR/UIl+vyestW53i8d/2wxxGfknlxvVm2viN1+2AkoynUsswghiH\r\nsZxKslGqfn7AbUDWp3Xg3I6n0Sl/aMoUy5VJ1dZR5x25kNx8YzdyKdVZTMm1\r\nsTjaJm3hByF9aXZdoAc6oaBAmZ5gVF6Lins=\r\n=LR4i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/vmap-js-node.js","module":"src/index.js","engines":{"node":">=12.22.1"},"gitHead":"e7699083b769fd1c8f070dd9050562a568a8213e","scripts":{"dev":"rollup -c rollup.config.js --watch","lint":"eslint --fix . && prettier --write \"**/*.js\"","test":"jest","build":"rollup -c rollup.config.js","precommit":"eslint --fix . && pretty-quick --staged"},"_npmUser":{"name":"ztaifour","email":"zacharie.taifour@dailymotion.com"},"repository":{"url":"git+https://github.com/dailymotion/vmap-js.git","type":"git"},"_npmVersion":"8.19.2","description":"Javascript VMAP Parser","directories":{},"_nodeVersion":"16.15.1","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","path":"^0.12.7","husky":"^4.3.6","eslint":"^7.32.0","rollup":"^2.35.1","xmldom":"github:xmldom/xmldom#0.7.0","prettier":"2.2.1","@babel/core":"^7.19.3","pretty-quick":"^3.1.0","@babel/register":"^7.12.10","@babel/preset-env":"^7.12.11","@babel/eslint-parser":"^7.19.1","@rollup/plugin-babel":"^6.0.0","eslint-plugin-import":"^2.22.1","rollup-plugin-terser":"^7.0.2","eslint-plugin-no-for-of-loops":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/vmap_3.3.1_1665753263807_0.5450385812313665","host":"s3://npm-registry-packages"}},"3.3.2":{"name":"@dailymotion/vmap","version":"3.3.2","keywords":["vmap","ad","advertising","iab","in-stream","video"],"author":{"url":"https://developer.dailymotion.com/","name":"Dailymotion","email":"vast-client@dailymotion.com"},"license":"MIT","_id":"@dailymotion/vmap@3.3.2","maintainers":[{"name":"dm-npm","email":"github@dailymotion.com"},{"name":"ztaifour","email":"zacharie.taifour@dailymotion.com"},{"name":"rumeshm","email":"rumeshm@gmail.com"},{"name":"clementfrancon","email":"clement.francon@dailymotion.com"}],"homepage":"https://github.com/dailymotion/vmap-js#readme","bugs":{"url":"https://github.com/dailymotion/vmap-js/issues"},"dist":{"shasum":"a8a7200b1ef1f955077bde7253fdcdae7164f3a6","tarball":"https://registry.npmjs.org/@dailymotion/vmap/-/vmap-3.3.2.tgz","fileCount":28,"integrity":"sha512-mwJfXNuVIJ18hPtXLNK9wnrh5EBIjQqdVU6Z2RNvAkfSuwdaQwCrzGod4M+PtGY9GR4Q+aaVMaB4+BkEoQOYcA==","signatures":[{"sig":"MEYCIQCIM6bWEzSaHbLg0z2lrVkTavQ6nRu3InFbIYgS9DocuQIhAOnv/hR4cSC490gsEYmfTvvTsUsCPUGozJWHjNJXfJ8Z","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39883},"main":"dist/vmap-js-node.js","browser":"dist/vmap-js.js","engines":{"node":">=12.22.1"},"gitHead":"76cc0cee2fa60113a02052db8ae21fbf49a66a8b","scripts":{"dev":"rollup -c rollup.config.js --watch","lint":"eslint --fix . && prettier --write \"**/*.js\"","test":"jest","build":"rollup -c rollup.config.js","precommit":"eslint --fix . && pretty-quick --staged"},"_npmUser":{"name":"clementfrancon","email":"clement.francon@dailymotion.com"},"repository":{"url":"git+https://github.com/dailymotion/vmap-js.git","type":"git"},"_npmVersion":"8.5.5","description":"Javascript VMAP Parser","directories":{},"_nodeVersion":"16.18.1","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","path":"^0.12.7","husky":"^8.0.3","eslint":"^7.32.0","rollup":"^2.35.1","xmldom":"github:xmldom/xmldom#0.7.0","prettier":"2.2.1","@babel/core":"^7.19.3","pretty-quick":"^3.1.0","@babel/register":"^7.12.10","@babel/preset-env":"^7.12.11","@babel/eslint-parser":"^7.19.1","@rollup/plugin-babel":"^6.0.0","eslint-plugin-import":"^2.22.1","rollup-plugin-terser":"^7.0.2","eslint-plugin-no-for-of-loops":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/vmap_3.3.2_1737641685090_0.9969770188766824","host":"s3://npm-registry-packages-npm-production"}},"3.3.3":{"name":"@dailymotion/vmap","author":{"name":"Dailymotion","email":"vast-client@dailymotion.com","url":"https://developer.dailymotion.com/"},"version":"3.3.3","description":"Javascript VMAP Parser","keywords":["vmap","ad","advertising","iab","in-stream","video"],"repository":{"type":"git","url":"git+https://github.com/dailymotion/vmap-js.git"},"license":"MIT","engines":{"node":">=12.22.1"},"main":"dist/vmap-js-node.js","browser":"dist/vmap-js.js","scripts":{"test":"jest","build":"rollup -c rollup.config.js","precommit":"eslint --fix . && pretty-quick --staged","dev":"rollup -c rollup.config.js --watch","lint":"eslint --fix . && prettier --write \"**/*.js\""},"devDependencies":{"@babel/core":"^7.19.3","@babel/eslint-parser":"^7.19.1","@babel/preset-env":"^7.12.11","@babel/register":"^7.12.10","@rollup/plugin-babel":"^6.0.0","eslint":"^7.32.0","eslint-plugin-import":"^2.22.1","eslint-plugin-no-for-of-loops":"^1.0.1","husky":"^8.0.3","jest":"^29.1.2","path":"^0.12.7","prettier":"2.2.1","pretty-quick":"^3.1.0","rollup":"^2.35.1","rollup-plugin-terser":"^7.0.2","xmldom":"github:xmldom/xmldom#0.7.0"},"gitHead":"638ec758471e19efc182cd86de1ed1a108fb9f9b","bugs":{"url":"https://github.com/dailymotion/vmap-js/issues"},"homepage":"https://github.com/dailymotion/vmap-js#readme","_id":"@dailymotion/vmap@3.3.3","_nodeVersion":"16.18.1","_npmVersion":"8.5.5","dist":{"integrity":"sha512-M/z1U6Pm19HKasHQA6n/IxqpbukcW37iCRQ8Zr567suw+nNDqJowKFWQcW8dW7SX8QZWItf7XSOawaQrzgQj+g==","shasum":"803c507f0a811e1e3a27f880559da61f55c1348a","tarball":"https://registry.npmjs.org/@dailymotion/vmap/-/vmap-3.3.3.tgz","fileCount":28,"unpackedSize":39861,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCID3T0NQI5Z9RZGAJX5aO78ygpnuqeIfM2aZagctgjSFPAiEA0QNRgTazCGYeF5MRq8IaN1W+shAp3SWxniPPtgvLwok="}]},"_npmUser":{"name":"clementfrancon","email":"clement.francon@dailymotion.com","actor":{"name":"clementfrancon","email":"clement.francon@dailymotion.com","type":"user"}},"directories":{},"maintainers":[{"name":"dm-npm","email":"github@dailymotion.com"},{"name":"ztaifour","email":"zacharie.taifour@dailymotion.com"},{"name":"rumeshm","email":"rumeshm@gmail.com"},{"name":"clementfrancon","email":"clement.francon@dailymotion.com"},{"name":"clarissedamon","email":"clarisse.damon@dailymotion.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vmap_3.3.3_1751273009095_0.46885942470294517"},"_hasShrinkwrap":false}},"time":{"created":"2021-09-21T15:09:03.455Z","modified":"2025-06-30T08:43:29.542Z","3.3.0":"2021-09-21T15:09:03.683Z","3.3.1":"2022-10-14T13:14:23.978Z","3.3.2":"2025-01-23T14:14:45.338Z","3.3.3":"2025-06-30T08:43:29.290Z"},"bugs":{"url":"https://github.com/dailymotion/vmap-js/issues"},"author":{"name":"Dailymotion","email":"vast-client@dailymotion.com","url":"https://developer.dailymotion.com/"},"license":"MIT","homepage":"https://github.com/dailymotion/vmap-js#readme","keywords":["vmap","ad","advertising","iab","in-stream","video"],"repository":{"type":"git","url":"git+https://github.com/dailymotion/vmap-js.git"},"description":"Javascript VMAP Parser","maintainers":[{"name":"dm-npm","email":"github@dailymotion.com"},{"name":"ztaifour","email":"zacharie.taifour@dailymotion.com"},{"name":"rumeshm","email":"rumeshm@gmail.com"},{"name":"clementfrancon","email":"clement.francon@dailymotion.com"},{"name":"clarissedamon","email":"clarisse.damon@dailymotion.com"}],"readme":"# VMAP Javascript Library\n\n[![Build Status](https://img.shields.io/badge/build-passing-brightgreen)](https://travis-ci.org/dailymotion/vmap-js)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![npm version](https://badge.fury.io/js/vmap.svg)](https://badge.fury.io/js/vmap)\n\nParse a VMAP XML document to Javascript object. Complies with [VMAP 1.0.1 spec](http://www.iab.net/media/file/VMAP.pdf).\n\n## Installation\n\nInstall with npm\n```\nnpm install @dailymotion/vmap\n```\n\n## Usage\n\nProvide the `VMAP` constructor an XML in order to have a parsed version of it.\n\nAccess `VMAP` properties using the APIs documented below.\n\n``` javascript\nimport VMAP from '@dailymotion/vmap';\n\n// Fetch VMAP as XML\nfetch(vmapURL)\n    .then(response => response.text())\n    .then(xmlText => {\n        // Get a parsed VMAP object\n        const parser = new DOMParser();\n        const xmlDoc = parser.parseFromString(xmlText, 'text/xml');\n        const vmap = new VMAP(xmlDoc);\n    })\n    .catch(error => {\n        console.error('Error fetching VMAP:', error);\n    });\n```\n\n## API\n\n### VMAP\n\n#### Properties\n\n* `version`: The VMAP version (should be 1.0).\n* `adBreaks`: An array of `VMAPAdBreak` objects.\n* `extensions`: An array of `Object` with\n    * `children`: `Object` containing all this extension children and their name as the key\n    * `attribute`: `Object` containing all this extension attributes and their name as the key\n    * `value`: `Object` parsed from CDATA or as a fallback all of the text nodes of this extension concatenated\n\n### VMAPAdBreak\n\nProvides information about an ad break.\n\n#### Properties\n\n* `timeOffset`: Represents the timing of the ad break.\n* `breakType`: Identifies whether the ad break allows \"linear\", \"nonlinear\" or \"display\" ads.\n* `breakId`: An optional string identifier for the ad break.\n* `repeatAfter`: An option used to distribute ad breaks equally spaced apart from one another along a linear timeline.\n* `adSource`: A `VMAPAdSource` object.\n* `trackingEvents`: An array of `Object` with tracking URLs\n    * `event`: The name of the event to track for the element. Can be one of breakStart, breakEnd or error.\n    * `uri`: The URI of the tracker.\n* `extensions`: An array of `Object` with\n    * `children`: `Object` containing all this extension children and their name as the key\n    * `attribute`: `Object` containing all this extension attributes and their name as the key\n    * `value`: `Object` parsed from CDATA or as a fallback all of the text nodes of this extension concatenated\n\n#### Methods\n\n* `track(event, errorCode)`: Call the trackers for the given event with an option error code parameter for `error` events.\n\n### VMAPAdSource\n\nProvides the player with either an inline ad response or a reference to an ad response.\n\n#### Properties\n\n* `id`: Ad identifier for the ad source.\n* `allowMultipleAds`: Indicates whether a VAST ad pod or multple buffet of ads can be served into an ad break.\n* `followRedirects`: Indicates whether the video player should honor the redirects within an ad response.\n* `vastAdData`: Contains an embedded VAST response.\n* `adTagURI`: Contains a URI to the VAST.\n* `customData`: Contains custom ad data.\n\n## Support and compatibility\nThe library is 100% written in JavaScript and the source code uses modern features like `modules`, `classes`, ecc... . Make sure your environment supports these features, or transpile the library when bundling your project.\n\n### Pre-bundled versions\nWe provide several pre-bundled versions of the library (see [`dist` directory](dist/))\n\n#### Browser\nA pre-bundled version of VMAP-jsis available: [`vmap-js.js`](dist/vmap-js.js).\n\nYou can add the script directly to your page and access the library through the `VMAP` constructor.\n\n```html\n<script src=\"dist/vmap-js.js\"></script>\n```\n\n```javascript\nvar vmap = new VMAP(vmapXML);\n```\n\n#### Node\nA pre-bundled version for node is available too: [`vmap-js-node.js`](dist/vmap-js-node.js).\n\n```javascript\nconst VMAP = require('@dailymotion/vmap')\n\nconst vmap = new VMAP(vmapXML);\n```\n\n## Build and tests\n\nInstall dependencies with:\n\n```\nnpm install\n```\n\nThe project is bundled using [Rollup](https://rollupjs.org/guide/en). Build with:\n\n```\nnpm run-script build\n```\n\nRun tests with:\n\n```\nnpm test\n```\n","readmeFilename":"README.md"}