Sub Globals
Private ForegroundPlayerView As SimpleExoPlayerView
Private BackgroundPlayerView As SimpleExoPlayerView
Timer1.Initialize("Timer1",5000)
Timer1.Enabled = False
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
BackgroundPlayer.Initialize("player")
ForegroundPlayer.Initialize("player2")
BackgroundPlayer.Prepare(BackgroundPlayer.CreateLoopSource(BackgroundPlayer.CreateFileSource(File.DirAssets, "blue1.mp4"),-1))
ForegroundPlayer.Prepare(ForegroundPlayer.CreateLoopSource(ForegroundPlayer.CreateFileSource(File.DirAssets, "sport.mp4"),-1))
End If
Activity.LoadLayout("1")
Sleep(1000)
ForegroundPlayerView.Player = ForegroundPlayer
BackgroundPlayerView.Player = BackgroundPlayer
BackgroundPlayer.Play
' ForegroundPlayer.Play
Dim p As PhoneWakeState
Log("releasing KeepAlive")
p.ReleaseKeepAlive
Log("turning screen on")
p.KeepAlive(True)
Log("using partialLock")
p.PartialLock
Timer1.Enabled = True
End Sub