jwplayer-capacitor
Advanced tools
Comparing version 0.3.0 to 0.3.1
import { WebPlugin } from '@capacitor/core'; | ||
import type { JWPlayerCuePoint } from '.'; | ||
import type { JWPlayerCuePoint, JWPlayerAd } from '.'; | ||
import type { JWPlayerPlugin } from './definitions'; | ||
@@ -24,2 +24,3 @@ export declare class JWPlayerWeb extends WebPlugin implements JWPlayerPlugin { | ||
}; | ||
advertisingConfig?: JWPlayerAd; | ||
}): Promise<any>; | ||
@@ -35,3 +36,3 @@ private loadEvents; | ||
cuePoints: JWPlayerCuePoint[]; | ||
}): Promise<boolean>; | ||
}): void; | ||
addButton(img: string, tooltip: string, callback: () => void, id: string, btnClass: string): void; | ||
@@ -38,0 +39,0 @@ playlistItem(options: { |
@@ -32,3 +32,14 @@ import { WebPlugin } from '@capacitor/core'; | ||
this.playerInstance = jwplayer(options.webConfiguration.container); | ||
this.playerInstance.setup(Object.assign({}, (_a = options.webConfiguration.properties) !== null && _a !== void 0 ? _a : {})); | ||
const config = Object.assign({}, (_a = options.webConfiguration.properties) !== null && _a !== void 0 ? _a : {}); | ||
if (options.advertisingConfig) { | ||
config.advertising = { | ||
client: options.advertisingConfig.type == 'vast' ? 'vast' : 'googima', | ||
schedule: options.advertisingConfig.schedule.map(c => { | ||
return { | ||
offset: c.begin, tag: c.url | ||
}; | ||
}) | ||
}; | ||
} | ||
this.playerInstance.setup(config); | ||
this.loadEvents(); | ||
@@ -149,3 +160,2 @@ } | ||
this.playerInstance.addCues(options.cuePoints); | ||
return Promise.resolve(true); | ||
} | ||
@@ -152,0 +162,0 @@ addButton(img, tooltip, callback, id, btnClass) { |
{ | ||
"name": "jwplayer-capacitor", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Integration of JWPlayer Web and Mobile SDKs with Capacitor", | ||
@@ -5,0 +5,0 @@ "main": "dist/plugin.cjs.js", |
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 too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
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
1679296
5943