fix(android): implement live configuration management (#3792)

* perf: ensure we do not provide callback to native if no callback provided from app

* chore: rework bufferConfig to make it more generic and reduce ReactExoplayerView code size

* chore: improve issue template

* fix(android): avoid video view flickering at playback startup

* feat(android): implement live buffer configuration

* chore: fix linter
This commit is contained in:
Olivier Bouillet
2024-05-20 16:18:20 +02:00
committed by GitHub
parent 8fdc52372c
commit e16730de11
7 changed files with 110 additions and 1 deletions

View File

@@ -93,6 +93,14 @@ export type Seek = Readonly<{
tolerance?: Float;
}>;
type BufferConfigLive = Readonly<{
maxPlaybackSpeed?: Float;
minPlaybackSpeed?: Float;
maxOffsetMs?: Int32;
minOffsetMs?: Int32;
targetOffsetMs?: Int32;
}>;
type BufferingStrategyType = WithDefault<string, 'Default'>;
type BufferConfig = Readonly<{
@@ -105,6 +113,7 @@ type BufferConfig = Readonly<{
minBackBufferMemoryReservePercent?: Float;
minBufferMemoryReservePercent?: Float;
cacheSizeMB?: Float;
live?: BufferConfigLive;
}>;
type SubtitleStyle = Readonly<{

View File

@@ -74,6 +74,14 @@ export enum BufferingStrategyType {
DEPENDING_ON_MEMORY = 'DependingOnMemory',
}
export type BufferConfigLive = {
maxPlaybackSpeed?: number;
minPlaybackSpeed?: number;
maxOffsetMs?: number;
minOffsetMs?: number;
targetOffsetMs?: number;
};
export type BufferConfig = {
minBufferMs?: number;
maxBufferMs?: number;
@@ -84,6 +92,7 @@ export type BufferConfig = {
minBackBufferMemoryReservePercent?: number;
minBufferMemoryReservePercent?: number;
cacheSizeMB?: number;
live?: BufferConfigLive;
};
export enum SelectedTrackType {