fix(android)!: rework video tracks management (#3778)
* fix: fix crash when invalid index type is provided and minor clean up * fix: review video track management. Fix index support and rework string vs int in tracks management * fix: ABR track selection check * fix: split track selector in sample and lint code * fix: ensure we don't report null fields * chore: improve tracks displayed * chore: start moving to selection by index only
This commit is contained in:
@@ -21,6 +21,7 @@ import type {
|
||||
|
||||
export type AudioTrack = OnAudioTracksData['audioTracks'][number];
|
||||
export type TextTrack = OnTextTracksData['textTracks'][number];
|
||||
export type VideoTrack = OnVideoTracksData['videoTracks'][number];
|
||||
|
||||
export type OnLoadData = Readonly<{
|
||||
currentTime: number;
|
||||
@@ -48,6 +49,15 @@ export type OnLoadData = Readonly<{
|
||||
type?: WithDefault<'srt' | 'ttml' | 'vtt', 'srt'>;
|
||||
selected?: boolean;
|
||||
}[];
|
||||
videoTracks: {
|
||||
index: number;
|
||||
tracksID?: string;
|
||||
codecs?: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
bitrate?: number;
|
||||
selected?: boolean;
|
||||
}[];
|
||||
}>;
|
||||
|
||||
export type OnTextTracksData = Readonly<{
|
||||
|
@@ -117,7 +117,7 @@ export enum SelectedVideoTrackType {
|
||||
|
||||
export type SelectedVideoTrack = {
|
||||
type: SelectedVideoTrackType;
|
||||
value?: number;
|
||||
value?: string | number;
|
||||
};
|
||||
|
||||
export type SubtitleStyle = {
|
||||
|
Reference in New Issue
Block a user