6.0.0 • Published 10 days ago

@capgo/ivs-player v6.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 days ago

@capgo/ivs-player

Ivs player for Capacitor app Android and IOS.

Install

npm install @capgo/ivs-player
npx cap sync

API

create(...)

create(options: { url: string; pip?: boolean; title?: string; subtitle?: string; cover?: string; autoPlay?: boolean; toBack?: boolean; x?: number; y?: number; width?: number; height?: number; }) => Promise<void>
ParamType
options{ url: string; pip?: boolean; title?: string; subtitle?: string; cover?: string; autoPlay?: boolean; toBack?: boolean; x?: number; y?: number; width?: number; height?: number; }

start()

start() => Promise<void>

cast()

cast() => Promise<void>

getCastStatus()

getCastStatus() => Promise<{ isActive: boolean; }>

Returns: Promise<{ isActive: boolean; }>


pause()

pause() => Promise<void>

delete()

delete() => Promise<void>

getUrl()

getUrl() => Promise<{ url: string; }>

Returns: Promise<{ url: string; }>


getState()

getState() => Promise<{ state: CapacitorIvsPlayerState; }>

Returns: Promise<{ state: CapacitorIvsPlayerState; }>


setPlayerPosition(...)

setPlayerPosition(options?: { toBack: boolean; } | undefined) => Promise<void>
ParamType
options{ toBack: boolean; }

getPlayerPosition()

getPlayerPosition() => Promise<{ toBack: boolean; }>

Returns: Promise<{ toBack: boolean; }>


setAutoQuality(...)

setAutoQuality(options?: { autoQuality?: boolean | undefined; } | undefined) => Promise<void>
ParamType
options{ autoQuality?: boolean; }

getAutoQuality()

getAutoQuality() => Promise<{ autoQuality: boolean; }>

Returns: Promise<{ autoQuality: boolean; }>


setPip(...)

setPip(options?: { pip?: boolean | undefined; } | undefined) => Promise<void>
ParamType
options{ pip?: boolean; }

getPip()

getPip() => Promise<{ pip: boolean; }>

Returns: Promise<{ pip: boolean; }>


setFrame(...)

setFrame(options?: { x?: number | undefined; y?: number | undefined; width?: number | undefined; height?: number | undefined; } | undefined) => Promise<void>

Set the frame of the player view, all number have to be positive and integers

ParamTypeDescription
options{ x?: number; y?: number; width?: number; height?: number; }: number, y: number, width: number, height: number}

Since: 1.0.0


getFrame()

getFrame() => Promise<CapacitorFrame>

Returns: Promise<CapacitorFrame>


setBackgroundState(...)

setBackgroundState(options: { backgroundState: CapacitorIvsPlayerBackgroundState; }) => Promise<void>
ParamType
options{ backgroundState: CapacitorIvsPlayerBackgroundState; }

getBackgroundState()

getBackgroundState() => Promise<{ backgroundState: CapacitorIvsPlayerBackgroundState; }>

Returns: Promise<{ backgroundState: CapacitorIvsPlayerBackgroundState; }>


setMute(...)

setMute(options?: { muted?: boolean | undefined; } | undefined) => Promise<void>
ParamType
options{ muted?: boolean; }

getMute()

getMute() => Promise<{ mute: boolean; }>

Returns: Promise<{ mute: boolean; }>


setQuality(...)

setQuality(options?: { quality: string; } | undefined) => Promise<void>
ParamType
options{ quality: string; }

getQuality()

getQuality() => Promise<{ quality: string; }>

Returns: Promise<{ quality: string; }>


getQualities()

getQualities() => Promise<{ qualities: string[]; }>

Returns: Promise<{ qualities: string[]; }>


getPluginVersion()

getPluginVersion() => Promise<{ version: string; }>

Get the native Capacitor plugin version

Returns: Promise<{ version: string; }>


addListener('startPip', ...)

addListener(eventName: "startPip", listenerFunc: () => void) => Promise<PluginListenerHandle>

Listen for start pip

ParamType
eventName'startPip'
listenerFunc() => void

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('stopPip', ...)

addListener(eventName: "stopPip", listenerFunc: () => void) => Promise<PluginListenerHandle>

Listen for stop pip

ParamType
eventName'stopPip'
listenerFunc() => void

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('expandPip', ...)

addListener(eventName: "expandPip", listenerFunc: () => void) => Promise<PluginListenerHandle>

Listen for expend pip

ParamType
eventName'expandPip'
listenerFunc() => void

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('closePip', ...)

addListener(eventName: "closePip", listenerFunc: () => void) => Promise<PluginListenerHandle>

Listen for close pip

ParamType
eventName'closePip'
listenerFunc() => void

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('onState', ...)

addListener(eventName: "onState", listenerFunc: (data: { state: CapacitorIvsPlayerState; }) => void) => Promise<PluginListenerHandle>

Listen for state changes

ParamType
eventName'onState'
listenerFunc(data: { state: CapacitorIvsPlayerState; }) => void

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('onCues', ...)

addListener(eventName: "onCues", listenerFunc: (data: { cues: string; }) => void) => Promise<PluginListenerHandle>

Listen for cue changes

ParamType
eventName'onCues'
listenerFunc(data: { cues: string; }) => void

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('onDuration', ...)

addListener(eventName: "onDuration", listenerFunc: (data: { duration: number; }) => void) => Promise<PluginListenerHandle>

Listen for duration changes

