Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Florent-Bouisset committed Jan 6, 2025
1 parent 979530b commit 5a073f9
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
40 changes: 39 additions & 1 deletion doc/api/Loading_a_Content.md
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,44 @@ Those are the possible values for that option:
More information about the `"RELOADING"` state can be found in
[the player states documentation](./Player_States.md).

### onAudioTrackNotPlayable

_type_: `string|undefined`

_defaults_: `"continue"`

Specifies the behavior when all audio tracks are not playable.

Those are the possible values for that option:

- `"continue"`: The player will proceed to play the content without audio.

- `"error"`: The player will throw an error to indicate that the audio tracks could not be
played.

<div class="note">
If neither the audio nor the video tracks are playable, an error will be thrown regardless of this setting.
</div>

### onVideoTrackNotPlayable

_type_: `string|undefined`

_defaults_: `"continue"`

Specifies the behavior when all video tracks are not playable.

Those are the possible values for that option:

- `"continue"`: The player will proceed to play the content without video.

- `"error"`: The player will throw an error to indicate that the video tracks could not be
played.

<div class="note">
If neither the audio nor the video tracks are playable, an error will be thrown regardless of this setting.
</div>

### lowLatencyMode

_type_: `Boolean|undefined`
Expand Down Expand Up @@ -927,7 +965,7 @@ The `serverSyncInfos` object contains two keys:
<div class="note">
The `performance.now()` API is used here because it is the main API to
obtain a monotically increasing clock on the client-side.
</div</div>
</div>

Example:

Expand Down
6 changes: 6 additions & 0 deletions doc/reference/API_Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ events and so on.
- [`defaultAudioTrackSwitchingMode`](../api/Loading_a_Content.md#defaultaudiotrackswitchingmode):
Default behavior when switching the audio track.

- [`onAudioTrackNotPlayable`](../api/Loading_a_Content.md#onaudiotracknotplayable):
Specifies the behavior when all audio tracks are not playable.

- [`onVideoTrackNotPlayable`](../api/Loading_a_Content.md#onvideotracknotplayable):
Specifies the behavior when all video tracks are not playable.

- [`lowLatencyMode`](../api/Loading_a_Content.md#lowlatencymode): Allows to play
low-latency contents efficiently.

Expand Down

0 comments on commit 5a073f9

Please sign in to comment.