• This repository has been archived on 13/Feb/2019
  • Stars
    star
    263
  • Rank 155,624 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 11 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A VideoJS plugin for VAST

videojs-vast-plugin Build Status Coverage Status

This plugin reads a VAST file, grabs the first video it can, and plays it as pre-roll advertisement before your video. It will also click through to whatever url the advertiser designates, track any clicks, and fire all of the correct pixel trackers at the right times.

Usage

Include the plugin and it's dependencies:

<script src="http://vjs.zencdn.net/4.4.3/video.js"></script>
<script src="vast-client.js"></script>
<script src="video.ads.js"></script>
<script src="videojs.vast.js"></script>

Add "ads" and "vast" to the plugins object, and pass a url:

plugins: {
    ads: {},
    vast: {
        url: 'http://url.to.your/vast/file.xml'
    }
}

And when you play that video, a pre-roll ad should play beforehand.

If you click on the ad, an adclick event will trigger.

Check out the demo for a more detailed example.

This plugin is technically an integration for video.js's ads plugin. For more information on the various states in the preroll process, please refer to the videojs-contrib-ads documentation.

Options

  • url: a URL to the xml file.
  • skip: how long until the user can skip the ad. Defaults to 5, and a negative number will disable it.

Credit

This plugin uses dailymotion's vast client to read and parse the VAST files, and video.js's ads plugin for switching from pre-roll to content.

More Repositories

1

fartscroll.js

You want fart noises as you scroll? We've got you covered.
2,832
star
2

comcastifyjs

Sometimes images just load too damned fast.
JavaScript
1,260
star
3

ansible-roles

** DEPRECATED **
Python
56
star
4

videojs-persistvolume

A plugin for videojs that saves user's volume setting.
JavaScript
34
star
5

videojs-endcard

Simple, customizable end card solution for VideoJS.
JavaScript
30
star
6

betty-cropper

A work-in-progress image cropper.
Python
27
star
7

bulbs-cms

An Angular-based CMS for a bulbs-based content system
JavaScript
27
star
8

django-bulbs

DEPRECATED: This project is now part of the Mono Repo (https://github.com/theonion/omni)
Python
26
star
9

django-zencoder

A django video encoding app
Python
17
star
10

editor

It's an HTML editor.
JavaScript
14
star
11

dehumanizer

Converting messy reality into accurate text since 2012.
Python
13
star
12

splitpic

The "Split-Pic" functionality, as used on Clickhole
JavaScript
12
star
13

onion-ads

Shared ad loading & ad unit code.
JavaScript
8
star
14

videojs-sharetools

A share tools plugin for videojs
CSS
8
star
15

crash-docker

this repository will reliably crash docker for mac
Python
7
star
16

videojs-skip-ads

Allows for an HTML5 overlay during preroll playback
JavaScript
6
star
17

restmod-style-drf-paged

Django Rest Framework paged style for restmod
JavaScript
6
star
18

django-elastimorphic

A marriage of django-polymorphic and elasticutils.
Python
5
star
19

django-betty-cropper

An image app that works with betty cropper
Python
4
star
20

onion-services

A collection of Docker containers to power web dev at The Onion
Shell
4
star
21

shitty-ad-detector

Sometimes there are shitty remnant ads. This is an attempt to help identify them.
JavaScript
4
star
22

theonion.github.com

Blog
JavaScript
4
star
23

videojs-autoplay-toggle

A plugin for Video.js that adds an autoplay toggle which will persist to cookies or localstorage.
JavaScript
3
star
24

ansible-uwsgi-emperor

An Ansible role to install uWSGI in Emperor mode
3
star
25

general-job-description

A job description for programmers at The Onion
3
star
26

urlify

JavaScript
3
star
27

onionbot

America's Finest Slack Integration
JavaScript
3
star
28

djes

Spinnin' them phat searches
Python
3
star
29

djesrf

djes + drf = one legit api
Python
3
star
30

django-elasticsearch

or how i learned to stop using elasticutils and start loving elasticsearch-py and elasticsearch-dsl-py
Python
2
star
31

bulbs-elements

<web-components> for the onion and sites
JavaScript
2
star
32

video-ad-server-frontend

The front end code for the video ad server.
CSS
2
star
33

bower-onion-video-ad-server-frontend

A bower release for onion video ad server
HTML
2
star
34

publishing-feeds

A simple little Django project to turn RSS feeds into Kindle feeds.
Python
1
star
35

videohub-player

Parking videohub player code here until we can sort it out better.
JavaScript
1
star
36

drf-nested-serializer

DRF Nested Serializers
Python
1
star
37

tinytracker

gvent/wsgi/carbon, oh my
Python
1
star
38

hubot

CoffeeScript
1
star
39

videohub-client-js

CMS components for integration with the videohub
JavaScript
1
star
40

influx-trending

stuff that influx should be able to do, but doesn't, so now i have to do it
Python
1
star
41

influxer2

A simple, fast uwsgi/gevent application to record pageview data to InfluxDB
Python
1
star