android-videoview

Calling MediaPlayer.PrepareAsync from VideoView

扶醉桌前 提交于 2019-12-07 04:02:38
问题 I am trying to implement a playlist of videos so they have a smooth transition from one video to the next. The mediaPlayer object has a prepareasync() method that would seem to prebuffer the video so it's ready to play. How do I invoke the prepareasync method from the VideoView object? The examples I found for mediaPlayer either don't use VideoView and seem to create the surface from scratch. Or the examples use mediaPlayer as return parameter on videoview eventlisteners which seem to occur

Android get Video source path from VideoView

╄→尐↘猪︶ㄣ 提交于 2019-12-07 03:30:41
问题 I have VideoView instance. I need to know video source path from it. Is it possible? Can anybody help me? My code from WebChromeClient class is: @Override public void onShowCustomView(final View view, final CustomViewCallback callback) { super.onShowCustomView(view, callback); if (view instanceof FrameLayout) { final FrameLayout frame = (FrameLayout) view; if (frame.getFocusedChild() instanceof VideoView) { // get video view video = (VideoView) frame.getFocusedChild(); } } } How to get video

how to stream rtsp url using exoplayer?

£可爱£侵袭症+ 提交于 2019-12-07 01:24:58
问题 I want to stream rtsp video using exoplayer. I am using ExoMedia library which is an An Android ExoPlayer wrapper. I have search on stackoverflow but I didn't find any good answer. After some google search I found that exoplayer does not support rtsp stream issue 55. Is there any way to stream rtsp url using exoplayer? Here is my code. public class MainActivity extends AppCompatActivity implements OnPreparedListener{ EMVideoView emPlayer; @Override protected void onCreate(Bundle

Nested Fragment with VideoView streaming takes too long while stopping

那年仲夏 提交于 2019-12-06 19:56:26
I have a tab UI, with a Fragment Tab host at bottom and fragments in a container fragment. Every time I change Tab I switch between fragments within the container fragment. Now the issue is as below: I have a fragment with a video view streaming live video. while the video is buffering if I press back key the fragment takes too long to stop. I can see a big lag of 2-3 seconds from the time onStop() of this fragment till oCreateView() of other fragment. All my other methods like onDestroy, onDestroyVeiw() etc are empty. I have come to a conclusion that it is because the video view is busy with

video & image viewPager

爱⌒轻易说出口 提交于 2019-12-06 18:12:26
I have a problem in my code can anyone help me? I need to make app play story like Messenger app I want to display a list of images and videos in viewpager automatically or manually I do it but I faced some problem First: when page of image is view and the next page play video the sound of video is playing when view the image because the pager load the next fragment i used mViewPager.setOffscreenPageLimit(0); but i didn't do any thing Second one: when I move manually from video to image the video not stop playing when I search for a solution I found this: public void setUserVisibleHint(boolean

Navigation Drawer and VideoView in android

霸气de小男生 提交于 2019-12-06 17:10:59
问题 I am using a navigation drawer plus a tablayout. I have a video in my tab which was not visible at first, but I can hear the sound. Once I set video_view.setZOrderOnTop(true); and I can also see the video, but this causes an issue with navigation drawer. When I slide it, the video doesn't hide behind the navigation drawer as do all other elements. If I don't use video_view.setZOrderOnTop(true); then my drawer is works fine. main_activity.xml <android.support.v4.widget.DrawerLayout xmlns

How do i get thumbnail of a video in android

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 15:56:35
问题 i want some help in creating thumbnail of a video being recorded from my android phone and i have get this code from this Link, and i modified this part of the code to generate the thumbnail but somehow the thumbnail is not being generated , so any help will be appreciated. @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (resultCode == RESULT_OK && requestCode == VIDEO_CAPTURED) { videoFileUri

How to solve MediaPlayer error (100, 0) in nexus 5?

人走茶凉 提交于 2019-12-06 15:42:35
I am getting the following error in nexus 5 when I play the video for 5-10 minutes.This error is not occurring always.It is working in nexus 9 and samsung duos. 10-08 09:03:14.033 14588-14599 W/AudioSystem﹕ AudioFlinger server died! 10-08 09:03:14.033 14588-14778 W/IMediaDeathNotifier﹕ media server died 10-08 09:03:14.043 14588-14778 E/MediaPlayer﹕ error (100, 0) 10-08 09:03:14.043 14588-14588 D/AndroidRuntime﹕ Shutting down VM 10-08 09:03:14.043 14588-14588 W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41849ba8) 10-08 09:03:14.043 14588-14588 E/AndroidRuntime﹕ FATAL

Usable VideoView source code for Android 2.2

人盡茶涼 提交于 2019-12-06 15:35:51
I am building my own view for displaying videos, and I would like to base the custom view on the built-in Android VideoView. I'm therefore looking for the source code to VideoView. Most posts I've found on Stackoverflow and elsewhere point to grepcode. Unfortunately, the code on grepcode doesn't seem to be the code documented on developer.android.com and isn't very usable. For example, the VideoView.java on grepcode references an mContext object which is inherited from View, but not available in the View of the developer.android.com sdk. In addition, the VideoView calls a resume method of

streaming a webcam feed over rtsp using ffmpeg & ffserver to an android client

梦想与她 提交于 2019-12-06 15:19:45
I am trying to stream my webcam over rtsp and open the stream using android. I managed to get the first part working (rtsp stream) using ffserver and ffmpgeg. Here is my ffserver.conf file : HTTPPort 8000 RTSPPort 8001 HTTPBindAddress 192.168.1.74 RTSPBindAddress 192.168.1.74 MaxClients 100 MaxBandwidth 10000 NoDefaults <Feed witty.ffm> File /tmp/witty.ffm FileMaxSize 20M </Feed> <Stream witty.mov> Feed witty.ffm Format rtp VideoSize 640x480 VideoQMin 1 VideoQMax 20 VideoFrameRate 30 VideoBitRate 500 AVOptionVideo flags +global_header VideoCodec libx264 AVPresetVideo baseline NoAudio </Stream>