Возникли проблемы с запуском Exoplayer. Мне удалось загрузить видео с URL-адреса. Но воспроизводит только звук. Значит я что-то делаю не так.
BandwidthMeter bandwidthMeter = new DefaultBandwidthMeter();
TrackSelection.Factory videoTrackSelectionFactory = new AdaptiveVideoTrackSelection.Factory(bandwidthMeter);
TrackSelector trackSelector = new DefaultTrackSelector(videoTrackSelectionFactory);
LoadControl loadControl = new DefaultLoadControl();
SimpleExoPlayer exoPlayer = ExoPlayerFactory.newSimpleInstance(simpleExoPlayerView.getContext(), trackSelector, loadControl);
Uri mp4VideoUri = Uri.parse(videoUri);
DefaultHttpDataSourceFactory dataSourceFactory = new DefaultHttpDataSourceFactory("ExoPlayerDemo");
ExtractorsFactory extractor = new DefaultExtractorsFactory();
MediaSource videoSource = new ExtractorMediaSource(mp4VideoUri, dataSourceFactory, extractor, null, null);
exoPlayer.prepare(videoSource);
exoPlayer.setPlayWhenReady(true);
Вот как я могу воспроизводить только звук. Не уверен, что я должен изменить.