npm package: @nadlowebagentur/capacitor-video-stream-player
Description: Enable native video stream player
Author: @themarchenko
Latest version: 0.0.14

# @nadlowebagentur/capacitor-video-stream-player

Enable native video stream player

## Install

```bash
npm install @nadlowebagentur/capacitor-video-stream-player
npx cap sync
```

## API

<docgen-index>

* [`preload(...)`](#preload)
* [`toggleVolume()`](#togglevolume)
* [`play()`](#play)
* [`pause()`](#pause)
* [`close()`](#close)
* [`switchAudioOutput()`](#switchaudiooutput)
* [`resetAudio()`](#resetaudio)
* [`updateState()`](#updatestate)
* [`getSubtitlesTracks()`](#getsubtitlestracks)
* [`setSubtitleTrack(...)`](#setsubtitletrack)
* [`getAudioTracks()`](#getaudiotracks)
* [`setAudioTrack(...)`](#setaudiotrack)
* [Interfaces](#interfaces)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

Interface for the VSPlayer Capacitor plugin.

### preload(...)

```typescript
preload(options: { url: string; acquisitionURL?: string | null; cert?: string | null; preferredQuality: number; isHLS: boolean; }) => Promise<void>
```

| Param         | Type                                                                                                                            |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ url: string; acquisitionURL?: string \| null; cert?: string \| null; preferredQuality: number; isHLS: boolean; }</code> |

--------------------


### toggleVolume()

```typescript
toggleVolume() => Promise<void>
```

--------------------


### play()

```typescript
play() => Promise<void>
```

--------------------


### pause()

```typescript
pause() => Promise<void>
```

--------------------


### close()

```typescript
close() => Promise<void>
```

--------------------


### switchAudioOutput()

```typescript
switchAudioOutput() => Promise<void>
```

--------------------


### resetAudio()

```typescript
resetAudio() => Promise<void>
```

--------------------


### updateState()

```typescript
updateState() => Promise<void>
```

--------------------


### getSubtitlesTracks()

```typescript
getSubtitlesTracks() => Promise<{ subtitles: SubtitlesTrack[]; }>
```

**Returns:** <code>Promise&lt;{ subtitles: SubtitlesTrack[]; }&gt;</code>

--------------------


### setSubtitleTrack(...)

```typescript
setSubtitleTrack(options: { uid: number | null; }) => Promise<void>
```

| Param         | Type                                  |
| ------------- | ------------------------------------- |
| **`options`** | <code>{ uid: number \| null; }</code> |

--------------------


### getAudioTracks()

```typescript
getAudioTracks() => Promise<{ audio: AudioTrack[]; }>
```

**Returns:** <code>Promise&lt;{ audio: AudioTrack[]; }&gt;</code>

--------------------


### setAudioTrack(...)

```typescript
setAudioTrack(options: { uid: number | null; }) => Promise<void>
```

| Param         | Type                                  |
| ------------- | ------------------------------------- |
| **`options`** | <code>{ uid: number \| null; }</code> |

--------------------


### Interfaces


#### SubtitlesTrack

| Prop        | Type                |
| ----------- | ------------------- |
| **`uid`**   | <code>number</code> |
| **`title`** | <code>string</code> |


#### AudioTrack

| Prop          | Type                 |
| ------------- | -------------------- |
| **`uid`**     | <code>number</code>  |
| **`title`**   | <code>string</code>  |
| **`current`** | <code>boolean</code> |

</docgen-api>