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

Not displaying videoview in full screen

Everyone. I would like to videoview displays the video in full screen, I've tried using some commands, but they didn't work out. I need some help. I put below my code. The video continues showing about 1/3 of screen! I'm a newbie!!! Intro.JAVA …
1
vote
3 answers

Android Video View Visibility

I have a TextView along with a VideoView in a Relative layout. What i am doing is, animating the TextView to the center of the screen, changing the text and back to the corner of the screen. I have a Video View placed in the center of the screen.…
Jibran Khan
  • 3,236
  • 4
  • 37
  • 50
1
vote
0 answers

How to put a video file in android custom content provider

I have a video file which I want to store in custom content provider. And after that, I want to read it and want to play it through Uri. Below is my code. package com.videocon.nds; public class FileProvider extends ContentProvider { public…
1
vote
1 answer

Android VideoView not working

I want to write the code which will play a video when a button is clicked. I can't get the video to display. When I click the button to play, the emulator stops working. public class Video extends Activity{ private static final String MOVIE_URL =…
littledevils326
  • 689
  • 3
  • 11
  • 19
1
vote
1 answer

Android VideoView and NavigationBar

I have fullscreen activity and video view in my application. NavigationBar hides automaticaly in 5 seconds, when i don't touch a screen. I've tried to add onSystemUiVisibilityChangeListener to videoview, and tried…
Geka
  • 113
  • 1
  • 8
1
vote
0 answers

Android: using VideoView and RtpStream

I'm working with VideoView to stream a video with rtsp. I want to obtain details about it so I want to use android.net.rtp. When I call any RtpStream class's method like getLocalPort() the application doesn't work. Here is the code: @Override public…
1
vote
0 answers

Error in android updating a seekbar using a thread, in a videoview using a video from youtube

I am going to explain the problem i have exactly, in an app i am developing for android i have an activity where i am showing a video that comes from youtube, to show that video i am using a VideoView . Also i have a progressSeekBar to be able to…
1
vote
1 answer

Can't get vitamio to show subtitle

I'm using vitamio lib to make a video player. However, I can not find a way out to show embed subtitle. I've searched thoroughly on the Internet but there is no sample code. Here is my code : public void onCreate(Bundle icicle) { …
1
vote
1 answer

Streaming from VLC to Android via Multicast

I've built a media player using VideoView to stream from VLC using multicast. I've provided the url and the application does stream the video. But when I check the Network Activity (In the resource monitor) it shows that VLC is connected to both the…
user2132921
  • 11
  • 1
  • 2
1
vote
1 answer

Get bitmap of videoview

Is there a way to take a screenshot of a video playing in video view. I searched on the forum but could not get the required info. I tried with Bitmap bitmap = Bitmap.createBitmap(this.view.getWidth(), this.view.getHeight(), Config.ARGB_8888); …
Ankuj
  • 713
  • 3
  • 10
  • 27
1
vote
2 answers

Extracting videos for VideoView for Android Application.

So I am trying to setup an Activity in which the user can Browse for a video from his respective storage and then play it in using VideoView. How can I do that? I have written some code below. Also I am using a Nexus 7 so it does not have an SD…
Pachigar
  • 11
  • 1
1
vote
1 answer

issues running video in Android

I'm currently working in my Android app. and so far I got to the point where I need my app. to view some videos for the user initially I thought of storing my videos in my server (currently is local but might move it later) and then I did not find…
1
vote
0 answers

Android SDK VideoView - How to buffer second video after first video finished buffering while first video is still played

I have got this code, which works great for playing one video from http: public class MainActivity extends Activity { private VideoView mVideoView; @Override public void onCreate(Bundle icicle) { …
KwiatekP
  • 36
  • 4
1
vote
1 answer

How to display video in VideoView in the center of the screen?

I am creating ViewPager with two VideoViews. On sliding pages, video on current page start playing. One problem: how to display video in VideoView in the center of the screen ? Here is my code, MainActivity.java: public class MainActivity extends…
1
vote
0 answers

Android 4.0.3 VideoView doesn't loop video

I'm using VideoView in my app and I need an mp4 video to be looped. I'm already using this method to loop my video. vid.setOnPreparedListener(new OnPreparedListener(){ @Override public void onPrepared(MediaPlayer mp) { …