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

@eyevinn/csai-manager

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eyevinn/csai-manager - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

.parcel-cache/9b4fe782fba10dc9

23

dist/index.js

@@ -778,2 +778,4 @@ var $g5Y9E$eyevinnvideoeventfilter = require("@eyevinn/video-event-filter");

_this.debug = !!initOptions.debug;
_this.initOptions = initOptions;
_this.state = "idle";
_this.adServerService = new $82676b94e7d3e1ec$exports.AdServerService(_this.debug);

@@ -785,3 +787,3 @@ initOptions = $e68d46ff2e90f1a5$export$d2858fcef9c76970(initOptions);

_this.videoEventFilter = new $g5Y9E$eyevinnvideoeventfilter.VideoEventFilter(_this.adVideoElement);
_this.autoManagePlayback = initOptions.autoManagePlayback;
_this.autoManagePlayback = initOptions.autoManagePlayback ? initOptions.autoManagePlayback : true;
_this.fetchAds(initOptions);

@@ -848,2 +850,7 @@ return _this;

};
$020ad56d15653aeb$export$b74fc88014c397b3.prototype.play = function() {
if (this.state !== "idle") return;
this.state = "playing";
this.playNextVideo();
};
$020ad56d15653aeb$export$b74fc88014c397b3.prototype.fetchAdBreak = function(vastUrl) {

@@ -920,6 +927,7 @@ return $020ad56d15653aeb$var$__awaiter(this, void 0, Promise, function() {

this.adVideoElement.src = src;
this.adVideoElement.play();
if (this.state !== "idle" || this.initOptions.autoplay) this.adVideoElement.play();
this.adVideoElement.addEventListener("playing", function() {
_this.trackEvent($6a91d1a6b96ec270$export$af003d03c08e493d.START, _this.currentAd);
_this.trackEvent($6a91d1a6b96ec270$export$af003d03c08e493d.IMPRESSION, _this.currentAd);
_this.state = "playing";
}, {

@@ -930,2 +938,3 @@ once: true

_this.trackEvent($6a91d1a6b96ec270$export$af003d03c08e493d.COMPLETE, _this.currentAd);
_this.state = "ended";
_this.validCurrentTime = 0;

@@ -1048,7 +1057,15 @@ _this.playNextVideo();

$020ad56d15653aeb$export$b74fc88014c397b3.prototype.destroy = function() {
this.adBreaks = [];
this.adMarkers = [];
this.currentAd = null;
this.currentAdBreak = null;
this.currentAdBreakVideos = [];
this.onContentTimeUpdateRef = null;
this.onAdSeekingRef = null;
this.onContentTimeUpdateRef = null;
this.trackedAdBreaks = {};
this.trackedAds = {};
this.videoEventFilter.clear();
this.videoEventFilter.destroy();
// if not sent in as a video element already in DOM, let's remove the created ad video element as well
if (!this.initOptions.adVideoElement) this.adVideoElement.remove();
};

@@ -1055,0 +1072,0 @@ return $020ad56d15653aeb$export$b74fc88014c397b3;

@@ -6,2 +6,3 @@ import { IAdBreakVASTItem } from "./utils/ads-models";

autoManagePlayback?: boolean;
autoplay?: boolean;
isLive?: boolean;

@@ -16,2 +17,4 @@ container?: HTMLElement;

private debug;
private initOptions;
private state;
private contentVideoElement;

@@ -35,2 +38,3 @@ private adVideoElement;

private fetchAds;
play(): void;
fetchAdBreak(vastUrl: string): Promise<void>;

@@ -37,0 +41,0 @@ triggerAdBreak(): Promise<void>;

2

package.json
{
"name": "@eyevinn/csai-manager",
"version": "0.1.0",
"version": "0.1.1",
"description": "",

@@ -5,0 +5,0 @@ "source": "index.ts",

@@ -39,2 +39,3 @@ CSAI Manager

isLive?: boolean; // default false; will adjust the validation to not require vast or vmap url etc
autoplay?: boolean; // default false

@@ -118,2 +119,4 @@ // Whether you have created a video element for the ads on beforehand, or would want to render it in a div. As fallback it finds the parent of the contentVideoElement

- `play()` to trigger play when autoplay isn't set to true
These methods are specifically to be used for live

@@ -120,0 +123,0 @@ (remember to set the initOption `autoManagePlayback` to `false` to not pause the live stream)

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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