exoplayer

Exoplayer2 - ConcatenatingMediaSource, duration of all sources

六月ゝ 毕业季﹏ 提交于 2021-01-27 11:56:42
问题 I have basic code for playing couple of audio files via exoplayer ExtractorMediaSource audioSource = new ExtractorMediaSource(uri, dataSourceFactory, extractor, null, null); ExtractorMediaSource audioSource2 = new ExtractorMediaSource(uri2, dataSourceFactory2, extractor, null, null); ConcatenatingMediaSource concatenatedSource = new ConcatenatingMediaSource(audioSource, audioSource2); I'm trying to get duration off all media sources using code example from https://github.com/google/ExoPlayer

How to place the controls of an Exoplayer outside of the PlayerView

﹥>﹥吖頭↗ 提交于 2021-01-05 06:10:48
问题 I'm using Exoplayer2 to show videos in my application. I need the controls to be visible at all time. I can archive this by setting app:show_timeout="0" . But when the controls are always visible they take up space in the PlayerView. I would like to show the controls beneath the PlayerView, so that I can always show to whole video. This is my layout file: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas

How to place the controls of an Exoplayer outside of the PlayerView

本小妞迷上赌 提交于 2021-01-05 06:07:31
问题 I'm using Exoplayer2 to show videos in my application. I need the controls to be visible at all time. I can archive this by setting app:show_timeout="0" . But when the controls are always visible they take up space in the PlayerView. I would like to show the controls beneath the PlayerView, so that I can always show to whole video. This is my layout file: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas

Exoplayer video loading speed

江枫思渺然 提交于 2020-12-13 04:36:32
问题 I'm looking to implement exoplayer in my project. I have successfully implemented it, but the loading time of video is slow. how to implement or to achieve speed loading of the video in exoplayer? just like tiktok does it - immediately loads the video and starts playing 回答1: Try below code It's make buffer time small So,you can load video more speedily. //Minimum Video you want to buffer while Playing private int MIN_BUFFER_DURATION = 2000; //Max Video you want to buffer during PlayBack

seekTo restarting playback on exoplayer

耗尽温柔 提交于 2020-12-03 07:32:54
问题 While trying to call seekTo function of exoplayer instance the playback is getting reset and playing from start after buffering live audio stream. As some blogs and gists suggest tried calling seekto after pausing exoplayer and then starting the playback again after calling seekto but got no effect on it, its just re-buffering playback and starting again. Below is how i tried so far: here is my onCreate event where the seekbar events are handled along with exoplayer seekto calls protected

seekTo restarting playback on exoplayer

社会主义新天地 提交于 2020-12-03 07:32:28
问题 While trying to call seekTo function of exoplayer instance the playback is getting reset and playing from start after buffering live audio stream. As some blogs and gists suggest tried calling seekto after pausing exoplayer and then starting the playback again after calling seekto but got no effect on it, its just re-buffering playback and starting again. Below is how i tried so far: here is my onCreate event where the seekbar events are handled along with exoplayer seekto calls protected