Hi, I am using a small menu screen to launch four video's (MP4 files) this is working fine and loads another layout, the video plays and to return to the main menu I have a simple button but the video continues to play in the background and if I choose another from the main menu the video is correct but I have the audio from the background and the newly selected video
How can I stop the video playing with the back button1_click
Hope someone can help
How can I stop the video playing with the back button1_click
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("albie2")
If FirstTime Then
player1.Initialize("player")
player1.Prepare(player1.CreateFileSource(File.DirAssets, "albie2.mp4"))
End If
SimpleExoPlayerView1.Player = player1
player1.play
End Sub
Sub button1_click
RemoveViews
StartActivity("main")
End Sub
Sub RemoveViews
Dim i As Int
For i=Activity.NumberOfViews-1 To 0 Step -1
Activity.RemoveViewAt(i)
Next
End Sub
Hope someone can help