Does anyone know how to start a youtube video in full screen mode in a webview? It's easy to start the movie WebView.LoadURL("link here"), but I am looking to start it in full screen without the user having to mess with the screen. Also, it would be nice to lock it to view say 360 res even if the movie is posted with options for 480p, 720p, etc. Any information would be helpful.:sign0085:
You can use the Youtube app to play the video, instead of Webview. That also won't open in full screen by default but at least the user knows all he needs to do is tilt the phone to landscape mode to get full screen.
You can open a video in the Youtube app using Intents
The code above is in Java. You just need to make suitable changes to make it work in B4A. Check the B4A Intents documentation and may be some other threads on Intents here.
You can use the Youtube app to play the video, instead of Webview. That also won't open in full screen by default but at least the user knows all he needs to do is tilt the phone to landscape mode to get full screen.
You can open a video in the Youtube app using Intents
The code above is in Java. You just need to make suitable changes to make it work in B4A. Check the B4A Intents documentation and may be some other threads on Intents here.
Flush is not enabled by default due to a bug when you add the WebView with the designer. This is fixed for v1.6. You can either add it programmatically or use Reflector to enable it.
Flush is not enabled by default due to a bug when you add the WebView with the designer. This is fixed for v1.6. You can either add it programmatically or use Reflector to enable it.
Erel,
Has there been any resolution to being able to stream YouTube videos in a WebView or in any other view?
When I load a Webview, the YouTube site comes up, I can see the video, but when I click Play, nothing happens.
The solution does not have to be a WebView.
Thanks,
Rusty
I have tried the example and no luck.
I have used the following code and I get an image of the YouTube video, but it will not play.
B4X:
Dim WebView1 As WebView
webview1.Initialize("")
webview1.loadurl("http://www.youtube.com/watch?v=Bxa0UV1lPTY")
activity.AddView(webview1,0,0,100%x, 100%y)
Dim Intent1 As Intent
Intent1.Initialize(Intent1.ACTION_VIEW, "http://m.youtube.com/watch?v=zLDIcIrZO8Y")
Intent1.SetComponent("com.google.android.youtube/.WatchActivity")
intent1.PutExtra("","http://m.youtube.com/watch?v=zLDIcIrZO8Y")
StartActivity(Intent1)