jwplayer-capacitor
v6.0.0
Published
Integration of JWPlayer Web and Mobile SDKs with Capacitor
Downloads
155
Readme
jwplayer-capacitor
Integration of JWPlayer Web and Mobile SDKs with Capacitor
Install
npm install jwplayer-capacitor
npx cap sync
API
echo(...)
initialize(...)
create(...)
remove()
getPosition()
seek(...)
addButton(...)
addCuePoints(...)
playlistItem(...)
addListener(...)
addListener(...)
addListener(...)
removeAllListeners()
- Interfaces
echo(...)
echo(options: { value: string; }) => any
| Param | Type |
| ------------- | ------------------------------- |
| options
| { value: string; } |
Returns: any
initialize(...)
initialize(options: { webLicenseKey?: string; androidLicenseKey?: string; iosLicenseKey?: string; googleCastId?: string; debug?: boolean; }) => any
| Param | Type |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| options
| { webLicenseKey?: string; androidLicenseKey?: string; iosLicenseKey?: string; googleCastId?: string; debug?: boolean; } |
Returns: any
create(...)
create(options: { webConfiguration?: { container: string; properties?: any; }; nativeConfiguration?: JWPlayerNativeConfiguration; advertisingConfig?: JWPlayerAd; }) => any
| Param | Type |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| options
| { webConfiguration?: { container: string; properties?: any; }; nativeConfiguration?: JWPlayerNativeConfiguration; advertisingConfig?: JWPlayerAd; } |
Returns: any
remove()
remove() => any
Returns: any
getPosition()
getPosition() => any
Returns: any
seek(...)
seek(options: { position: number; }) => any
| Param | Type |
| ------------- | ---------------------------------- |
| options
| { position: number; } |
Returns: any
addButton(...)
addButton(img: string, tooltip: string, callback: () => void, id: string, btnClass: string) => void
| Param | Type |
| -------------- | -------------------------- |
| img
| string |
| tooltip
| string |
| callback
| () => void |
| id
| string |
| btnClass
| string |
addCuePoints(...)
addCuePoints(options: { cuePoints: JWPlayerCuePoint[]; }) => void
| Param | Type |
| ------------- | ------------------------------- |
| options
| { cuePoints: {}; } |
playlistItem(...)
playlistItem(options: { index: number; }) => any
| Param | Type |
| ------------- | ------------------------------- |
| options
| { index: number; } |
Returns: any
addListener(...)
addListener(eventName: 'playerEvent', listenerFunc: EventChangeListener) => any
Listen for events in player
| Param | Type |
| ------------------ | ---------------------------------------------- |
| eventName
| "playerEvent" |
| listenerFunc
| (event: JWPlayerEvent) => void |
Returns: any
Since: 1.0.0
addListener(...)
addListener(eventName: 'fullScreenPlayerEvent', listenerFunc: EventChangeListener) => any
| Param | Type |
| ------------------ | ---------------------------------------------- |
| eventName
| "fullScreenPlayerEvent" |
| listenerFunc
| (event: JWPlayerEvent) => void |
Returns: any
addListener(...)
addListener(eventName: 'readyPlayerEvent', listenerFunc: EventChangeListener) => any
| Param | Type |
| ------------------ | ---------------------------------------------- |
| eventName
| "readyPlayerEvent" |
| listenerFunc
| (event: JWPlayerEvent) => void |
Returns: any
removeAllListeners()
removeAllListeners() => any
Remove all listeners (including the network status changes) for this plugin.
Returns: any
Since: 1.0.0
Interfaces
JWPlayerNativeConfiguration
| Prop | Type |
| -------------------------------- | -------------------- |
| width
| number |
| height
| number |
| x
| number |
| y
| number |
| googleCastId
| string |
| front
| boolean |
| autostart
| boolean |
| forceFullScreenOnLandscape
| boolean |
| forceFullScreen
| boolean |
| playlist
| {} |
JWPlayerAd
| Prop | Type |
| -------------- | ------------------- |
| type
| string |
| schedule
| {} |
JWPlayerAdSchedule
| Prop | Type |
| ----------- | ------------------- |
| url
| string |
| begin
| number |
JWPlayerCuePoint
| Prop | Type |
| ----------- | ------------------- |
| type
| string |
| text
| string |
| begin
| number |
PluginListenerHandle
| Prop | Type |
| ------------ | ------------------------- |
| remove
| () => any |