#Region Project Attributes
#ApplicationLabel: VitamioBundle4 example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#AdditionalRes: C:\Users\foobar\Basic4Android\VitamioBundle-4-2-0\library_files\res, io.vov.vitamio
#End Region
#Region Activity Attributes
#FullScreen: True
#IncludeTitle: True
#End Region
'Activity module
Sub Process_Globals
End Sub
Sub Globals
Dim VitamioMediaController1 As Vitamio_MediaController
Dim VitamioVideoView1 As Vitamio_VideoView
End Sub
Sub Activity_Create(FirstTime As Boolean)
' take a look at the manifest editor to see the additional entry activity required in order to use VitamioBundle
' VitamioBundle version 4.2.0 uses the new #AdditionalRes project attribute
' check if the VitamioBundle core is installed
' if this is the first time that the installed application has been started then the core will NOT be installed
' otherwise the core should be already installed
' if the core is NOT installed then CheckVitamioLibs returns False and this Activity's Finish method is called by the library
' the core is then installed and this Activity will be restarted
' CheckVitamioLibs will now return True and you can proceed to use the library
If VitamioVideoView1.CheckVitamioLibs Then
VitamioVideoView1.Initialize("VitamioVideoView1")
Activity.AddView(VitamioVideoView1, 0, 0, 100%x, 100%y)
VitamioMediaController1.Initialize("VitamioMediaController1")
VitamioVideoView1.SetMediaController(VitamioMediaController1)
VitamioVideoView1.SetVideoQuality(VitamioVideoView1.VIDEO_QUALITY_HIGH)
VitamioVideoView1.SetVideoPath("http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8")
' VitamioVideoView1.SetVideoPath(File.Combine(File.DirRootExternal, "test_video.mp4"))
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
' events raised by Vitamio_MediaController
Sub VitamioMediaController1_Hidden
Log("VitamioMediaController1_Hidden")
End Sub
Sub VitamioMediaController1_Shown
Log("VitamioMediaController1_Shown")
End Sub
' events raised by Vitamio_VideoView
Sub VitamioVideoView1_BitmapSubtitleUpdated(Bitmap1() As Byte, Width As Int, Height As Int)
End Sub
Sub VitamioVideoView1_Buffering(Percent As Int)
' Log("VitamioVideoView1_Buffering: "&Percent) ' commented out to avoid excess logging
End Sub
Sub VitamioVideoView1_Complete
Log("VitamioVideoView1_Complete")
End Sub
Sub VitamioVideoView1_Error(MEDIA_ERROR As Int) As Boolean
' this event Sub must return a Boolean value to indicate whether it has handled the error or not
' returning True will prevent the library from taking any action such as displaying an error message
Log("VitamioVideoView1_Error")
Return True
End Sub
Sub VitamioVideoView1_Info(What As Int, Extra As Int) As Boolean
' what does this event mean?
' what do the Int parameters represent?
' Log("VitamioVideoView1_Info") ' commented out to avoid excess logging
Return False ' indicates that this Sub has NOT handled the event and that the library should handle it
End Sub
Sub VitamioVideoView1_Prepared
Log("VitamioVideoView1_Prepared")
End Sub
Sub VitamioVideoView1_SeekComplete
End Sub
Sub VitamioVideoView1_TextSubtitleUpdated(SubText As String)
End Sub