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
0 answers

Android VideoView - force buffer entire file

Is it possible to force VideoView to download/buffer the entire file(the file is remote URL)? The idea is to force the entire video to be downloaded so that user could view it when offline.
1
vote
0 answers

How I play 2 or more videoview in one layout at same time?

I want to play 2 or more videoview at same time but only one play why? can ı do this with mediaplayer? Must I use thread? VideoView vv1,vv2,vv3,vv4; vv1=(VideoView)findViewById(R.id.vv1); vv2=(VideoView)findViewById(R.id.vv2); …
user1474138
1
vote
2 answers

Problems while showing a full screen videoView & changing orientation

I have an activity which shows a full screen videoView (yet maintain the aspect ratio). It worked perfectly on Android 2.3.7, but i'm having some weird problems on Android 4 (and probably 3, i didn't check yet): For some reason, if I set the theme…
1
vote
0 answers

videoView seeking causes ANR

I have a videoView that plays a streaming video url via a service of the app. When starting to play, it takes quite a long time to be prepared and start to play, but for this I show a progress dialog. However, if the user is using the seek bar to…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
1
vote
1 answer

Usable VideoView source code for Android 2.2

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…
1
vote
0 answers

android videoview changed orientation

I've made application which playing movie in 3gp format. Everything is working great on smartphones. When I installed app on tablet there is strange thing during playing movie. Whole layout is portrait mode but movie is rotated 90 degrees and played…
Tom B
  • 57
  • 4
  • 9
1
vote
1 answer

android videoview fullscreen when click button

i want to show fullscreen the video when click a button. And then return old size teh video when run fullscreen! how can i do that?
enginar
  • 307
  • 1
  • 6
  • 16
1
vote
1 answer

Error code (200,-82), MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK in Android

Below code is for play remote video of mine: Uri uri = Uri.parse(URLPath); vv.setVideoURI(uri); vv.setOnCompletionListener(new OnCompletionListener() { @Override public void onCompletion(MediaPlayer mp) { //play next…
brian
  • 6,802
  • 29
  • 83
  • 124
1
vote
1 answer

Android: How do I make a video splash screen repeat until webview finishes loading the url?

I would like to make a small video (about 4 seconds) repeat until webview finishes loading the desired URL in the background. Right now the video plays once, then a blank black screen comes up until the page loads. I'm still pretty new to this...…
1
vote
1 answer

Android player WOWZA server RTSP stream issue

I am streaming rtsp stream from wowza server. My android player is ending up is error many times. I am getting error after playing few seconds or minutes. Here is the error log: 05-26 15:47:27.339: WARN/NEXTREAMING(1458): ERR0:2167 _iConfigLen 0, …
bheema
  • 323
  • 1
  • 5
  • 9
1
vote
1 answer

Play remote video over slow network

Uri uri = Uri.parse(URLPath); vv.setVideoURI(uri); vv.setOnCompletionListener(new OnCompletionListener() { @Override public void onCompletion(MediaPlayer mp) { //play next one } }); vv.setOnErrorListener(new OnErrorListener() { @Override public…
brian
  • 6,802
  • 29
  • 83
  • 124
1
vote
2 answers

Android Streaming with MediaPlayer: Error(1, -1004) and 3GPP video

I'm trying to do an app for play video. I've 2 problems: 1) I've a Youtube's link: rtsp:// and i do: "Uri myUri = Uri.parse(link); //link = rtsp://... mMediaPlayer.setDataSource(getApplicationContext(), myUri);" Then, the video doesn't play...…
jesuslinares
  • 146
  • 3
  • 11
1
vote
1 answer

Video restarting in VideoView after Home

I have activity with VideoView. After activity creation I starts video playback. And everything is ok before the moment, when I press Home button. When I return to the activity from home screen video buffer is empty and video playback starts from…
Lampapos
  • 1,063
  • 1
  • 12
  • 26
1
vote
1 answer

Keep playing Video on configuration change in a Fragment

I have a fragment that contains a VideoView and I want it to keep playing when orientation changes. I've been searching for similar cases but I don't know the best way to proceed. If I "setRetainInstance(true)" in the fragment's onCreate method it…
uhuru
  • 11
  • 2
1
vote
2 answers

Playing video from Sd card

I have build an app that has videos in it that stream from the Internet and I'm not very impressed with the performance of them. Would anyone like to share the code for loading videos from the SD card. Thanks
scott1218
  • 87
  • 2
  • 10
1 2 3
99
100