android-videoview

Why does MediaPlayer.setLooping() cause an error when using VideoView?

不羁岁月 提交于 2021-02-10 23:43:35
问题 We are trying to use a VideoView to play a video in an Android Activiy. I've read the MediaPlayer documentation and studied its state diagram. We get a Media Player error if we call this method: MediaPlayer.setLooping() from this listener method: MediaPlayer.OnPreparedListener.onPrepared() The error message from LogCat: error (-38, 0) Note: We have tested on two physical devices and this only happens on our Motorola Xoom. If I comment out this line: mp.setLooping(false); everything works fine

Why does MediaPlayer.setLooping() cause an error when using VideoView?

谁都会走 提交于 2021-02-10 23:41:02
问题 We are trying to use a VideoView to play a video in an Android Activiy. I've read the MediaPlayer documentation and studied its state diagram. We get a Media Player error if we call this method: MediaPlayer.setLooping() from this listener method: MediaPlayer.OnPreparedListener.onPrepared() The error message from LogCat: error (-38, 0) Note: We have tested on two physical devices and this only happens on our Motorola Xoom. If I comment out this line: mp.setLooping(false); everything works fine

Android - how to set a thumbnail on a VideoView with a uri source?

£可爱£侵袭症+ 提交于 2021-02-10 12:42:07
问题 I need to get an image from a uri into my VideoView when it loads. It should disappear and start playing the video when play is hit. This is my VideoView code - <RelativeLayout android:id="@+id/video_frame" android:layout_width="fill_parent" android:layout_height="300dp" android:background="#000" > <VideoView android:id="@+id/video" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_centerInParent="true" /> <ImageButton android:id="@+id/play_button"

Android - how to set a thumbnail on a VideoView with a uri source?

偶尔善良 提交于 2021-02-10 12:40:47
问题 I need to get an image from a uri into my VideoView when it loads. It should disappear and start playing the video when play is hit. This is my VideoView code - <RelativeLayout android:id="@+id/video_frame" android:layout_width="fill_parent" android:layout_height="300dp" android:background="#000" > <VideoView android:id="@+id/video" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_centerInParent="true" /> <ImageButton android:id="@+id/play_button"

Android - how to set a thumbnail on a VideoView with a uri source?

 ̄綄美尐妖づ 提交于 2021-02-10 12:40:00
问题 I need to get an image from a uri into my VideoView when it loads. It should disappear and start playing the video when play is hit. This is my VideoView code - <RelativeLayout android:id="@+id/video_frame" android:layout_width="fill_parent" android:layout_height="300dp" android:background="#000" > <VideoView android:id="@+id/video" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_centerInParent="true" /> <ImageButton android:id="@+id/play_button"

VideoView getCurrentPosition() irregularity on Acer Iconia A200

不打扰是莪最后的温柔 提交于 2021-02-07 11:16:57
问题 I have an application with a VideoView in it, I set a video to play in the VideoView. At some point while the video is playing it will get paused. Then after it is paused for some time it will begin to play the video again, but seek forward to the point that the video would be at if it had not been paused. So for instance Video starts playing Video paused at 6 seconds video stays paused for 10 seconds Video starts playing again <--- at this point I want the video to start playing at the 16

VideoView vs SurfaceView - Android

岁酱吖の 提交于 2020-12-13 07:21:17
问题 I am going to create InApp Video player which will play the videos from our content server and will also support live streaming. Previously was using third party API. I am confused about going with SurfaceView or VideoView as I have read that VideoView has more lines of code and will be less efficient. Help needed regarding from where should I start? Also need clarity between both. Yes, I have gone through some questions but still confused. Thank you in Advance. 回答1: Frankly Speaking,

Android Video stops playing after multiple plays Error 1, 2147483648

白昼怎懂夜的黑 提交于 2020-12-01 10:26:06
问题 OK, this is a little frustrating, and I have searched Stack but none of the answers seems to help. I have an Android app which cycles through different content on the screen. At one point it plays a video, the same video, loaded from the same place. After a random number of plays, it decides to stop playing the video file and throws the error up above (-2147483648) which is a generic file not found / incorrect format error. The problem is the video plays correctly numerous times before this