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

How to set the ListView item click using switch position to play one local video file per row in video view of seperate class?

I have a list view that is populated from an array of items names. It is set up with List (class) and list_item (layout). Now I set up click listener for listview rows to play video in VideoView which is set up with ClipsActivity (class)…
Sivon
  • 91
  • 9
1
vote
1 answer

play HTML5-videos in WebView?

I'm trying to play a video from my WebView, I've solved it... well sort of, but there is one problem. As for now, I've added an image with an onclick function named "playVideo" public void playVideo(View V) { String LINK = "*URL TO VIDEO*"; …
intINk
  • 129
  • 1
  • 12
1
vote
0 answers

android videoView.pause() doesnt work while .canPause() returns true

My android application can show streaming video. I have come across very strange behaviour of videoView. VideoView's playback can be started/paused via button, code is: playPause.setOnCheckedChangeListener(new OnCheckedChangeListener() …
Eugene Chumak
  • 3,272
  • 7
  • 34
  • 52
1
vote
2 answers

setVideoUri(uri.parse(res)) error

Trying to play a video located in R.raw. I have an xml array that I get the file that is to be played. The video works fine if I hardcode it, like this: VideoView myVideoView =…
1
vote
1 answer

Android Capture Video and play

I want my application to Record a video and play on VideView in android. I am doing this for that. Intent takeVideoIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE); context.startActivityForResult(takeVideoIntent, ACTION_TAKE_VIDEO); // context…
Suresh
  • 7,785
  • 1
  • 16
  • 28
1
vote
1 answer

Android video starts playing one minute after buffering in done

I used vitamio library for playing rtsp. Although I'm having videoView.start(); on my code, video starts playing one minute after buffering in done! but if I change orientation after buffering is done, video starts to play immediately! I have the…
Nima K
  • 995
  • 1
  • 8
  • 15
1
vote
1 answer

Video size wrong in VideoView (Nexus 7)

I'm implementing a video player with ads. Eventually, playback is paused and some ads are shown, after the ads playback is resumed. To implement this I've done a FrameLayout with a VideoView and another View to display the ads. When the ads break…
ivacf
  • 1,163
  • 3
  • 11
  • 15
1
vote
0 answers

Playing video in Android app with native player

I'm new with building apps I made it with eclipse to compile and phonegab. A while ago I made a android app with video content. It did work in the past, but not anymore. I did it with a direct link such as Play When you click the link, Android used…
Frater
  • 11
  • 2
1
vote
2 answers

Android videoview control is not displaying video, only audio is played

I am trying to play a video from a url in android, for this I am using videoview control in the fragment class, but while playing there is no video output only audio output is there, the video is in .mp4 format. I have done it the following way- …
Y0gesh Gupta
  • 2,184
  • 5
  • 40
  • 56
1
vote
2 answers

How to play a video using videoview controlled by a seekBar or Progress bar?

After searching for many hours , i am asking this, any related answers are welcomed . . I'm having a video in my R.raw folder and i am playing it in two videoview of same duration simultaneously , here is my code , sb =…
VIGNESH
  • 2,023
  • 8
  • 31
  • 46
1
vote
1 answer

android Screen Capture

i want to capture the video screen as image from videoview in android..my code is given below.its create the image but that image contains only blackscreen in sdcard.how to capture the videoview as image while playing. public class…
android
  • 51
  • 3
  • 12
1
vote
0 answers

android.view.WindowLeaked on VideoView

I am facing errors "android.view.WindowLeaked" on using VideoView in android. When i run my app videoview not run gives message "Video Can not be played" and logcat gives "android.view.WindowLeaked" error
User42590
  • 2,473
  • 12
  • 44
  • 85
1
vote
1 answer

Android VideoView is not playing video from internel memory

I have developed an application to play video.I used VideoView view play the Video.It is working fine to play a video from url.But when I am trying to play a video from Internal memory means (app memory), it always shows the following dialog I am…
Krishna
  • 4,892
  • 18
  • 63
  • 98
1
vote
1 answer

how can i change the params of videoview in android?

how can I change the layout params (centerInParent) of a videoview
user1836363
  • 295
  • 1
  • 5
  • 13