player
A player wrapper for usage with vigour-element.
how to use
npm i --save vigour-player
Add the player to your app as a component and add your configuration.
Control the player by manipulating the attached state (or just inject the ui controls).
setup
var e = var player = // define some datavar Observable = var Data = inject: Child: 'Constructor'Constructor // it expects a "video" field which will contain the video url (mpd, hls or mp4. Use .{type} for generic url.var playerData = video: 'http://clips.vorwaerts-gmbh.de/VfE_html5.mp4' // some configurationplayerconfig = apiKey: apiKey // add some injectables eg. our default controlsplayerinject // add player component to your appvar app = // add your playerapp // add data to appappval = playerData
configuring ads
// inject a protocol (currently only vast is included)playerinject // configure your ads, for any given point in the video timelineplayerconfigads = '0': vasturlA '0.5': vasturlB vasturlB