npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@capgo/ivs-player

v6.0.1

Published

Ivs player for capacitor app

Downloads

33

Readme

@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>

| Param | Type | | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 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>

| Param | Type | | ------------- | --------------------------------- | | options | { toBack: boolean; } |


getPlayerPosition()

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

Returns: Promise<{ toBack: boolean; }>


setAutoQuality(...)

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

| Param | Type | | ------------- | --------------------------------------- | | options | { autoQuality?: boolean; } |


getAutoQuality()

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

Returns: Promise<{ autoQuality: boolean; }>


setPip(...)

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

| Param | Type | | ------------- | ------------------------------- | | 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

| Param | Type | Description | | ------------- | ------------------------------------------------------------------------- | --------------------------------------------------- | | 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>

| Param | Type | | ------------- | --------------------------------------------------------------------------------------------------------------------- | | options | { backgroundState: CapacitorIvsPlayerBackgroundState; } |


getBackgroundState()

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

Returns: Promise<{ backgroundState: CapacitorIvsPlayerBackgroundState; }>


setMute(...)

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

| Param | Type | | ------------- | --------------------------------- | | options | { muted?: boolean; } |


getMute()

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

Returns: Promise<{ mute: boolean; }>


setQuality(...)

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

| Param | Type | | ------------- | --------------------------------- | | 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

| Param | Type | | ------------------ | -------------------------- | | eventName | 'startPip' | | listenerFunc | () => void |

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('stopPip', ...)

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

Listen for stop pip

| Param | Type | | ------------------ | -------------------------- | | eventName | 'stopPip' | | listenerFunc | () => void |

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('expandPip', ...)

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

Listen for expend pip

| Param | Type | | ------------------ | -------------------------- | | eventName | 'expandPip' | | listenerFunc | () => void |

Returns: Promise<PluginListenerHandle>

Since: 1.0.0


addListener('closePip', ...)

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

Listen for close pip

| Param | Type | | ------------------ | -------------------------- | | 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

| Param | Type | | ------------------ | ---------------------------------------------------------------------------------------------------------- | | 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

| Param | Type | | ------------------ | ------------------------------------------------- | | 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

| Param | Type | | ------------------ | ----------------------------------------------------- | | 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

| Param | Type | | ------------------ | -------------------------------------------------- | | 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

| Param | Type | | ------------------ | ---------------------------- | | 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

| Param | Type | | ------------------ | ----------------------------------------------------- | | 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

| Param | Type | | ------------------ | ------------------------------------------------------------------ | | 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

| Param | Type | | ------------------ | ---------------------------------------------------- | | 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

| Param | Type | | ------------------ | ------------------------------------------------------ | | 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

| Prop | Type | | ------------ | ------------------- | | x | number | | y | number | | width | number | | height | number |

PluginListenerHandle

| Prop | Type | | ------------ | ----------------------------------------- | | 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