Questions tagged [android-videoview]

An Android View to manage and display a video file.

The VideoView class can load images from various sources (such as resources or content providers), 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 and tinting.

Methods of this class

void setVideoPath(String pth): This method will set the absolute path of the video file which is going to be play.

void setMediaController(MediaController cntlor): This method is used to set the controller for the controls of playback .

void start(): This method is used to start the playback of video file.

void pause(): This method is used to pause the current playback.

boolean canPause(): This method will tell whether video view is able to pause.

boolean canSeekForward(): This method will return true value if video view is able to seek forward.

int getDuration(): This method is used to get the total duration of video view.

boolean isPlaying(): This method will return true value if the current video view is in play state.

void resume(): This method is used to play the resumed file.

2566 questions
1
vote
2 answers

resize android videoview to fit screen

I want to paly video in full screen. and i set xml like…
aotian16
  • 767
  • 1
  • 10
  • 21
1
vote
1 answer

Android VideoView can't set a Backgroundcolor

Hi I have following Layout:
aqm
  • 142
  • 2
  • 17
1
vote
2 answers

Android WebView html5 video force fullscreen

I have been working on this issue for at least one week. I have read all the post about it in StackOverflow but I still not founding the solution and I am starting to think that this is impossible. I want to display an HTML in a webview embebbed in…
1
vote
2 answers

in android how to load video current position?

I've got a simple videoview that plays a video. I'm trying to get it to play smoothly and not rebuffer or restart the Activity upon orientation change from portrait to landscape. Here's the video code: uriStr = ("http://video.com/video/" +…
kirktoon1882
  • 1,221
  • 5
  • 24
  • 40
1
vote
2 answers

In Android, the Activity isn't seeing the orientation change?

I've got a simple Activity that plays a video. uriStr = ("http://pathToVideo.com/video/" + yyyyMdd_Str + "/" + yyyyMdd_Str + ".mp4"); VideoView testVideo1_VV =(VideoView) findViewById(R.id.videoTest7vid_VV); testMediaCon1_MC…
kirktoon1882
  • 1,221
  • 5
  • 24
  • 40
1
vote
1 answer

Unable to pause/forward/backward video using mediacontroller in android

Iam unable to pause / forward / backward the video using MediaController and it is happening only in the LG devices. Below is the code which am using and it is working in the rest of all the devices : VideoView…
Vini App
  • 7,339
  • 2
  • 26
  • 43
1
vote
1 answer

Play a video on android device

i'm tring to display a youtube video on android. I googled but I can't find any solution to my last error: 08-16 12:05:55.950: E/MediaPlayer(2418): error (1, -2147483648) 08-16 12:05:56.274: E/MediaPlayer(2418): Error (1,-2147483648) I added to…
Alberto
  • 718
  • 4
  • 20
1
vote
0 answers

Asynchronous video streaming in Android

In my android app, i want to stream video from URL. For that i am using VideoView control. But it displays starts playing video after loading whole video. I want to perform async video streaming for that. Is async streaming possible with VideoView ?…
1
vote
3 answers

Android button to appear on video view

How can i get the button to be on top of the video view instead of above it? Here's the code:
Tom Doe
  • 331
  • 6
  • 23
1
vote
1 answer

adjust android videoview height to half of the screen in portrait mode

I guess this might be easy but Please i need help, i have a video view that i want the height to get to the middle of the screen on any device, but what am currently doing is not doing that. when in portrait mode i want the video view to start from…
blessed
  • 127
  • 1
  • 2
  • 11
1
vote
0 answers

multiple button to change android videoview

i need help, i have a VideoView and three button under this Videoview, there is a default URL that is set to the Videoview, what i want to achieve is when the user clicks button A, this should change the Videoview to the url which is set to the…
1
vote
0 answers

Android VideoView on a fragment not working on first view, works after orientation change to landscape

I am veteran developer but a beginner at Android development. I am stuck trying to get a videoview on my Android app to show a video from the web. All I see is the progressDialog loading screen with a white background when I start the fragment. The…
Kelly
  • 164
  • 2
  • 6
1
vote
1 answer

Null-pointer exception while running launcher activity in android

I was trying to make an android video player to play some video files from the sd-card. for that i wrote two classes Main.java and VideoSelector.java but while launching my application it showing a null-pointer exception. please help me to fix this…
1
vote
2 answers

Playing Online Videos one by one

I have an xml file with videoview:
GOBINATH.M
  • 663
  • 2
  • 12
  • 24
1
vote
1 answer

Android VideoView not detecting streaming error

Whenever videoview is playing a video and there is a network connection drop and the video freezes, my code is not throwing an error even though I have set the videoview error listener. public class MainActivity extends Activity { static…