Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@spotx/directados

Package Overview
Dependencies
Maintainers
6
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spotx/directados

The official SpotX Direct Ados integration package

  • 1.0.4
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
6
Weekly downloads
 
Created
Source

SpotX Direct AdOS

This is the official SpotX Direct AdOS module.

Direct AdOS documentation can be found in the SpotX Developer Center

Installation and Usage

npm install @spotx/directados

To include the module in a script:

var SpotX = require("@spotx/directados");

Example Usage:

Create a new directory for this sample project. Be sure to run npm install @spotx/directados in this new directory, if you haven't already.

Use the following browserify command to create a bundle.js file: npx browserify --require @spotx/directados --outfile bundle.js

Create the following index.html file:

<!DOCTYPE HTML>
<html>
  <head></head>
  <body>
      <div id="video-container">
        <div id='video-content'>
          <video controls id="video-player" height="360" width="640"></video>
        </div>
    </div>

    <script src="bundle.js"></script>
    <script>
        (function() {
            var SpotX = require("@spotx/directados");

            var adContainer = document.getElementById('video-content');
            var directAdOS = new SpotX.DirectAdOS({
                channel_id: 85394,
                slot: adContainer,
                video_slot: document.getElementById('video-player'),
            });
            directAdOS.loadAd();
        })();
    </script>
  </body>
</html>

Serve the index file locally: python2 -m SimpleHTTPServer or python3 -m http.server

and navigate to the index.html page locally (usually http://localhost:8000). You should see a SpotX pre-roll video ad.i

FAQs

Package last updated on 04 May 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc