mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
The `PreloadMediaSource` has below two new public methods that suppose to be called by the app: * `preload(long)` allows the apps to preload the source at the passed start position before playback. The preload efforts include preparing the source for a `Timeline`, creating and caching a `MediaPeriod`, preparing the period, selecting tracks on the period and continuing loading the data on the period. * `releasePreloadMediaSource()` allows the apps to release the preloaded progress. The `PreloadMediaPeriod` is designed to facilitate the `PreloadMediaSource` for the preloading work. It has a new package-private method `selectTracksForPreloading` which will cache the `SampleStream` that corresponds to the track selection made during the preloading, and when the `PreloadMediaPeriod.selectTracks` is called for playback, it will uses the preloaded streams if the new selection is equal to the selection made during the preloading. Also add a shortform demo module to demo the usage of `PreloadMediaSource` with the short-form content use case. PiperOrigin-RevId: 574439529 |
||
|---|---|---|
| .. | ||
| cast | ||
| common | ||
| container | ||
| database | ||
| datasource | ||
| datasource_cronet | ||
| datasource_okhttp | ||
| datasource_rtmp | ||
| decoder | ||
| decoder_av1 | ||
| decoder_ffmpeg | ||
| decoder_flac | ||
| decoder_midi | ||
| decoder_opus | ||
| decoder_vp9 | ||
| effect | ||
| exoplayer | ||
| exoplayer_dash | ||
| exoplayer_hls | ||
| exoplayer_ima | ||
| exoplayer_rtsp | ||
| exoplayer_smoothstreaming | ||
| exoplayer_workmanager | ||
| extractor | ||
| muxer | ||
| session | ||
| test_data | ||
| test_exoplayer_playback | ||
| test_session_common | ||
| test_session_current | ||
| test_utils | ||
| test_utils_robolectric | ||
| transformer | ||
| ui | ||
| ui_leanback | ||