Delay Test Repository
This is a meta repository implementation meant for testing. You can give it an actual repository and a delay, each request to your actual repository will then be delayed. This can be used to test a slow network.
Parameters
your actual MediaRepository
is the delay in milliseconds
Functions
This should return the chapters associated with an item. If an item does not have chapters you may return an empty list.
Supply a custom HttpDataSource.Factory. This is important for Youtube.
Get MediaMetadata information for a certain item. Please refer to the media3 documentation for MediaMetadata.
This should return a thumbnail associated with the provided timestamp of the provided item. The reason this function does not simply return a Uri to a bitmap is that some platforms like Youtube provide the preview thumbnail as a collage of multiple thumbnails within one jpeg file. It is then the task of the client to crop this jpeg to only show the piece of that image that depicts the thumbnail for the given timestamp.
The amount of review thumbnails an item provides. This is used to tell async requesting tools how much requests to spawn to get all thumbnails. It's also used to calculate the correct keys for the caching repository.
Returns the information of the repository. Please see the documentation for RepoMetaInfo for more details.
This should return all the Streams associated with an item.
This should return all the Subtitles associated with an item.
Should return the link to a certain timestamp of the video/audio stream associated by item. An example for a timestamp link would be this (don't watch it though its dangerous): https://www.youtube.com/watch?v=H8ZH_mkfPUY&t=19s