android-videoview

Streaming videos on VideoView

ⅰ亾dé卋堺 提交于 2020-01-25 05:45:11
问题 I have a simple VideoView and I'm trying to stream a video from a URL. Here's my code: //everything is in onCreate() videoView = (VideoView)findViewById(R.id.video); String videoAddress = "https://archive.org/download/ksnn_compilation_master_the_internet/ksnn_compilation_master_the_internet_512kb.mp4"; Uri videoUri = Uri.parse(videoAddress); videoView.setVideoURI(videoUri); videoView.start(); videoController = new MediaController(this); videoController.setAnchorView(videoView); videoView

How to display Video from URL in my android app?

白昼怎懂夜的黑 提交于 2020-01-25 01:20:26
问题 This is an example of a video I want to show in my app. http://www.dailymotion.com/embed/video/x1ade3x 1.In Manifest I use permission like this <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.ACCESS_COARSE

Can't run live stream using Vitamio

我怕爱的太早我们不能终老 提交于 2020-01-21 14:39:11
问题 I'm trying to use Vitamio to run RTSP video stream, I'm using Vitamio-sample after updating it to run the stream through VideoViewDemo activity: public class VideoViewDemo extends Activity { /** * TODO: Set the path variable to a streaming video URL or a local media file * path. */ private String path = "rtsp://user:password@<stream-ip>:554"; private VideoView mVideoView; private EditText mEditText; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); if (!LibsChecker

Can't run live stream using Vitamio

谁说胖子不能爱 提交于 2020-01-21 14:39:05
问题 I'm trying to use Vitamio to run RTSP video stream, I'm using Vitamio-sample after updating it to run the stream through VideoViewDemo activity: public class VideoViewDemo extends Activity { /** * TODO: Set the path variable to a streaming video URL or a local media file * path. */ private String path = "rtsp://user:password@<stream-ip>:554"; private VideoView mVideoView; private EditText mEditText; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); if (!LibsChecker

How can i make my video view to half the screen of my device?

落爺英雄遲暮 提交于 2020-01-17 06:42:25
问题 I am using a video view and a relative layout. The app will only run in portrait mode. Currently, I am giving exact dps to get the desired size. What I would like to have is to get the video view with half the size of my layout. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:opencv="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_smile" android:layout_width="match_parent" android:layout_height=

Android MediaPlayer setNextMediaPlayer not working

人走茶凉 提交于 2020-01-17 06:14:07
问题 My objective is to create a VideoView that can play videos in a pre-defined play list. I'm trying to use MediaPlayer.setNextMediaPlayer(...) to allow a seamless transition between two videos. However, when the first video finishes playing, the 2nd video will not start automatically as it should according to the documentation. Xamarin Android Code : Queue<MediaPlayer> MediaPlayerList = null; private void PlayVideo() { MediaPlayerList = new Queue<MediaPlayer>(); //Let's go ahead and create all

VideoView ViewPager black lines while swiping

久未见 提交于 2020-01-16 03:48:05
问题 I have a problem with VideoView and ViewPager swiping action. While swiping I can see black lines on the right or left side of VideoView (depends on side of swiping) . How can I deal with this. It was done using FragmentStatePagerAdapter and ViewPager . Parent Activity has SurfaceView with 0px width and height and set getWindow( ).setFormat( PixelFormat.TRANSLUCENT ); I'm adding VideoView from JAVA code. 回答1: VideoView is based of Surfaceview which is not very ideal for translation and other

How can I make circle GLSurfaceView on Videoview?

China☆狼群 提交于 2020-01-16 00:49:09
问题 I'm using camera recorder library for video recording it's use GLSurfaceView. In my layout on VideoView I overlay GLSurfaceView. It's showing Circle shape when I overlay GLSurfaceView over ImageView It's showing Square shape when I overlay GLSurfaceView over VideoView. I have tried below code for making circle GLSurfaceView. public class SampleGLView extends GLSurfaceView implements View.OnTouchListener { private Path clippingPath; public SampleGLView(Context context) { this(context, null); }

How to check if file is supported by android videoview by code?

≯℡__Kan透↙ 提交于 2020-01-14 09:37:42
问题 I am trying to play video by Android videoview. Here is my code: super.onCreate(savedInstanceState); setContentView(R.layout.video); VideoView videoView = (VideoView) findViewById(R.id.videoView); videoView.setVideoURI(uri); videoView.requestFocus(); videoView.start(); This works fine, however some phones still show dialog box with title "Cannot play video". My question is how to disable this notification window? I mean, can I check if the video file is supported or not before calling

Unable to play YouTube video in VideoView using RTSP streaming

这一生的挚爱 提交于 2020-01-14 03:12:30
问题 I'm writing an app that uses VideoView to play a video from YouTube. Here's my code: VideoView videoView = (VideoView)findViewById(R.id.video_view); videoView.setVideoURI(Uri.parse(filePath)); videoView.setMediaController(new MediaController(this)); videoView.requestFocus(); videoView.start(); The code works with this url: "http://commonsware.com/misc/test2.3gp" But not with this one (from YouTube via the API): "rtsp://v4.cache7.c.youtube.com/CjsLENy73wIaMgl4q