ParamType
eventName'onDuration'
listenerFunc(data: { duration: number; }) => void

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('onError', ...)

addListener(eventName: "onError", listenerFunc: (data: { error: string; }) => void) => Promise<PluginListenerHandle>

Listen for errors

ParamType
eventName'onError'
listenerFunc(data: { error: string; }) => void

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('onRebuffering', ...)

addListener(eventName: "onRebuffering", listenerFunc: () => void) => Promise<PluginListenerHandle>

Listen for rebuffering

ParamType
eventName'onRebuffering'
listenerFunc() => void

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('onSeekCompleted', ...)

addListener(eventName: "onSeekCompleted", listenerFunc: (data: { position: number; }) => void) => Promise<PluginListenerHandle>

Listen for position changes

ParamType
eventName'onSeekCompleted'
listenerFunc(data: { position: number; }) => void

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('onVideoSize', ...)

addListener(eventName: "onVideoSize", listenerFunc: (data: { width: number; height: number; }) => void) => Promise<PluginListenerHandle>

Listen for video size changes

ParamType
eventName'onVideoSize'
listenerFunc(data: { width: number; height: number; }) => void

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('onQuality', ...)

addListener(eventName: "onQuality", listenerFunc: (data: { quality: string; }) => void) => Promise<PluginListenerHandle>

Listen for quality changes

ParamType
eventName'onQuality'
listenerFunc(data: { quality: string; }) => void

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('onCastStatus', ...)

addListener(eventName: "onCastStatus", listenerFunc: (data: { isActive: boolean; }) => void) => Promise<PluginListenerHandle>

Listen for cast status changes

ParamType
eventName'onCastStatus'
listenerFunc(data: { isActive: boolean; }) => void

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


removeAllListeners()

removeAllListeners() => Promise<void>

Remove all listeners for this plugin.

Since: 1.0.0


Interfaces

CapacitorFrame

PropType
xnumber
ynumber
widthnumber
heightnumber

PluginListenerHandle

PropType
remove() => Promise<void>

Type Aliases

CapacitorIvsPlayerState

"IDLE" | "BUFFERING" | "READY" | "PLAYING" | "ENDED" | "UNKNOWN"

CapacitorIvsPlayerBackgroundState

"PAUSED" | "PLAYING"

Credits

This plugin was created originally for Kick.com by Capgo

6.0.0

10 days ago

0.13.41

8 months ago

0.13.40

8 months ago

0.8.8

10 months ago

0.13.45

8 months ago

0.8.5

10 months ago

0.8.4

10 months ago

0.13.43

8 months ago

0.8.7

10 months ago

0.13.42

8 months ago

0.8.6

10 months ago

0.13.7

9 months ago

0.13.8

9 months ago

0.13.9

9 months ago

0.13.49

8 months ago

0.13.48

8 months ago

0.13.47

8 months ago

0.13.0

10 months ago

0.13.46

8 months ago

0.13.1

10 months ago

0.13.2

9 months ago

0.13.3

9 months ago

0.13.4

9 months ago

0.13.5

9 months ago

0.13.51

8 months ago

0.13.50

8 months ago

0.3.0

10 months ago

0.3.1

10 months ago

0.7.0

10 months ago

0.9.3

10 months ago

0.10.9

10 months ago

0.10.1

10 months ago

0.10.2

10 months ago

0.10.3

10 months ago

0.10.4

10 months ago

0.10.5

10 months ago

0.10.6

10 months ago

0.10.7

10 months ago

0.10.8

10 months ago

0.10.0

10 months ago

0.8.1

10 months ago

0.0.9

10 months ago

0.8.0

10 months ago

0.0.8

10 months ago

0.8.3

10 months ago

0.8.2

10 months ago

0.0.5

10 months ago

0.4.0

10 months ago

0.0.4

11 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.10.18

10 months ago

0.10.19

10 months ago

0.11.0

10 months ago

0.10.14

10 months ago

0.11.1

10 months ago

0.10.15

10 months ago

0.11.2

10 months ago

0.10.16

10 months ago

0.10.10

10 months ago

0.10.12

10 months ago

0.10.13

10 months ago

0.10.20

10 months ago

0.13.10

9 months ago

0.1.0

10 months ago

0.13.16

9 months ago

0.10.25

10 months ago

0.9.0

10 months ago

0.13.15

9 months ago

0.10.26

10 months ago

0.9.2

10 months ago

0.9.1

10 months ago

0.10.21

10 months ago

0.5.0

10 months ago

0.10.22

10 months ago

0.10.23

10 months ago

0.5.2

10 months ago

0.10.24

10 months ago

0.5.1

10 months ago

0.13.23

9 months ago

0.13.22

9 months ago

0.13.27

9 months ago

0.12.0

10 months ago

0.12.1

10 months ago

0.13.24

9 months ago

0.12.2

10 months ago

0.13.29

9 months ago

0.13.28

9 months ago

0.13.30

9 months ago

0.0.10

10 months ago

0.13.34

8 months ago

0.0.11

10 months ago

0.13.33

8 months ago

0.0.12

10 months ago

0.13.32

9 months ago

0.13.31

9 months ago

0.2.1

10 months ago

0.2.0

10 months ago

0.13.38

8 months ago

0.6.2

10 months ago

0.13.36

8 months ago

0.2.2

10 months ago

0.6.1

10 months ago

0.13.39

8 months ago

0.6.0

10 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago