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
1 answer

Video plays upside down when recorded from Front Camera in Android

I am doing android Video Camera Application. It should have capability of recording with back and front camera. I am done with back camera and everything is fine. But when I record with front camera, video plays upside down. I have to play the…
TNR
  • 5,839
  • 3
  • 33
  • 62
1
vote
0 answers

android VideoView animation not performed smoothly

I have a VideoView as simple as this:
1
vote
2 answers

Load a video from gallery into VideoView

What I want is the same with Images. When the user clicks on a button (in my case the VideoView itself) I want to let them open the Gallery and load a video into the VideoView. vv_video = (VideoView) findViewById(R.id.vv_video); …
erdomester
  • 11,789
  • 32
  • 132
  • 234
1
vote
1 answer

Custom VideoView to send custom headers

I need to send custom headers with VideoView. There is public void setVideoURI(Uri uri, Map headers) function but it doesn't support older android versions. I need to compile it with API version 8. Then I found a thread at here:…
fobus
  • 1,938
  • 8
  • 29
  • 48
1
vote
3 answers

How to run video from raw folder using vitamio?

I'm trying to play mp4 video from raw folder. It is working fine in native video player but when I tried to play it using vitamio then it did not work for me. Are there any way to run mp4 video from raw folder in android using vitamio library?? I…
androidcodehunter
  • 21,567
  • 19
  • 47
  • 70
1
vote
1 answer

Android: Two Activities Simultaneously

After searching for similar questions here on StackOverflow, I've come to the understanding that you cannot run 2 activities simultaneously. Is there any way around this? I've read about Services and Asynctasks, but I'm still a little bit confused.…
1
vote
2 answers

Videoview not playing video

I have this method for playing the video: private void changeVideoState() { playing = !playing; if (playing) { videoView.start(); play.setVisibility(View.GONE); stop.setVisibility(View.VISIBLE); } else { …
user1940676
  • 4,348
  • 9
  • 44
  • 73
1
vote
1 answer

Video View setVideoUri fail in Android

I have a VideoView that should start when the user click on "play button" but it doesn't work. After some debug and some test, I see that if I start the video at the begin of the OnCreate(), it works perfect (it sets the URI). But when I try to use…
D4rWiNS
  • 2,585
  • 5
  • 32
  • 54
1
vote
1 answer

Android Get Video URI Source

I'm developing a video player and I would like to know how I get the URI from a video I launch from an intent I have already configured in the manifest. So far, all I have is this: @Override protected void onActivityResult(int requestCode, int…
Timmo
  • 2,266
  • 4
  • 34
  • 54
1
vote
0 answers

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

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…
jahroy
  • 22,322
  • 9
  • 59
  • 108
1
vote
1 answer

Android VideoView playback issues on recorded files

The problem I have is trying to get my program to playback a .amr file that has been recorded using the default android voice recorder. I have also downloaded a mp3 voice recorder and tried playback on that but it doesn't work either. I have…
1
vote
1 answer

simple android video player

i'm very very new to android/java and am trying to create a basic video player on android. i have researched all throughout stackoverflow, google, youtube, etc but i really can't seem to find a way to do this.. my goal is to have a listview that…
Bethany
  • 63
  • 3
  • 11
1
vote
0 answers

How to play a local video on Android

As my splash screen for my application I have chosen to use a video. I have made sure that the video is properlly formatted (according to android media format guidelines) so that is not the issue. The issue I am having is in getting the path to the…
Colin
  • 491
  • 1
  • 5
  • 13
1
vote
2 answers

How can I set the seek point in a VideoView or otherwise quickly end playback?

Is there a way to set a video in a VideoView to the final second of its duration? Or trigger the onCompletionListener by code?
Ron
  • 22,128
  • 31
  • 108
  • 206
1
vote
1 answer

How to make button visible in video view "OnPreparedListener" method

I have play button and videoview in my activity. In xml, I made the button as invisible. In java code I'm try to make it visible. In video view's OnPreparedListener method I'm trying to make it visible. but its not getting visible. below is my…
Vignesh
  • 2,295
  • 7
  • 33
  • 41