Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@theoplayer/adscript-connector-web
Advanced tools
A connector implementing AdScript with THEOplayer
The AdScript connector provides an AdScript integration for THEOplayer.
Install using your favorite package manager for Node (such as npm
or yarn
):
npm install @theoplayer/adscript-connector-web
yarn add @theoplayer/adscript-connector-web
First you need to add the AdScript connector to your app :
<script type="text/javascript" src="path/to/adscript-connector.umd.js"></script>
<script type="text/javascript">
const player = new THEOplayer.Player(element, configuration);
// Define your configuration for the connector:
const adScriptConfig = {
implementationId: 'your-implementation-id', // Replace this!
metadata: {
"assetid": "v0000001",
"type": "content",
"program": "Big Buck Bunny",
"title": "Sample Video - Extended",
"length": "635",
"crossId": "000 111 22222",
"livestream": "0",
"channelId": "",
"attribute": "1"
},
debug: false
}
// Create the AdScriptConnector:
const adScriptConnector = new THEOplayerAdScriptConnector.AdScriptConnector(player, adScriptConfig);
</script>
<script type="module">
import {AdScriptConnector} from "@theoplayer/adscript-connector-web";
const player = new THEOplayer.Player(element, configuration);
// Define your configuration for the connector:
const adScriptConfig = {
implementationId: 'your-implementation-id', // Replace this!
metadata: {
"assetid": "v0000001",
"type": "content",
"program": "Big Buck Bunny",
"title": "Sample Video - Extended",
"length": "635",
"crossId": "000 111 22222",
"livestream": "0",
"channelId": "",
"attribute": "1"
},
debug: false
}
// Create the AdScriptConnector:
const adScriptConnector = new AdScriptConnector(player, adScriptConfig);
</script>
If the metadata has changed during playback, you can update it with:
adScriptConnector.updateMetadata(newMetadata);
If the user info has changed during playback, you can update it with:
adScriptConnector.updateUser(i12n);
FAQs
A connector implementing AdScript with THEOplayer
We found that @theoplayer/adscript-connector-web demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.