I'm developing an app with html, css and javascript which i port trough Phonegap to play on an Android tablet. (android 2.3.1 Gingerbread)
Everything is working fine, except the Youtube embed.
If i place the iframe embed on my page there is no play-button above my youtubescreen, so the user does not know he has to press it. But if you press it, the movie loads into the external android video playing app.
But here's the second problem; when the movie ends, the external android player closes and returns to my app, but then my youtube video screen is black en has these ugly android videocontrols of the external player.
But i can't do anything with it... so the user can't press the movie to watch it again.
Does anybody know how to implement a youtube video correctly into an HTML based android application?
It's HTML, so webviews, videoview, intents and things won't work...
Things i tried:
iframe embed
object embed
html5 video embed
online embed on external page
but in every attempt, those ugly videocontrols keep popping up after the video ended.
I also tried another player, but with the same result... Anyone ideas? :-)
Related
I created an Android App which loads a webpage via Webview into the app so you can access the content on a mobile device. On the webpage, I have placed a radio player using iframe and it works. But when I try to click on it to play in the app, it doesn't work. The play button isn't responding at all. If you can point me in the right direction, I would be glad.
The webpage in question is zeno.fm/repjesus-radio, incase you would like to have a feel of the player.
I'm looking for a solution about YouTube in Android.
When my WebView in app connects an webpage, some pages may have embedded YouTube clip.
When I press the RED play button in the center of embedded clip, it plays well. Yes I set enabled JavaScript , plugins, hardware acceleration etc. But it ONLY plays in the WebView internal media player.
I've tried with several libraries such like YouTube API that provided by Google, but It just provides Views and interfaces, and cannot convert a YouTube clip in WebView to a YouTubeView (If you know how to convert, let me know).
All I want is simple. Hit a red play button in embedded YouTube, then my app launches YouTube App (or stock media player) so play the YouTube clip.
iPhone can do this very simply with the stock player, but I can't understand why Android can't do so.
Please check whether "YouTube" application is install on your device? If yes then just update it.And most of the time you tube application not working properly on emulator..
I am doing an android app which shows my website in the webview. My website contains a flash player for playing movie.
Here is the link which contains the flash player and I want to display on the webview.
After reading many articles, I have tried the following code:
webview2.getSettings().setPluginsEnabled(true);
webview2.getSettings().setPluginState(PluginState.ON);
webview2.getSettings().setJavaScriptEnabled(true);
webview2.getSettings().setAllowFileAccess(true);
But it is still not working.
This may sound very simple, but make sure the platform you're testing this on has the Flash Player installed.
Many android phones do not have flash player in their browsers anymore, and there isnt a flash player plugin for the WebView object.
Your best chance would be to make this video in your page viewed with html5 video tags, or let people view your website in their own browser, which may or may not work (some browsers have flash, some dont)
I would like to play a HTML5 video back to the user directly in the native android video player.
My current setup takes way too much effort to get into the native video player: Currently I have a WebView with an embedded HTML5 video (such as a Youtube or Vimeo HTML5, not flash, embed). The user has to hit play on the video, and then hit the fullscreen button (on far right in the picture below)
Then it opens in the native player which looks like this:
The native player is a View is a much better experience for video playback. (I believe it is a VideoView? though maybe it is different in newer versions of Android. It is a View within my Activity so provides extra control. See this post for more info.)
I'm looking for a graceful way of directly launching into this experience instead of having to load the embed in a WebView and then leaving it to the user to tap the full screen button.
Any ideas?
Thanks!
First some details to help explain:
If you load a Vimeo link such as the following:
http://player.vimeo.com/video/40234826, or use their iframe embed code,
into a WebView, one of two things will happen.
If the device has the Adobe Flash Player app/plugin installed, it will display Vimeo's embedded player. Tapping play, plays the video inline as an embed.
If the device does not have the flash plugin, it will display an image with a play button. Tapping play, opens the Video in a system VideoView. (Because the button links to an mp4 file.)
Since Vimeo's embedded play can be a bit buggy on the vast variety of devices available, I have found that option 2, playing the Vimeo video in an Android media player is a much better experience.
Now the question is, how can I convince the WebView not to use Flash?
I have tried webview.getSettings().setPluginsEnabled(false); but it still loads the flash embed version. How can I trick Vimeo's player into thinking the device does not have flash installed?
Thanks
Update
After further investigating, it seems that setPluginState(PluginState.OFF) works pre honeycomb, but this doesn't work on Honeycomb and ICS.