Skip to content

Commit 5a073f9

Browse files
add documentation
1 parent 979530b commit 5a073f9

2 files changed

Lines changed: 45 additions & 1 deletion

File tree

doc/api/Loading_a_Content.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,44 @@ Those are the possible values for that option:
706706
More information about the `"RELOADING"` state can be found in
707707
[the player states documentation](./Player_States.md).
708708

709+
### onAudioTrackNotPlayable
710+
711+
_type_: `string|undefined`
712+
713+
_defaults_: `"continue"`
714+
715+
Specifies the behavior when all audio tracks are not playable.
716+
717+
Those are the possible values for that option:
718+
719+
- `"continue"`: The player will proceed to play the content without audio.
720+
721+
- `"error"`: The player will throw an error to indicate that the audio tracks could not be
722+
played.
723+
724+
<div class="note">
725+
If neither the audio nor the video tracks are playable, an error will be thrown regardless of this setting.
726+
</div>
727+
728+
### onVideoTrackNotPlayable
729+
730+
_type_: `string|undefined`
731+
732+
_defaults_: `"continue"`
733+
734+
Specifies the behavior when all video tracks are not playable.
735+
736+
Those are the possible values for that option:
737+
738+
- `"continue"`: The player will proceed to play the content without video.
739+
740+
- `"error"`: The player will throw an error to indicate that the video tracks could not be
741+
played.
742+
743+
<div class="note">
744+
If neither the audio nor the video tracks are playable, an error will be thrown regardless of this setting.
745+
</div>
746+
709747
### lowLatencyMode
710748

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

932970
Example:
933971

doc/reference/API_Reference.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,12 @@ events and so on.
162162
- [`defaultAudioTrackSwitchingMode`](../api/Loading_a_Content.md#defaultaudiotrackswitchingmode):
163163
Default behavior when switching the audio track.
164164

165+
- [`onAudioTrackNotPlayable`](../api/Loading_a_Content.md#onaudiotracknotplayable):
166+
Specifies the behavior when all audio tracks are not playable.
167+
168+
- [`onVideoTrackNotPlayable`](../api/Loading_a_Content.md#onvideotracknotplayable):
169+
Specifies the behavior when all video tracks are not playable.
170+
165171
- [`lowLatencyMode`](../api/Loading_a_Content.md#lowlatencymode): Allows to play
166172
low-latency contents efficiently.
167173

0 commit comments

Comments
 (0)