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

VideoView Cannot Play Video on Galaxy S2

I am using a VideoView to play a video in my app and it works fine on the Galaxy S3, Nexus 4 and Nexus 5 but it fails to play on the Galaxy S2. I get a popup that says "Sorry, this video cannot be played." and in the LogCat I get: 11-07…
CaseyB
  • 24,780
  • 14
  • 77
  • 112
1
vote
2 answers

Display issue while launch Video view Fragment from other fragment?

App State: In one of scenario I created an Video Fragment(with one button over video view) which is launching from existing full screen fragment. Behaviour Issue: after get lauch VideoFragment blink for a moment and then video view display and…
CoDe
  • 11,056
  • 14
  • 90
  • 197
1
vote
2 answers

play m3u8 in videoview on Android

I have a strange problem with playing stream in videoview with this code: videoView.setVideoURI(Uri.parse("///.m3u8")); It playing perfectly on my nexus4 phone, but but on other devices(Fly IQ4410, HTC Legend) there is failure of playing…
Dlash
  • 154
  • 3
  • 11
1
vote
1 answer

media player path is null in android 2.3.6

Media player not working on android 2.3.6 But the same code working on 4.x version. I am using following code for playing video public class MainActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { …
kumaran
  • 13
  • 3
1
vote
0 answers

Pinch to zoom in and out in VideoView Android

I searched many times about this question.But i got only Image Zoom in and zoom out examples.I tried to modify that codes only but image zoom uses setMatrix. So how can i set that matrix in videoview. Please help me by giving a small example.I…
Brinda K
  • 745
  • 3
  • 16
  • 34
1
vote
0 answers

How to play subtitles from a url in android

How is it possible to enable subtitles which are online in a server using its URL for a video playing from a URL???? I am using this code for the video: public class VideoViewActivity extends Activity { // Declare variables ProgressDialog…
makis.k
  • 432
  • 6
  • 23
1
vote
1 answer

Can VideoView be implemented inside InfoWindow marker?

I'm trying to add videoView inside a infoWindow,is it possible?Can anyone give me an example. Thank you
shahriz
  • 31
  • 4
1
vote
1 answer

Can I save Android VideoView stream buffer to a file on the storage?

For the case of playing video from a stream (i.e "http://.../video.webm") using VideoView, once the buffer is full and the video is completely downloaded, can I save it somewhere on the storage? Do we have access to the buffer data?
MichaelS
  • 7,023
  • 10
  • 51
  • 75
1
vote
5 answers

Video can not be played by videoView Android

I am developing video player app. I want this app to be appear as option on selecting video from sdcard, album or any folder of the phone . When i select my video player to play video, it takes to app but video is not playing. I have given…
Brinda K
  • 745
  • 3
  • 16
  • 34
1
vote
2 answers

How to Play Video in Android in Videoview or WebView from Internal Storage

Hi all and thanks in advance. After all day trying and searching why videos load in a html with a webview or directly the .mp4 with a VideoView, i have discovered whats the problem. Apparently files in internal storage just have app permisions, but…
Rako
  • 249
  • 1
  • 4
  • 15
1
vote
0 answers

Full screen VideoView with stretched video. [Android]

My video view is in full screen landscape mode. For setting the video view in full screen i have code in onMeasure which scales video view to fit the full screen but doing this my video aspect ration is getting destroyed and video is looking…
User7723337
  • 11,857
  • 27
  • 101
  • 182
1
vote
0 answers

CountDownTimer onFinish() crashing when opening a new activity ( after video finished looping)

I am working on this very simple app that plays videos in a loop with a countDowntimer attached to it. Essentially what I have is the following: I instantiate the VideoView If the user checked for the video to loop (1x or 2x) Then in the…
ito
  • 154
  • 3
  • 15
1
vote
1 answer

Encoding video for Android

How do I properly encode video for Android? I've seen the supported media formats but I don't really know where to start with producing a video with those settings. I'm not yet streaming these videos. These are just for local playback. What's the…
spitzanator
  • 1,877
  • 4
  • 19
  • 29
1
vote
1 answer

how to get frame from android videoview with setVideoURI streaming from external device?

i'm making and android application that stream a video from external source and display it in a videoview in my activity. The stream working fine, but i'm unable to save a frame on my sd card. this is my code where vv is videoview: int…
Simone M
  • 677
  • 1
  • 10
  • 26
1
vote
2 answers

Android vimeo video downloader

I want to play vimeo video in VideoView, but here is problem. Steps for downloading video in desktop is as follows(based on ossguy.com script): get page vimeo.com/XXXClip_id (tested with 67216430) parse web page and get signature and timestamp send…
user1831986
  • 583
  • 1
  • 8
  • 16