B4J Question Video on WebView Question

giga

Well-Known Member
Licensed User
Longtime User
Yes I tried directly through webview and the entire youtube screen appears with the ads etc... but the video windows states "an error occurred" Please try again later

as you can see here:


.
upload_2015-6-22_1-5-36.png


If I copy the entire address and paste it in I.E or Mozilla it comes up and plays.
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
To play a video from youtube , you can fire up chrome with jShell and get that to play the video
B4X:
Sub Process_Globals
    Private fx As JFX
    Private MainForm As Form
    Dim jsh As Shell
End Sub

Sub AppStart (Form1 As Form, Args() As String)
    jsh.InitializeDoNotHandleQuotes("jsh","C:/the/really/long/pathname/to/where/chrome/is/chrome.exe",Array("--app=https://www.youtube.com/embed/CTNJ51ghzdY"))
    jsh.Run(-1)
End Sub
The above will play the video in a chrome window that has no address bar etc
 
Upvote 0

jmon

Well-Known Member
Licensed User
Longtime User
Playing videos from DailyMotion works
B4X:
wv.LoadUrl("http://www.dailymotion.com/video/x2oa18s_une-video-amateur-montre-le-moment-ou-le-seisme-a-frappe-le-tibet_news")

'
wv.LoadHtml($"<iframe frameborder="0" width="480" height="270" src="http://www.dailymotion.com/embed/video/x2bi11w" allowfullscreen></iframe><br /><a href="http://www.dailymotion.com/video/x2bi11w_un-sinkhole-engloutit-une-voiture-sur-une-route-de-chine_news" target="_blank">Un &quot;sinkhole&quot; engloutit une voiture sur une...</a> <i>by <a href="http://www.dailymotion.com/lemondefr" target="_blank">lemondefr</a></i>"$)
but I tried Vimeo and Youtube, no luck....
 
Upvote 0
Top