public void initVideoPlayer() {
player = new ExoPlayer.Builder(context).build();
ProgressiveMediaSource mediaSource = new ProgressiveMediaSource.Factory(
new CacheDataSource.Factory()
.setCache(ApplicationClass.getInstance().simpleCache)
.setUpstreamDataSourceFactory(new DefaultHttpDataSource.Factory()
.setUserAgent("ExoplayerDemo"))
.setFlags(CacheDataSource.FLAG_IGNORE_CACHE_ON_ERROR)
).createMediaSource(MediaItem.fromUri(mediaURI));
playerView.setPlayer(player);
player.setMediaSource(mediaSource);
player.prepare();
}
I'm getting error in Applicationclass in above code. I changed that to SimpleMediaPlayer got an error error: cannot find symbol.setCache(SimpleMediaPlayer.getInstance().simpleCache)
I'm getting error in
Applicationclassin above code. I changed that toSimpleMediaPlayergot an errorerror: cannot find symbol.setCache(SimpleMediaPlayer.getInstance().simpleCache)