Sub Globals
Dim www As WebView
Dim wvxtra As WebViewExtras
Dim YouTubePlayer As YouTubeStandalonePlayer
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main")
wvxtra.addJavascriptInterface(www,"B4A")
www.LoadURL("http://www.domain.com/videos.html")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub YouTube(videoID As String)
YouTubePlayer.Initialize("YouTubePlayer")
If YouTubePlayer.CheckPlayerSupported <> "SUCCESS" Then
Msgbox("YouTube service not available: " & CRLF & YouTubePlayer.CheckPlayerSupported, "")
Else
YouTubePlayer.StartVideo("YouTubeDeveloperKey", videoID, 0, True, False)
End If
End Sub