Last active
September 8, 2017 23:30
-
-
Save isaidamier/d44b49fa9f38edd0c74d209eb9089126 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
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory( | |
this, | |
Util.getUserAgent(this, APP_NAME), | |
(DefaultBandwidthMeter) bandwidthMeter);//note the type casting | |
ExtractorsFactory extractorsFactory = new DefaultExtractorsFactory(); | |
//normally we would have this in string.xml or such instead of hardcoding | |
String waterUrl="https://storage.googleapis.com/android-tv/Sample%20videos/" + | |
"Google%2B/Google%2B_%20Instant%20Upload.mp4" | |
MediaSource videoSource = new ExtractorMediaSource( | |
Uri.parse(waterUrl), | |
dataSourceFactory, | |
extractorsFactory, | |
null, null | |
); | |
player.prepare(videoSource); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment