Embedded video inside of Android media player - android

I have an application that I want to play a video in. I want to play the video from an embed code via html5 in an iframe. Is it possible to call the androids stock video player to play the video from the iframe embed code?

I fixed this by putting my embed code in an html file inside the assets folder. works greate.

Related

Video link of unlisted youtube video

I am developing an android application that streams and shows a couple of videos. Instead of storing videos on my server, I thought uploading them to youtube as unlisted, and getting them from youtube is a great idea. After getting the video, I want to show them in default android video player, not in youtube app or web view.
I don't have any problem when I put videos in my server (for example www.mysite.com/video.mp4), but is there any way to get the url of a youtube video?
You can upload the videos using the YouTube Data API v3:
https://developers.google.com/youtube/v3/docs/videos/insert
And setting the status.privacyStatus as unlisted
Then you can use the YouTube Android Player API to include the Video Player on your own Android App
https://developers.google.com/youtube/android/player/
To play a video, you only need the video ID, not the full url..
eg:
player.loadVideo("wKJ9KzGQq0w");

VideoView or WebView in YouTube Android App

Now this is a really stupid one! Forgive me on this question please but I really don't know the answer to it. My question is What have Youtube used to play videos intheir Android app? I mean is it a WebView or Just a simple VideoView? I used VideoView to play videos from the URL associated with them but it doesn't look as nice as YouTube's VideoView (or whatever it is)
And is there any other option to play videos from a URL other than using the code below? Because it just plays video in the native video player. If the red-marked portion in the image below is a VideoView, how does it look better than the normal VideoView? Or is it a WebView? Which one is a better option (in terms of UI) to play video from a URL? I'm using GingerBread and want to play mp4 or .flv videos in a VideoView or WebView (whichever is the better option, preferably like Android's YouTube app)
Uri data = Uri.parse(movieurl);
intent.setDataAndType(data,"video/3gpp");
startActivity(intent);

How to play the video from SD card in webview using Iframe in Android?

I am using webview to play youtube videos. This is working fine. But I wanted to try this. How can I play the video from SD card in Webview using Iframe in android.
Any other possibilities are there to do this? Can I try any HTML5 video tag? Anyone can suggest me about this?
If I installed Flash Player of my device and enable such browser plugins then could I be able to play local videos from SD card inside webview?
You can try to add custom HTML code to display in the webview and using HTML5 video tag you can acheive this task. Give it some try.

.mov file will play in browser, but not in native MediaPlayer app

I am launching the MediaPlayer to play a .mov file that is being passed into the MediaPlayer as a Uri (which is standard). However, it is telling me that it cannot play the file. However, if I put this same link on the web, and the click the link to launch the movie (while in my Android browser) the video plays no problem. However, I can't get the WebView to play it with the Video tag despite all my efforts.
So here is my question, what magic is taking place that allows an android browser app to take a .html url which contains a link to play a video and play it? If I load the same url in a WebView, or try to pass the video url into the mediaplayer, it is a no go. The format of the video is .mov.
Thanks in advance to everyone.
The Android browser and WebView are very different, WebView is very barebones as it was designed expecting people to use it for very basic showing html webpages. WebView by default has no plugins enabled, no javascript enabled and so on and so on. Never expect that because something works in the browser that it will work in a WebView.
Now in regards to how the media is handled. The Browser has extra features set up to strip the video source from the page and launch it in the native player most of the time. This functionality is not built into WebView. And the native player is very picky about what needs to passed into it as a URI to be able to play it.
Hope that helps,
Stevy888

What is most preferred method to play video and audio on mobile website?

What is most preferred method to play video and audio on mobile websites?
I want to know if I'm having and Video and an MP3 file then how to convert them and embed in a webpage which is a page of mobile website.
I think you know the answer to that already since you're tagging this as HTML5!
Use the audio and video elements. Use a fallback to Flash if you so wish.

Categories

Resources