Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private VideoTextureView1 As VideoTextureView
Dim presenter As VideoTexturePresenter
Dim source As VideoSource
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Layout1")
presenter.Initialize("Presenter",VideoTextureView1)
presenter.Source = source.Initialize("Source","http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8","agent",64*1024,512)
End Sub
Sub Presenter_onError(error As String)
Log($"onError(${error})"$)
End Sub
Sub Presenter_onStateChanged(playWhenReady As Boolean, playbackState As Int)
Log($"onStateChanged(${playWhenReady},${playbackState})"$)
End Sub
Sub Presenter_onVideoSizeChanged(width As Int, height As Int, pixelWidthHeightRatio As Float)
Log($"onVideoSizeChanged(${width}x${height},${pixelWidthHeightRatio})"$)
End Sub
Sub Activity_Resume
presenter.play
End Sub
Sub Activity_Pause (UserClosed As Boolean)
presenter.pause
End Sub