'Code module
#Region Project Attributes
#ApplicationLabel: B4i videoview test
#Version: 1.0.0
'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
#iPhoneOrientations: LandscapeRight
#iPadOrientations: Portrait, LandscapeLeft, LandscapeRight, PortraitUpsideDown
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public NavControl As NavigationController
Private Page1 As Page
Private vv As VideoView
End Sub
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.RootPanel.Color = Colors.White
vv.Initialize("vv")
Page1.RootPanel.AddView(vv.View,0,0dip,100%x,100%y)
'vv.ShowControls = False
Dim myurl As String = "http://a1408.g.akamai.net/5/1408/1388/2005110405/1a1a1ad948be278cff2d96046ad90768d848b41947aa1986/sample_mpeg4.mp4"
Dim myurl2 As String ="http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8"
Dim myurl3 As String = "http://192.168.1.5:8001/1:0:1:3:3DE:110:820000:0:0:0:"
Dim myurl4 As String = "http://www.playon.tv/online/iphone5/main.m3u8"
vv.LoadVideoUrl(myurl4)
NavControl.NavigationBarVisible = False 'permits fullscreen
'NavControl.ToolBarVisible = False ''permits fullscreen (maybe not needed)
NavControl.ShowPage(Page1)
End Sub
Sub vv_Ready
Log(vv.Duration)
vv.Play
End Sub
Sub vv_Complete
Log("stream finished")
End Sub
Private Sub Page1_Resize(Width As Int, Height As Int)
' vv.View.Width = Width
' vv.View.Height = Height
End Sub
Private Sub Application_Active
End Sub
Private Sub Application_Inactive
End Sub
Private Sub Application_Background
End Sub