Created
September 7, 2020 23:15
-
-
Save Ochornma/491be4ae5ebd873063c7515eb0fd5a0e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val dataSourceFactory = DefaultDataSourceFactory(context, Util.getUserAgent(context, getString(R.string.app_name))) | |
| val cachedDataSourceFactory =CacheDataSourceFactory((application as App).appContainer.downloadCache, dataSourceFactory) | |
| val mediaSources = ProgressiveMediaSource.Factory(cachedDataSourceFactory).createMediaSource( | |
| Uri.parse(media.url)) | |
| player.prepare(mediaSources) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment