Sub Class_Globals
Public MP As MediaPlayer
Private MP0 As MediaPlayer
Private MP1 As MediaPlayerStream
Private joMP As JavaObject
End Sub
Public Sub Initialize(oCallBack As Object, sPlayerName As String, iPlayerType As Int)
Callback = oCallBack
Player_Name = sPlayerName
PlayerType = iPlayerType
' Set up the player
If PlayerType = LOCAL Then
MP0.Initialize2("MP")
joMP = MP0
else if PlayerType = STREAM Then
MP1.Initialize("MP")
joMP = MP1
End If
End Sub
' Play the loaded track - continue if it was paused
Sub Play_()
' If it was already playing, return True
If Track_Loaded Then
If Not(joMP.RunMethod("IsPlaying", Null)) Then
joMP.RunMethod("Play", Null)
End If
End If
End Sub