exoplayer

ExoPlayer cache

女生的网名这么多〃 提交于 2019-12-09 04:18:03
问题 I'm traying to use ExoPlayer for playback video over http. And I want to save video after video was loaded and play it from cache. How Do implement cache and playback from cache? Can give me any samples. 回答1: You use cacheDataSource created using cache and dataSource. This cacheDataSource is then used by ExtractorSampleSource.Below is the code for audioRenderer, similarly can be done for videoRender; passing to exoplayerInstance.prepare(renderers). Cache cache = new SimpleCache(mCtx

System UI (Statusbar and Navigation Bar) render artifact [duplicate]

半世苍凉 提交于 2019-12-08 19:57:32
This question already has answers here : Android SystemUI glitches in Lollipop (6 answers) Closed 4 years ago . I have a full screen video using Exoplayer in a FullScreenActivity where status bar and navigation bar are hidden (from android >= 4.4). When the activity is finished , I go back to last activity which is NOT a fullscreen (system ui is displayed) and 70% of the time I'm having a really strange issue on the system UI as follow : Note that the image is the original one, so the white space on the right of the navigation bar is displayed on the phone. This artefact disappear when another

How to catch all errors for ExoPlayer?

回眸只為那壹抹淺笑 提交于 2019-12-08 17:07:10
问题 I implemented ExoPlayer as player for my application. But I can´t find out how to catch all ExoPlayer errors to avoid app crash. I added following listener, but it doesn´t catch all errors. I have to use DRM and it sometimes crash on some problem with it, but I can´t set listener before, because player is NULL. player = ExoPlayerFactory.newSimpleInstance(context, trackSelector, loadControl, drmSessionManager); player.addListener(new ExoPlayer.EventListener() { @Override public void

Exoplayer jar file

喜你入骨 提交于 2019-12-08 12:46:42
问题 I'm trying to import exoplayer library to my project but I get many errors, so I decided to add exoplayer as a jar file but the problem is I cannot find it in internet to download. 回答1: Per the ExoPlayer Github repository, you must download the repository and build a jar manually. Full instructions can be found at the Google Media Framework ad sample. If you are using Gradle and Android Studio, however, you don't need to download the jar at all, instead using the jcenter dependency: compile

Exoplayer player video mp4 e stream m3u8

自闭症网瘾萝莉.ら 提交于 2019-12-08 08:28:35
问题 Is there a way to run an exoplayer with both mp4 and stream m3u8 videos? I tried but I could not find a solution. I found the following sources for testing. Video mp4: here Stream m3u8: here This is the code I wrote with the mp4 videos works, but with m3u8, no. I made several attempts, but I did not succeed, I was thinking of using HlsMediaSource but I could not make it work. Error, the following function is called within SimpleVideoStream.java : public void onPlayerError(ExoPlaybackException

MediaSession finishBroadcast() exception

a 夏天 提交于 2019-12-08 06:23:25
any idea about the cause of this exception? 01-10 15:33:43.111 21717-21717/com.music.ofek.iplay E/AndroidRuntime: FATAL EXCEPTION: main Process: com.music.ofek.iplay, PID: 21717 java.lang.IllegalStateException: finishBroadcast() called outside of a broadcast at android.os.RemoteCallbackList.finishBroadcast(RemoteCallbackList.java:292) at android.support.v4.media.session.MediaSessionCompat$MediaSessionImplApi21.setPlaybackState(MediaSessionCompat.java:3226) at android.support.v4.media.session.MediaSessionCompat.setPlaybackState(MediaSessionCompat.java:608) at com.google.android.exoplayer2.ext

MediaSession finishBroadcast() exception

﹥>﹥吖頭↗ 提交于 2019-12-08 04:01:40
问题 any idea about the cause of this exception? 01-10 15:33:43.111 21717-21717/com.music.ofek.iplay E/AndroidRuntime: FATAL EXCEPTION: main Process: com.music.ofek.iplay, PID: 21717 java.lang.IllegalStateException: finishBroadcast() called outside of a broadcast at android.os.RemoteCallbackList.finishBroadcast(RemoteCallbackList.java:292) at android.support.v4.media.session.MediaSessionCompat$MediaSessionImplApi21.setPlaybackState(MediaSessionCompat.java:3226) at android.support.v4.media.session

System UI (Statusbar and Navigation Bar) render artifact [duplicate]

六眼飞鱼酱① 提交于 2019-12-08 03:23:59
问题 This question already has answers here : Android SystemUI glitches in Lollipop (6 answers) Closed 4 years ago . I have a full screen video using Exoplayer in a FullScreenActivity where status bar and navigation bar are hidden (from android >= 4.4). When the activity is finished , I go back to last activity which is NOT a fullscreen (system ui is displayed) and 70% of the time I'm having a really strange issue on the system UI as follow : Note that the image is the original one, so the white

Stop audio playing when another app's audio comes in

别等时光非礼了梦想. 提交于 2019-12-08 02:19:59
问题 I would like to know how do I implement the behaviour, so that my radio streaming would stop playing if other audio would come in to play - for instance, user starts playing music, makes a call etc. In other words, how does my ExoPlayers knows that other audio is being played, or if it doesn't, do I have to listen for mediaplayer and call events? 回答1: Here is an example i made for an audio state manager , you can use it as a template. (created in 2016) As per the question - You need to use an

How to design custom seekbar and volume control for ExoPlayer in Android

北战南征 提交于 2019-12-08 02:11:51
问题 I have tried this and this for Design Custom Seekbar for ExoPlayer but no luck. I want to design custom thumb and ProgressBar for ExoPlayer. Following is the XML for ExoPlayer where I've tried to put seekbar but it's not coming as expected. <com.google.android.exoplayer.AspectRatioFrameLayout android:id="@+id/video_frame" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="center"> <SurfaceView android:id="@+id/surface_view" android:layout_width=