Sub Activity_Create(FirstTime As Boolean)
ffiles.Initialize
ffolders.Initialize
root="/mnt/extsd"
' Log(root)
search(root,True)
Log(ffolders.Size&" folder / "&ffiles.Size&" files")
If FirstTime Then
player1.Initialize("player")
Dim sources As List
sources.Initialize
sources.Add(player1.CreateFilesource(root,ffiles.Get(0)))
sources.Add(player1.CreateFilesource(root,ffiles.Get(1)))
sources.Add(player1.CreateFilesource(root,ffiles.Get(2)))
sources.Add(player1.CreateFilesource(root,ffiles.Get(3)))
player1.Prepare(player1.CreateListSource(sources))
player1.Prepare(player1.CreateLoopSource(sources,-1))
End If
Activity.LoadLayout("1")
SimpleExoPlayerView1.Player = player1
player1.Play
End Sub