exoplayer2.x

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

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

Attempt to invoke virtual method 'float android.view.MotionEvent.getX()' On Exoplayer

[亡魂溺海] 提交于 2020-08-10 19:11:11
问题 I read multiple question on same issue but nothing helps in my case. Here when i implement SimpleOnGestureListener with onScroll on empty layout i can detect scroll up, down, right, left. but when i try same on ExoPlayer i get error saying java.lang.NullPointerException: Attempt to invoke virtual method 'float android.view.MotionEvent.getX()' on a null object reference at Activities.VideoPlayerActivity$3.onScroll(VideoPlayerActivity.java:174) at android.view.GestureDetector.onTouchEvent