dear master,
i want to get youtube video id from URL webview, its works ..but not changed automaticly.. i have to click any link on webview to show on label
this is my code: CMIIW
B4X:
Sub Globals
Private WebView1 As WebView
Private Label1 As Label
Private Label2 As Label
Private Button1 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
WebView1.LoadUrl("https://m.youtube.com")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub vid(Text As String) As String
Return Text.SubString(Text.LastIndexOf("=") + 1)
End Sub
Sub WebView1_PageFinished (Url As String)
Dim idlist As List = Regex.Split("=var", Url)
For Each ytid As String In idlist
If ytid.Length > 0 Then
Label1.Text=(vid(ytid))
End If
Next
End Sub
Hi, am happy to share this project of mine. What it does is, it accepts normal YouTube link and gets its direct download link from this website https://bitdownloader.com. The direct download link can be played directly in media streaming application like mediaview or b4jvlc or exoplayer for...