In the youtube library, to select which video you need the "0xdZXOM_Otc" portion of the url to direct the player to the video. How do I extract what comes after watch?v=
basically my aim is to use a webview to allow the user to select a video and the youtube library to play it, if there as an easier way to do it I am all ears
If you are using a webview, you can extract the video ID like this:
B4X:
Sub WebView1_OverrideUrl(Url As String) As Boolean
Dim VideoToPlay As String
VideoToPlay = Url.Replace("http://www.youtube.com/watch?v=", "")
...
End Sub
The result will be just the VideoID saved in the VideoToPlay variable.
If you are using a webview, you can extract the video ID like this:
B4X:
Sub WebView1_OverrideUrl(Url As String) As Boolean
Dim VideoToPlay As String
VideoToPlay = Url.Replace("http://www.youtube.com/watch?v=", "")
...
End Sub
The result will be just the VideoID saved in the VideoToPlay variable.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.