docs: review and clean up (#3730)

* fix(ts): onPlaybackRateChangeData was not correctly typed

* fix: ensure tracks are well displayed in the sample

* chore: reorder drm props

* chore: reorder events

* docs: move onAudioTracks to events

* docs: reorder and clean <PlatformsList from methods

* docs: fix props case naming

* docs: fix ordering

* docs: fix ordering & remove trackId

* chore: remove sample build from installation page

* docs: remove outdated information

* docs: remove beta information from doc landing page
This commit is contained in:
Olivier Bouillet
2024-05-04 14:36:39 +02:00
committed by GitHub
parent edbb3b60aa
commit 4c63988d12
9 changed files with 104 additions and 182 deletions

View File

@@ -45,20 +45,22 @@ Callback function that is called when audio tracks change
Payload:
An **array** of
Property | Type | Description
--- | --- | ---
index | number | Index number of the track
title | string | Description of the track
language | string | 2 letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) or 3 letter [ISO 639-2](https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes) language code
type | string | Mime type of track
| Property | Type | Description |
| -------- | ------- | ---------------------------------------------------------------------------------------------------------- |
| index | number | Internal track ID |
| title | string | Descriptive name for the track |
| language | string | 2 letter [ISO 639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) representing the language |
| bitrate | number | bitrate of track |
| type | string | Mime type of track |
| selected | boolean | true if track is playing |
Example:
```javascript
{
audioTracks: [
{language: 'es', title: 'Spanish', type: 'audio/mpeg', index: 0},
{language: 'en', title: 'English', type: 'audio/mpeg', index: 1},
{ language: 'es', title: 'Spanish', type: 'audio/mpeg', index: 0, selected: true },
{ language: 'en', title: 'English', type: 'audio/mpeg', index: 1 }
];
}
```
@@ -485,6 +487,28 @@ Example:
}
```
### `onTextTrackDataChanged`
<PlatformsList types={['Android', 'iOS']} />
Callback function that is called when new subtitle data is available. It provides the actual subtitle content for the current selected text track, if available (mainly WebVTT).
Payload:
| Property | Type | Description |
| ---------------- | -------- | -------------------------------------------------- |
| `subtitleTracks` | `string` | The subtitles text content in a compatible format. |
Example:
```javascript
{
subtitleTracks: "This blade has a dark past.",
}
```
For details on how to control the visibility of subtitles, see the [subtitleStyle](./props.mdx#subtitleStyle) section.
### `onTextTracks`
<PlatformsList types={['Android', 'iOS']} />
@@ -516,28 +540,6 @@ Example:
}
```
### `onTextTrackDataChanged`
<PlatformsList types={['Android', 'iOS']} />
Callback function that is called when new subtitle data is available. It provides the actual subtitle content for the current selected text track, if available (mainly WebVTT).
Payload:
| Property | Type | Description |
| ---------------- | -------- | -------------------------------------------------- |
| `subtitleTracks` | `string` | The subtitles text content in a compatible format. |
Example:
```javascript
{
subtitleTracks: "This blade has a dark past.",
}
```
For details on how to control the visibility of subtitles, see the [subtitleStyle](./props.mdx#subtitleStyle) section.
### `onVideoTracks`
<PlatformsList types={['Android']} />