vistar-html5player
Advanced tools
Comparing version 1.6.3 to 1.6.4
@@ -5,2 +5,6 @@ # vistar-html5player | ||
### 1.6.4 | ||
Issue when publishing to npm publish called for a version bump and redeploy | ||
### 1.6.3 | ||
@@ -7,0 +11,0 @@ |
(function() { | ||
var Ajax, Player, ProofOfPlay, VariedAdStream, XMLHttpAjax, config, defaultConfig, inject, _ref, _ref1, | ||
var Ajax, Player, ProofOfPlay, VariedAdStream, XMLHttpAjax, config, http, inject, _ref, | ||
__hasProp = {}.hasOwnProperty, | ||
@@ -16,20 +16,12 @@ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; | ||
defaultConfig = {}; | ||
http = require('http'); | ||
defaultConfig['vistar.api_key'] = '58b68728-11d4-41ed-964a-95dca7b59abd'; | ||
config = ''; | ||
defaultConfig['vistar.network_id'] = 'Ex-f6cCtRcydns8mcQqFWQ'; | ||
defaultConfig['vistar.device_id'] = 'test-device-id'; | ||
defaultConfig['vistar.debug'] = false; | ||
defaultConfig['vistar.url'] = 'http://dev.api.vistarmedia.com/api/v1/get_ad/json'; | ||
config = ((_ref1 = window.Cortex) != null ? _ref1.getConfig() : void 0) || defaultConfig; | ||
if (typeof window !== "undefined" && window !== null) { | ||
window.Vistar = function() { | ||
var Binder, ads, injector, player, pop; | ||
Binder = (function(_super) { | ||
var Binder; | ||
return Binder = (function(_super) { | ||
var ads, injector, player, pop; | ||
__extends(Binder, _super); | ||
@@ -42,3 +34,2 @@ | ||
Binder.prototype.configure = function() { | ||
var _ref2, _ref3; | ||
this.bind(Ajax).to(XMLHttpAjax); | ||
@@ -48,8 +39,14 @@ this.bindConstant('navigator').to(window.navigator); | ||
this.bindConstant('image').to(document.querySelector('.player img')); | ||
return this.bindConstant('config').to({ | ||
url: config['vistar.url'], | ||
apiKey: config['vistar.api_key'], | ||
networkId: config['vistar.network_id'], | ||
deviceId: ((_ref2 = window.Cortex) != null ? (_ref3 = _ref2.player) != null ? _ref3.id() : void 0 : void 0) || config['vistar.device_id'], | ||
venueId: config['vistar.venue_id'], | ||
return this.bindConstant('config').to(config); | ||
}; | ||
if (!!CONFIG) { | ||
config = CONFIG; | ||
} else { | ||
config = { | ||
url: 'http://dev.api.vistarmedia.com/api/v1/get_ad/json', | ||
apiKey: 'DEFAULT_API_KEY', | ||
networkId: 'DEFAULT_NETWORK_ID', | ||
deviceId: 'DEFAULT_DEVICE_ID', | ||
venueId: 'DEFAULT_VENUE_ID', | ||
width: 1280, | ||
@@ -63,3 +60,3 @@ height: 720, | ||
queueSize: 10, | ||
debug: !!defaultConfig['vistar.debug'], | ||
debug: false, | ||
mimeTypes: ['image/gif', 'image/jpeg', 'image/png', 'video/webm'], | ||
@@ -72,21 +69,27 @@ displayArea: [ | ||
allow_audio: false, | ||
cpm_floor_cents: Number(config['vistar.cpm_floor_cents'] || 0) | ||
cpm_floor_cents: Number(0) | ||
} | ||
] | ||
}); | ||
}; | ||
} | ||
injector = new inject.Injector(new Binder); | ||
ads = injector.getInstance(VariedAdStream); | ||
player = injector.getInstance(Player); | ||
pop = injector.getInstance(ProofOfPlay); | ||
window.__vistarplayer = { | ||
ads: ads, | ||
player: player, | ||
pop: pop | ||
}; | ||
ads.pipe(player).pipe(pop); | ||
return Binder; | ||
})(inject.Binder); | ||
injector = new inject.Injector(new Binder); | ||
ads = injector.getInstance(VariedAdStream); | ||
player = injector.getInstance(Player); | ||
pop = injector.getInstance(ProofOfPlay); | ||
window.__vistarplayer = { | ||
ads: ads, | ||
player: player, | ||
pop: pop | ||
}; | ||
return ads.pipe(player).pipe(pop); | ||
}; | ||
@@ -93,0 +96,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"description": "An HTML 5 Player for Vistar Media assets.", | ||
"version": "1.6.3", | ||
"version": "1.6.4", | ||
"homepage": "https://help.vistarmedia.com/hc/en-us/articles/224825127-HTML5-Player", | ||
@@ -8,0 +8,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40617
1