android-videoview

Videoview behavior on differents smartphone (with different stagefright)

风流意气都作罢 提交于 2019-12-12 12:42:15
问题 I'm having compatibility problems using videoview (or MediaPlayer) for play rtsp streams in multiple videoviews in the same activity. I have opened another question on this problem here but now I know that isn't my code the responsible, because I test same software on different phones and it work. Viewing logcat Info messages for RTSP setup I see that each phone has different implementation of stagefright (android multimedia framework): (A) I/RTSPEngine(147): User-Agent: Player/LG Player 1.0

Add view on top of MediaController

北城以北 提交于 2019-12-12 12:24:58
问题 MediaController always shown on top of all views in the screen and do not pass clicks to below views until it is hidden, my issue is: How to add button view on top of MediaController so it handle click events ? OR How to pass click events to below view? 回答1: Try overriding MediaController.dispatchTouchEvent() It suits your task better, see my answer here for a detailed explanation why. The code will go something like this: public class MyMediaController extends MediaController { ... private

Android: 'Can't play this video'; MediaPlayer & VideoView Error 1 -38

三世轮回 提交于 2019-12-12 11:32:18
问题 I tried to play a video with the code below. However, I get the classic error of 'Can't play this video' pop-up at run time. I did my due diligence in searching the android literature and looking through other people's questions, but I can't seem to find the problem a) because no where in the documentation can I find the error code (1 ,-38) for MediaPlayer and b) my video meets the specifications required for android media formats (h.264 and MPEG-4). If anyone can help point me in the right

android: using default video player

南笙酒味 提交于 2019-12-12 11:04:04
问题 I have an application that plays video files. I have been using code for using Videoview and starting the Videoview manually to play video files. However, I just wanted to know if I can use the default media player or video player of android rather than creating or using the VideoView to play the file.. Please make comments if the question is not clear. Thanks alot 回答1: Sure - just use an Intent with the file Uri . File file = new File("fileUri"); Intent intent = new Intent(Intent.ACTION_VIEW

android vitamio multiple videoview error

拈花ヽ惹草 提交于 2019-12-12 10:13:01
问题 I edit VideoViewDemo because I need two (or more) stream rtsp in same layout. I use a relative layout with two VideoView and add code in VideoViewDemo to fill each surface. Result is that two video is overlapping each other and logcat give me many times this error : E/SurfaceTextureClient(4717): Surface::lock failed, already locked 01-15 17:41:07.328: E/VitamioPlayer: LOCK BUFFER FAILED E/SurfaceTexture(144): [SurfaceView] dequeueBuffer: can’t dequeue multiple buffers without setting the

How to make VideoView full screen

北城余情 提交于 2019-12-12 09:55:13
问题 I want to play a video in my Activity using a VideoView ,and make it fullscreen and landscape mode (with hiding virtual button and status bar)when I click a Button . But it can not hide the virtual button and it has a white line in bottom. This my activity code: public class VideoActivity extends Activity { private VideoView mVideoView; private String mUrl; private Button mFullScreen; private static String TAG = VideoActivity.class.getName(); @Override protected void onCreate(Bundle

VideoView in ViewFlipper is transparent when video is playing

无人久伴 提交于 2019-12-12 09:53:56
问题 I've got an Activity with two views set up in a ViewFlipper. One of the views is a layout with a GLSurfaceView and a few other widgets, the other just has a layout with a TextView and a VideoView. When I click on something in the GLSurfaceView, the ViewFlipper swaps so the video can play. In this screenshot, you can see the plain GLSurfaceView rendering a map on the left. On the right is what it looks like after the ViewFlipper has flipped and the video starts playing. The empty transparent

surfaceview playing video as stretched view

二次信任 提交于 2019-12-12 09:24:13
问题 I am using the mediaplayer.xml to play the video file <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/MainView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#4d4d4d" android:gravity="center" android:keepScreenOn="true" android:orientation="vertical" > <SurfaceView android:id="@+id/surfaceView" android:layout_width="fill_parent" android:layout_height="wrap_content"

Using VideoView, how to remove “can't play this video” alert message?

笑着哭i 提交于 2019-12-12 08:19:40
问题 Our app plays a set of videos, sometimes we are getting can't play this video alert message. We are either playing video from sd card or streaming if that video is not yet downloaded. Mostly, error arises while streaming with slow internet connection. I understood few causes of this error from reading some posts and blogs. But, now I want to play the next video when the error occurs without showing that error message. I used the below listener for that , video.setOnErrorListener(new

VideoVideo - Video Width x Height- MediaPlayer Issue

↘锁芯ラ 提交于 2019-12-12 08:12:19
问题 I have written a sample app that reproduces the problem: https://github.com/blundell/VideoRatioProblemPerDevice The VideoView documentation states: Displays a video file. ... takes care of computing its measurement from the video so that it can be used in any layout manager, and provides various display options such as scaling The problem is the Samsung Galaxy S3 is doing weird things to the video and not respecting the ratio of the video. (also happening on an HTC device). Activity with full