From 5a073f987271e0530885abeec5c42ae316317f90 Mon Sep 17 00:00:00 2001 From: Florent Bouisset Date: Mon, 6 Jan 2025 10:13:12 +0100 Subject: [PATCH] add documentation --- doc/api/Loading_a_Content.md | 40 +++++++++++++++++++++++++++++++++- doc/reference/API_Reference.md | 6 +++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/doc/api/Loading_a_Content.md b/doc/api/Loading_a_Content.md index 7aa7bf5b6f..f9345c10fb 100644 --- a/doc/api/Loading_a_Content.md +++ b/doc/api/Loading_a_Content.md @@ -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. + +
+If neither the audio nor the video tracks are playable, an error will be thrown regardless of this setting. +
+ +### 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. + +
+If neither the audio nor the video tracks are playable, an error will be thrown regardless of this setting. +
+ ### lowLatencyMode _type_: `Boolean|undefined` @@ -927,7 +965,7 @@ The `serverSyncInfos` object contains two keys:
The `performance.now()` API is used here because it is the main API to obtain a monotically increasing clock on the client-side. - +
Example: diff --git a/doc/reference/API_Reference.md b/doc/reference/API_Reference.md index 67da85c357..c6f8244c84 100644 --- a/doc/reference/API_Reference.md +++ b/doc/reference/API_Reference.md @@ -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.