@nlo/ping-video-loader
Advanced tools
Comparing version 1.0.4 to 1.0.5
import pingVideoLoader from './ping-video-loader'; | ||
export default pingVideoLoader; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -26,4 +26,4 @@ declare type WebplayerFunc = (elementId: string | null, widthStyle?: string | null, topStyle?: string | null, videoId?: string | null, scriptName?: string | null, // Extra VARS/HASH for video personalisation | ||
private videosToLoadBuffer; | ||
constructor(scriptId: string); | ||
loadVideo(elementId: string, videoName: string, autoStart: boolean): Promise<void> | void; | ||
constructor(scriptId?: string); | ||
loadVideo(elementId: string, videoName: string, autoStart: boolean): Promise<void>; | ||
private awaitElementLoad; | ||
@@ -30,0 +30,0 @@ private createScriptTag; |
@@ -5,2 +5,3 @@ "use strict"; | ||
function PingVideoLoader(scriptId) { | ||
if (scriptId === void 0) { scriptId = 'aXNejdEHiu'; } | ||
this.pingVideoPlayerIsLoaded = false; | ||
@@ -13,10 +14,12 @@ this.scriptIsCreated = false; | ||
var _this = this; | ||
var targetElement = document.getElementById(elementId); | ||
if (!targetElement) { | ||
return; | ||
} | ||
return new Promise(function (resolve) { | ||
// Load Ping video inside empty div | ||
_this.loadPingVpAsync(elementId, null, null, videoName, null, "Dutch", null, autoStart); | ||
_this.awaitElementLoad(targetElement, resolve); | ||
return new Promise(function (resolve, reject) { | ||
var targetElement = document.getElementById(elementId); | ||
if (targetElement != null) { | ||
// Load Ping video inside empty div | ||
_this.loadPingVpAsync(elementId, null, null, videoName, null, "Dutch", null, autoStart); | ||
_this.awaitElementLoad(targetElement, resolve); | ||
} | ||
else { | ||
reject(); | ||
} | ||
}); | ||
@@ -23,0 +26,0 @@ }; |
{ | ||
"name": "@nlo/ping-video-loader", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "", | ||
@@ -23,3 +23,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "ae729b3d1580748d97047029b444444cb07369b6" | ||
"gitHead": "82f0aadb031e2b51a9485eb7d4c35294096f0616" | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
4967
115
0