Nothing Special   »   [go: up one dir, main page]

6.0.1 • Published 6 months ago

@capgo/ivs-player v6.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months 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.1

6 months ago

6.0.0

10 months ago

0.13.41

1 year ago

0.13.40

1 year ago

0.8.8

2 years ago

0.13.45

1 year ago

0.8.5

2 years ago

0.8.4

2 years ago

0.13.43

1 year ago

0.8.7

2 years ago

0.13.42

1 year ago

0.8.6

2 years ago

0.13.7

2 years ago

0.13.8

2 years ago

0.13.9

2 years ago

0.13.49

1 year ago

0.13.48

1 year ago

0.13.47

1 year ago

0.13.0

2 years ago

0.13.46

1 year ago

0.13.1

2 years ago

0.13.2

2 years ago

0.13.3

2 years ago

0.13.4

2 years ago

0.13.5

2 years ago

0.13.51

1 year ago

0.13.50

1 year ago

0.3.0

2 years ago

0.3.1

2 years ago

0.7.0

2 years ago

0.9.3

2 years ago

0.10.9

2 years ago

0.10.1

2 years ago

0.10.2

2 years ago

0.10.3

2 years ago

0.10.4

2 years ago

0.10.5

2 years ago

0.10.6

2 years ago

0.10.7

2 years ago

0.10.8

2 years ago

0.10.0

2 years ago

0.8.1

2 years ago

0.0.9

2 years ago

0.8.0

2 years ago

0.0.8

2 years ago

0.8.3

2 years ago

0.8.2

2 years ago

0.0.5

2 years ago

0.4.0

2 years ago

0.0.4

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.10.18

2 years ago

0.10.19

2 years ago

0.11.0

2 years ago

0.10.14

2 years ago

0.11.1

2 years ago

0.10.15

2 years ago

0.11.2

2 years ago

0.10.16

2 years ago

0.10.10

2 years ago

0.10.12

2 years ago

0.10.13

2 years ago

0.10.20

2 years ago

0.13.10

2 years ago

0.1.0

2 years ago

0.13.16

2 years ago

0.10.25

2 years ago

0.9.0

2 years ago

0.13.15

2 years ago

0.10.26

2 years ago

0.9.2

2 years ago

0.9.1

2 years ago

0.10.21

2 years ago

0.5.0

2 years ago

0.10.22

2 years ago

0.10.23

2 years ago

0.5.2

2 years ago

0.10.24

2 years ago

0.5.1

2 years ago

0.13.23

2 years ago

0.13.22

2 years ago

0.13.27

2 years ago

0.12.0

2 years ago

0.12.1

2 years ago

0.13.24

2 years ago

0.12.2

2 years ago

0.13.29

2 years ago

0.13.28

2 years ago

0.13.30

2 years ago

0.0.10

2 years ago

0.13.34

1 year ago

0.0.11

2 years ago

0.13.33

1 year ago

0.0.12

2 years ago

0.13.32

2 years ago

0.13.31

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.13.38

1 year ago

0.6.2

2 years ago

0.13.36

1 year ago

0.2.2

2 years ago

0.6.1

2 years ago

0.13.39

1 year ago

0.6.0

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago