Hi,
Using this code to test videoview functionality:
Gives me the following problems:
1) it doesn't matter which statement (sendtoback or bringtofront) is enabled in the 'click' subs, the video is always sent to the back when a button is touched
2) the video re-starts when it is sent to the back, rather than continuing to play
Any ideas as to where I'm going wrong?
Using this code to test videoview functionality:
B4X:
Sub Globals
Dim vv1 As VideoView
Dim vv2 As VideoView
Dim button1 As Button
Dim button2 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
vv1.Initialize("vv1comp")
vv2.Initialize("vv2comp")
button1.Initialize("btn1")
button2.Initialize("btn2")
Activity.AddView(vv1, 10dip, 10dip, 200dip, 200dip)
Activity.AddView(vv2, 110dip, 110dip, 200dip, 200dip)
Activity.AddView(button1, 10dip, 410dip, 90dip, 50dip)
Activity.AddView(button2, 110dip, 410dip, 90dip, 50dip)
button1.Text = "1 on top"
button2.Text = "2 on top"
vv1.MediaControllerEnabled = False
vv1.MediaControllerEnabled = False
vv1.LoadVideo(File.DirRootExternal & "/Movies", "movie1.MOV")
vv2.LoadVideo(File.DirRootExternal & "/Movies", "movie2.MOV")
vv1.Play
vv2.play
End Sub
Sub vv1comp_complete
vv1.LoadVideo(File.DirRootExternal & "/Movies", "movie1.MOV")
vv1.Play
End Sub
Sub vv2comp_complete
vv2.LoadVideo(File.DirRootExternal & "/Movies", "movie2.MOV")
vv2.play
End Sub
Sub btn1_click
' vv1.SendToBack
vv1.BringToFront
vv1.play
End Sub
Sub btn2_click
' vv2.SendToBack
vv2.BringToFront
vv2.play
End Sub
Gives me the following problems:
1) it doesn't matter which statement (sendtoback or bringtofront) is enabled in the 'click' subs, the video is always sent to the back when a button is touched
2) the video re-starts when it is sent to the back, rather than continuing to play
Any ideas as to where I'm going wrong?