#Region Project Attributes
#ApplicationLabel: aud
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim v,v1 As VideoView
Dim b1,b2 As Button
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")
v.Initialize("V")
v1.initialize("v1")
b1.Initialize("b1")
b2.Initialize("b2")
b1.Text = "up"
b2.Text = "down"
Activity.AddView(v,0,0,50%x,50%y)
Activity.AddView(v1,50%x,0,50%x,50%y)
Activity.AddView(b1,0,0,10%x,10%y)
Activity.AddView(b2,0,25%y,10%x,10%y)
v.LoadVideo("http","rtsp://192.168.1.81:5544/DLINK")
v1.LoadVideo("http","rtsp://192.168.1.81:5544/CAM1")
'v.LoadVideo(File.DirRootExternal,"a.mp4")
v.Play
v1.Play
End Sub
Sub b1_click
Volume3(v,0)
End Sub
Sub b2_click
Volume3(v,100)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Volume3(vv As VideoView,k As Int )
Dim r1, r2 As Reflector
r1.Target = vv
r1.Target = r1.GetField("mMediaPlayer")
If r1.Target = Null Then
CallSubDelayed2(Me, "Volume3", vv)
Return
End If
Dim mp As MediaPlayer
r2.Target = mp
r2.SetField2("mp", r1.Target)
mp.SetVolume(k,k)
End Sub