Playing a youtube video in full screen mode in android webview - android

I am connecting to a website which hosts youtube videos via webview. When I click on the youtube video it works fine - the player plays within the webvideo window. But when I make the video full screen it plays. But when I press the back button - it goes back to the webview and I can navigate to the rest of my app - but I can still hear the video play in the background. Whats happening here?

I had a similar problem and found a solution here on StackOverflow. I don't have link to that question though.
Here it is:
webview.loadData("", "text/html", "utf-8");

Related

play all types videos in webview in android programmatically

I want to play All types videos in single webview in android programmatically.
I already tried for yahoo/youtube/vimeo videos play in webview in android using iframe.
But, its not working properly.
only working for youtube videos only playing in webview using iframe in android.
next one, vimeo video is playing in webview, but, its not playing full video, just loading video in webview,
that's it. its not fully playing.Its automatically paused.
when I click play button, its again paused..
next one, yahoo video is not playing fully..
I refereed those link also.
how to play vimeo video using iframe in webview?
https://github.com/droid28/VimeoVideo
Auto playing vimeo videos in Android webview
also I put some questions related this.
https://stackoverflow.com/questions/25402410/play-vimeo-videos-in-webview-in-android-programmatically
https://stackoverflow.com/questions/25402052/play-yahoo-videos-in-webview-in-android-programmatically
can anyone help me to come out from this problem.
Thanks
Advance

Youtube videos in phonegap & android

I have a problem with playinh youtube videos in my app.
I have a page with embed video. When i tap on video, loader appears, everything is ok.
When loader dissapears, it should start playing. But in my application there is white screen appears.
On LogCat at this moment i can see this:
CordovaLog showing Custom View
Problem fixed, by using plugin.
But, i have the same problem with VIMEO.
This plugin will help you to play a YouTube video in a Phonegap/Cordova app:
https://github.com/remcob00/cordova-phonegap_youtube_player_api_android

Youtube movie in android html application

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? :-)

android : get current position of videos in webview

I am playing youtube videos in webview .In my app i have overridden the ontouch of webview. SO when user clicks on webview playing video, it opens another webview which is full screen . Now here the video is starting from the beginning. Instead of that is there a way to get the current postion of the video and to start playing from that point in the new webview.
ie i am looking for something equivalent to getCurrentposition and seekto in a videoview.
Please let me know if this is possible or is there any work around.
Thank you
I have done this before and I warn you that things might get messy in future!
Anyways, take a look at "JavaScriptInterface" for webview in android. here is a link
Also take a look at google's youtube player
There is Android youtube player as well as players using javascript/iframe etc.

Webview sound in Android

I have a WebView in my application, this webview contain videos, but the problems is you can still hear the video's playing even you press the back menu.
The answer is Here.
Itseems the Webview thread continues to run even if you press back button.
You can read the answers in this SO question: How to stop youtube video playing in Android webview?

Categories

Resources