Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve TweaksConfig docs #432

Draft
wants to merge 4 commits into
base: development
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 28 additions & 24 deletions src/tweaksConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,69 +8,73 @@ export interface TweaksConfig {
/**
* The frequency in seconds `onTimeChanged` is called with `TimeChangedEvent`s.
*
* Default value in iOS is `1.0`.
* Default value in Android is `0.2`.
* Default value in iOS/tvOS is `1.0`.
*
* @platform iOS, Android
* @platform Android, iOS, tvOS
*/
timeChangedInterval?: number;
/**
* If enabled, HLS playlists will be parsed and additional features and events are enabled. This includes:
*
* - MetadataEvents carrying segment-specific metadata for custom HLS tags, like `#EXT-X-SCTE35`
* - MetadataParsedEvents carrying segment-specific metadata for custom HLS tags, like `#EXT-X-SCTE35`
* - DrmDataParsedEvents when a `#EXT-X-KEY` is found
* - `MetadataEvent`s carrying segment-specific metadata for custom HLS tags, like `#EXT-X-SCTE35`
* - `MetadataParsedEvent`s carrying segment-specific metadata for custom HLS tags, like `#EXT-X-SCTE35`
* - `DrmDataParsedEvent`s when a `#EXT-X-KEY` is found
* - `Player.availableVideoQualities` includes additional information
* - Automatic retries when HLS playlist requests failed with non-2xx HTTP status code
*
* Default is false.
* Default is `false`.
*
* @platform iOS
* @platform iOS, tvOS
*/
isNativeHlsParsingEnabled?: boolean;
/**
* If enabled, playlists will be downloaded by the Bitmovin Player SDK instead of AVFoundation.
* This enables additional features and events, like:
*
* - DownloadFinishedEvents for playlist downloads.
* - SourceWarningEvents when no `#EXT-X-PLAYLIST-TYPE` is found If set to false, enabling
* nativeHlsParsingEnabled won’t have any effect.
* - `DownloadFinishedEvent`s for playlist downloads.
* - `SourceWarningEvent`s when no `#EXT-X-PLAYLIST-TYPE` is found If set to false, enabling
* `isNativeHlsParsingEnabled` won’t have any effect.
*
* Default is true.
* Default is `true`.
*
* @platform iOS
* @platform iOS, tvOS
*/
isCustomHlsLoadingEnabled?: boolean;
/**
* The threshold which will be applied when seeking to the end in seconds. This value will be used
* to calculate the maximum seekable time when calling `player.seek(time:)` or `player.playlist.seek(source:time:)`,
* so the maximum value will be duration - seekToEndThreshold.
* so the maximum value will be `duration - seekToEndThreshold`.
*
* This is useful if the duration of the segments does not match the duration specified in the
* manifest. In this case, if we try to seek to the end, AVPlayer could get stuck and might stall
* manifest. In this case, if we try to seek to the end, `AVPlayer` could get stuck and might stall
* forever Therefore increasing this value could help.
*
* Default is 0.5.
* Default is `0.5`.
*
* @platform iOS
* @platform iOS, tvOS
*/
seekToEndThreshold?: number;
/**
* Specifies the player behaviour when `Player.play` is called. Default is 'relaxed'.
* Specifies the player behaviour when `Player.play` is called.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved the default value section before @platform

*
* - 'relaxed': Starts playback when enough media data is buffered and continuous playback without stalling can be ensured. If insufficient media data is buffered for playback to start, the player will act as if the buffer became empty during playback.
* - 'aggressive': When the buffer is not empty, this setting will cause the player to start playback of available media immediately. If insufficient media data is buffered for playback to start, the player will act as if the buffer became empty during playback.
* - relaxed: Starts playback when enough media data is buffered and continuous playback without stalling can be ensured. If insufficient media data is buffered for playback to start, the player will act as if the buffer became empty during playback.
* - aggressive: When the buffer is not empty, this setting will cause the player to start playback of available media immediately. If insufficient media data is buffered for playback to start, the player will act as if the buffer became empty during playback.
*
* @platform iOS
* Default is `relaxed`.
*
* @platform iOS, tvOS
*/
playbackStartBehaviour?: 'relaxed' | 'aggressive';
/**
* Specifies the player behaviour when stalling should be exited. Default is 'relaxed'.
* Specifies the player behaviour when stalling should be exited.
*
* - 'relaxed': The player will wait until the buffer is filled that it can, most likely, ensure continuous playback without another stalling right after playback continued.
* - 'aggressive': The player will try to unstall as soon as some media data became available and will start playback of this media immediately.
* - relaxed: The player will wait until the buffer is filled that it can, most likely, ensure continuous playback without another stalling right after playback continued.
* - aggressive: The player will try to unstall as soon as some media data became available and will start playback of this media immediately.
*
* @platform iOS
* Default is `relaxed`.
*
* @platform iOS, tvOS
*/
unstallingBehaviour?: 'relaxed' | 'aggressive';
/**
Expand Down
Loading