I am trying to use VideoView to play a streaming video and what seems to happen is that it has to download the entire video before it will play even the first second. obviously, I would like it to start playing the video as soon as possible. is there something I can do with VideoView to make this work, or is this something that's controlled on the site hosting the video URL?
It's possible that the file you have uploaded (or linked to) is not streamable and it will have to play it locally.
Can you check if it still happens with other video's ?
Related
I can load a video from the web. All works fine.
However, when a network connection is slow the video is buffering. So I want to set the quality of video while, streaming it automatically or manually.
I am blank about this.
If I am not mistaken, VideoView only plays the video. Here is the documentation on it, doesn't seem to have that option at all.
I'd suggest you use the youtube API instead if you can.
I'm trying to make an Android App and I need help.
Do you have any idea how to play a online video (like a video on Youtube) in side-by-side view at the very same time by using Android WebView?
so, when I watch a Youtube video, I want to be able to have two views on left and right side on My Android SmartPhone Screen, and play and control the same video both on left and right views at the very same time.
Regards.
----2nd Feb, edited----
following things I've tried and failed.
・using Youtube API, get 3gp address, and try to play it with VideoView
・Using draw method and getDrawingCache method of WebView
・using onShowCustomView of WebView
Look at using a html5 video player like Video.js or Sublime Video. You will need to create some javascript with each of these that fires the left and right video at the same time.
You can also look at what this guys did for some more inspiration.
http://html5demos.com/two-videos
The trick is getting the videos to fire at the same time if you need them in sync. It's not easy to achieve if you don't control the source video and server as you are relying on an outside party to do this. YouTube is NOT a good choice for serving your videos if you need them to be in sync as you can't guarantee the video load and launch times, or control if an ad will get injected into the video stream.
I need to play a video with fullscreen when a user plays it.
Unfortunately, as far as I understand, if the HTML5 Video tag is used, Android plays it in-frame. So that tried webkitEnterFullScreen() and it seems to work(kind of...) but user has to click the play button again. Overall performance feels a bit clumsy and not sure if old OS like 2.0+ could handle it.
As an alternative method, I'm now trying to play video using direct link rather than the Video tag. For example, [a href="video.mp4"]Click to play[/a]. I think that it works well but the only problem is that it asks to choose a application either 'Video Player' or 'Browser'.
So my question is
How can I define using javascript to play the video using Video Player, so that the selection dialog won't prompt?.
What is the native video player for Android? For example, iOS uses Quicktime and it is possible to embed video using Quicktime object. And are there any equivalent method for Android?
When the Video tag is used, how to play video simultaneously with fullscreen?
try following code :
String path1="/path/to/video/file.3gp";
Uri uri=Uri.parse(path1);
VideoView video=(VideoView)findViewById(R.id.VideoView01);
video.setVideoURI(uri);
video.start();
You have to realize something very important: There is no native video player for android.
There is a dozens players for android and it is not your decision but the users decision if he should use player A or B. Don't try to force Android users to iOS behavior, it really doesn't give a better impression.
I have one big question: "How do you let videos play in your app while going to other apps?"
I saw Act 1 Video Player do it but how do you do it?
My application uses a simple VideoView .It uses an 3gp file from assetsbut all i can see is a blank screen and music of that video.
Would someone help me to display the video?
P.S-I am trying it on emulator?
Do not use emulator for testing video playback. Its ability to handle video playback is very limited. You should use actual device to play videos.
Check https://stackoverflow.com/a/3005928/1341006 by Commonsware for more details