mirror of
https://github.com/jellyfin/jellyfin-androidtv.git
synced 2024-11-30 09:30:54 +00:00
Enable constant bitrate seeking
This commit is contained in:
parent
9ac58e22fb
commit
e65492c254
@ -191,6 +191,8 @@ public class VideoManager {
|
||||
httpDataSourceFactory.setReadTimeoutMs(30 * 1000);
|
||||
DefaultDataSource.Factory dataSourceFactory = new DefaultDataSource.Factory(context, httpDataSourceFactory);
|
||||
exoPlayerBuilder.setMediaSourceFactory(new DefaultMediaSourceFactory(dataSourceFactory, extractorsFactory));
|
||||
extractorsFactory.setConstantBitrateSeekingEnabled(true);
|
||||
extractorsFactory.setConstantBitrateSeekingAlwaysEnabled(true);
|
||||
|
||||
return exoPlayerBuilder;
|
||||
}
|
||||
|
@ -84,14 +84,15 @@ class ExoPlayerBackend(
|
||||
}
|
||||
),
|
||||
DefaultExtractorsFactory().apply {
|
||||
val isLowRamDevice =
|
||||
context.getSystemService<ActivityManager>()?.isLowRamDevice == true
|
||||
val isLowRamDevice = context.getSystemService<ActivityManager>()?.isLowRamDevice == true
|
||||
setTsExtractorTimestampSearchBytes(
|
||||
when (isLowRamDevice) {
|
||||
true -> TS_SEARCH_BYTES_LM
|
||||
false -> TS_SEARCH_BYTES_HM
|
||||
}
|
||||
)
|
||||
setConstantBitrateSeekingEnabled(true)
|
||||
setConstantBitrateSeekingAlwaysEnabled(true)
|
||||
}
|
||||
))
|
||||
.setPauseAtEndOfMediaItems(true)
|
||||
|
Loading…
Reference in New Issue
Block a user