![]() And don’t forget you should use the original content url you used to download the content (not the local path to the cache folder or any file in it).For you folks, we have compiled here a list of the 101 best free software that you can use on your Mac to start creating things. You need to use a CacheDataSource (or CacheDataSourceFactory) with the Cache you used for downloading while creating your MediaSource. Downloaded content is split into multiple small cache files so it isn’t possible to play content directly from the files. Playing the downloaded content is basically reading data from cache instead of network. Details will be covered in a separate post. Additionally you need to specify which representations you want to download. ![]() There is also an optional data parameter which can be used to store application specific information.Ĭreating DownloadActions for DASH, HLS and SmoothStreaming is similar. You need to specify the uri of the content and whether you want to download it, or remove what has already been downloaded. For example, to download a progressive stream, you need to create a ProgressiveDownloadAction: ProgressiveDownloadAction( Uri uri, // Uri of the data to be downloaded boolean removeAction, // If true, removes downloaded data String data, // Optional custom data for this action String customCacheKey) // Optional custom cache key ![]() You need to use the right subclass of DownloadAction for the stream you want to download. startWithAction( Context context, Class clazz, // your subclass DownloadAction downloadAction, boolean foreground) To do a request you can call: DownloadService. The service is started with the first download request. There is another constructor of DownloadManager by which you can set the maximum number of simultaneous downloads. You need to pass in the Deserializers associated with the stream types you want to download. For example DashDownloadAction.DESERIALIZER for DASH content. There is one Deserializer implementation for each stream type.
0 Comments
Leave a Reply. |