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:
@@ -77,6 +77,15 @@ getLicense: (spcString, contentId, licenseUrl, loadedLicenseUrl) => {
|
||||
};
|
||||
```
|
||||
|
||||
### `contentId`
|
||||
|
||||
<PlatformsList types={['iOS']} />
|
||||
|
||||
Type: string\
|
||||
Default: undefined
|
||||
|
||||
Specify the content id of the stream, otherwise it will take the host value from `loadingRequest.request.URL.host` (f.e: `skd://testAsset` -> will take `testAsset`)
|
||||
|
||||
### `headers`
|
||||
|
||||
<PlatformsList types={['Android', 'iOS']} />
|
||||
@@ -121,15 +130,6 @@ You can specify the DRM type, either by string or using the exported DRMType enu
|
||||
Valid values are, for Android: DRMType.WIDEVINE / DRMType.PLAYREADY / DRMType.CLEARKEY.
|
||||
for iOS: DRMType.FAIRPLAY
|
||||
|
||||
### `contentId`
|
||||
|
||||
<PlatformsList types={['iOS']} />
|
||||
|
||||
Type: string\
|
||||
Default: undefined
|
||||
|
||||
Specify the content id of the stream, otherwise it will take the host value from `loadingRequest.request.URL.host` (f.e: `skd://testAsset` -> will take `testAsset`)
|
||||
|
||||
## Common Usage Scenarios
|
||||
|
||||
### Send cookies to license server
|
||||
|
@@ -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']} />
|
||||
|
@@ -12,6 +12,14 @@ This page shows the list of available methods
|
||||
|
||||
Take the player out of fullscreen mode.
|
||||
|
||||
### `pause`
|
||||
|
||||
<PlatformsList types={['Android', 'iOS']} />
|
||||
|
||||
`pause(): Promise<void>`
|
||||
|
||||
Pause the video.
|
||||
|
||||
### `presentFullscreenPlayer`
|
||||
|
||||
<PlatformsList types={['Android', 'iOS']} />
|
||||
@@ -24,14 +32,6 @@ On iOS, this displays the video in a fullscreen view controller with controls.
|
||||
|
||||
On Android, this puts the navigation controls in fullscreen mode. It is not a complete fullscreen implementation, so you will still need to apply a style that makes the width and height match your screen dimensions to get a fullscreen video.
|
||||
|
||||
### `pause`
|
||||
|
||||
<PlatformsList types={['Android', 'iOS']} />
|
||||
|
||||
`pause(): Promise<void>`
|
||||
|
||||
Pause the video.
|
||||
|
||||
### `resume`
|
||||
|
||||
<PlatformsList types={['Android', 'iOS']} />
|
||||
@@ -40,6 +40,14 @@ Pause the video.
|
||||
|
||||
Resume the video.
|
||||
|
||||
### `restoreUserInterfaceForPictureInPictureStopCompleted`
|
||||
|
||||
<PlatformsList types={['iOS']} />
|
||||
|
||||
`restoreUserInterfaceForPictureInPictureStopCompleted(restored)`
|
||||
|
||||
This function corresponds to the completion handler in Apple's [restoreUserInterfaceForPictureInPictureStop](https://developer.apple.com/documentation/avkit/avpictureinpicturecontrollerdelegate/1614703-pictureinpicturecontroller?language=objc). IMPORTANT: This function must be called after `onRestoreUserInterfaceForPictureInPictureStop` is called.
|
||||
|
||||
### `save`
|
||||
|
||||
<PlatformsList types={['iOS']} />
|
||||
@@ -64,14 +72,6 @@ Future:
|
||||
- Will support more formats in the future through options
|
||||
- Will support custom directory and file name through options
|
||||
|
||||
### `restoreUserInterfaceForPictureInPictureStopCompleted`
|
||||
|
||||
<PlatformsList types={['iOS']} />
|
||||
|
||||
`restoreUserInterfaceForPictureInPictureStopCompleted(restored)`
|
||||
|
||||
This function corresponds to the completion handler in Apple's [restoreUserInterfaceForPictureInPictureStop](https://developer.apple.com/documentation/avkit/avpictureinpicturecontrollerdelegate/1614703-pictureinpicturecontroller?language=objc). IMPORTANT: This function must be called after `onRestoreUserInterfaceForPictureInPictureStop` is called.
|
||||
|
||||
### `seek`
|
||||
|
||||
<PlatformsList types={['All']} />
|
||||
@@ -143,6 +143,8 @@ Possible values are:
|
||||
|
||||
### `isCodecSupported`
|
||||
|
||||
<PlatformsList types={['Android']} />
|
||||
|
||||
Indicates whether the provided codec is supported level supported by device.
|
||||
|
||||
parameters:
|
||||
@@ -156,14 +158,12 @@ Possible results:
|
||||
- `software` - codec is supported by software only
|
||||
- `unsupported` - codec is not supported
|
||||
|
||||
<PlatformsList types={['Android']} />
|
||||
|
||||
### `isHEVCSupported`
|
||||
|
||||
Helper which Indicates whether the provided HEVC/1920\*1080 is supported level supported by device. It uses isCodecSupported internally.
|
||||
|
||||
<PlatformsList types={['Android']} />
|
||||
|
||||
Helper which Indicates whether the provided HEVC/1920\*1080 is supported level supported by device. It uses isCodecSupported internally.
|
||||
|
||||
### Example Usage
|
||||
|
||||
```tsx
|
||||
|
@@ -161,7 +161,7 @@ Determines if the player needs to throw an error when connection is lost or not
|
||||
- **false (default)** - Player will throw an error when connection is lost
|
||||
- **true** - Player will keep trying to buffer when network connect is lost
|
||||
|
||||
### `DRM`
|
||||
### `drm`
|
||||
|
||||
<PlatformsList types={['Android', 'iOS']} />
|
||||
|
||||
@@ -209,7 +209,7 @@ Enable video filter.
|
||||
- **false (default)** - Don't enable filter
|
||||
- **true** - Enable filter
|
||||
|
||||
### `Focusable`
|
||||
### `focusable`
|
||||
|
||||
<PlatformsList types={['Android']} />
|
||||
|
||||
@@ -280,6 +280,20 @@ Controls the iOS silent switch behavior
|
||||
- **"ignore"** - Play audio even if the silent switch is set
|
||||
- **"obey"** - Don't play audio if the silent switch is set
|
||||
|
||||
### `localSourceEncryptionKeyScheme`
|
||||
|
||||
<PlatformsList types={['iOS']} />
|
||||
|
||||
Set the url scheme for stream encryption key for local assets
|
||||
|
||||
Type: String
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
localSourceEncryptionKeyScheme="my-offline-key"
|
||||
```
|
||||
|
||||
### `maxBitRate`
|
||||
|
||||
<PlatformsList types={['Android', 'iOS', 'visionOS']} />
|
||||
@@ -434,34 +448,6 @@ Determine whether to repeat the video when the end is reached
|
||||
- **false (default)** - Don't repeat the video
|
||||
- **true** - Repeat the video
|
||||
|
||||
### `onAudioTracks`
|
||||
|
||||
<PlatformsList types={['Android']} />
|
||||
|
||||
Callback function that is called when audio tracks change
|
||||
|
||||
Payload:
|
||||
|
||||
| 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, selected: true },
|
||||
{ language: 'en', title: 'English', type: 'audio/mpeg', index: 1 }
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
### `reportBandwidth`
|
||||
|
||||
<PlatformsList types={['Android']} />
|
||||
@@ -782,11 +768,18 @@ textTracks={[
|
||||
]}
|
||||
```
|
||||
|
||||
### `trackId`
|
||||
### `useSecureView`
|
||||
|
||||
<PlatformsList types={['Android']} />
|
||||
|
||||
Configure an identifier for the video stream to link the playback context to the events emitted.
|
||||
Force the output to a SurfaceView and enables the secure surface.
|
||||
|
||||
This will override useTextureView flag.
|
||||
|
||||
SurfaceView is is the only one that can be labeled as secure.
|
||||
|
||||
- **true** - Use security
|
||||
- **false (default)** - Do not use security
|
||||
|
||||
### `useTextureView`
|
||||
|
||||
@@ -804,19 +797,6 @@ useTextureView can only be set at same time you're setting the source.
|
||||
- **true (default)** - Use a TextureView
|
||||
- **false** - Use a SurfaceView
|
||||
|
||||
### `useSecureView`
|
||||
|
||||
<PlatformsList types={['Android']} />
|
||||
|
||||
Force the output to a SurfaceView and enables the secure surface.
|
||||
|
||||
This will override useTextureView flag.
|
||||
|
||||
SurfaceView is is the only one that can be labeled as secure.
|
||||
|
||||
- **true** - Use security
|
||||
- **false (default)** - Do not use security
|
||||
|
||||
### `volume`
|
||||
|
||||
<PlatformsList types={['All']} />
|
||||
@@ -826,17 +806,3 @@ Adjust the volume.
|
||||
- **1.0 (default)** - Play at full volume
|
||||
- **0.0** - Mute the audio
|
||||
- **Other values** - Reduce volume
|
||||
|
||||
### `localSourceEncryptionKeyScheme`
|
||||
|
||||
<PlatformsList types={['iOS']} />
|
||||
|
||||
Set the url scheme for stream encryption key for local assets
|
||||
|
||||
Type: String
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
localSourceEncryptionKeyScheme="my-offline-key"
|
||||
```
|
||||
|
Reference in New Issue
Block a user