Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
sources.Initialize
sources.Add(player1.CreateURiSource("http://192.168.1.154:8000"))
' sources.Add(player1.CreateDashSource("http://www.youtube.com/api/manifest/dash/id/bf5bb2419360daf1/source/youtube?as=fmp4_audio_clear,fmp4_sd_hd_clear&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0&ipbits=0&expire=19000000000&signature=51AF5F39AB0CEC3E5497CD9C900EBFEAECCCB5C7.8506521BFC350652163895D4C26DEE124209AA9E&key=ik0"))
' sources.Add(player1.CreateHLSSource("https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8"))
' sources.Add(player1.CreateUriSource("http://html5demos.com/assets/dizzy.mp4"))
player1.Initialize("player")
player1.Prepare(player1.CreateListSource(sources))
End If
'Activity.LoadLayout("1")
'SimpleExoPlayerView1.Player = player1
player1.Play
End Sub
Sub Player_Ready
Log("Ready")
ToastMessageShow("Listo para reproducir",False)
End Sub
Sub Player_Error (Message As String)
Log("Error: " & Message)
ToastMessageShow("Error, reiniciando",False)
player1.Release
player1.Initialize("player")
player1.Prepare(player1.CreateListSource(sources))
player1.Play
End Sub
Sub Player_Complete
Log("complete")
ToastMessageShow("Reproducción completada",False)
player1.Release
player1.Initialize("player")
player1.Prepare(player1.CreateListSource(sources))
player1.Play
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub