Sub Process_Globals
Public App As Application
Public NavControl As NavigationController
Private Page1 As Page
Private player1, player2, player3 As NativeObject
End Sub
Private Sub Application_Start ( Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.Title = "Page 1"
Page1.RootPanel.LoadLayout("1")
Nav.ShowPage(Page1)
player1 = CreatePlayer("http://peace.str3am.com:6350")
player2 = CreatePlayer("http://cast.sc1.shoutcaststreaming.us:8080")
player3 = CreatePlayer("http://sc1.christiannetcast.com:9058")
player1.RunMethod("play", Null)
player2.RunMethod("play", Null)
player3.RunMethod("play", Null)
End Sub
Sub muteplayer1
'Tried this
player1.RunMethod("muted", Null)
'This gives the error. Of course this would not do nothing. But do not really know how to implement this in B4i
end sub
Sub CreatePlayer(url As String) As NativeObject
Dim u As NativeObject
u = u.Initialize("NSURL").RunMethod("URLWithString:", Array(url))
Dim player As NativeObject
player = player.Initialize("AVPlayer").RunMethod("alloc", Null) _
.RunMethod("initWithURL:", Array(u))
Return player
End Sub