Hi,
I am using the exoplayer in order play OGG or MP3 files (tried both), but I keep getting a filenotfound error.. It does work with Mediaplayer.
The reason I wanted to use Exoplayer was to have a nice loop feature. Mediaplayer has 1/10th pause when looping files.
Reference: https://www.b4x.com/android/forum/threads/exoplayer-mediaplayer-videoview-alternative.72652/#content
Note: URL streaming works
Error I am getting:
Error: com.google.android.exoplayer2.upstream.AssetDataSource$AssetDataSourceException: java.io.FileNotFoundException:
Build tool version: android-23
B4A version : 6.3.1
Phone : Nexus 6P
Emulator : Nougat / Intel
Thanks
I am using the exoplayer in order play OGG or MP3 files (tried both), but I keep getting a filenotfound error.. It does work with Mediaplayer.
The reason I wanted to use Exoplayer was to have a nice loop feature. Mediaplayer has 1/10th pause when looping files.
Reference: https://www.b4x.com/android/forum/threads/exoplayer-mediaplayer-videoview-alternative.72652/#content
Note: URL streaming works
B4X:
Sub Process_Globals
Private player1 As SimpleExoPlayer
End Sub
Sub Globals
Private SimpleExoPlayerView1 As SimpleExoPlayerView
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
player1.Initialize("player")
' player1.CreateFileSource(File.DirAssets, "w4.mp3")
player1.Prepare(player1.CreateFileSource(File.DirAssets,"w4.ogg"))
' Also tried with File.DirInternal
End If
Activity.LoadLayout("1")
SimpleExoPlayerView1.Player = player1
player1.Play
End Sub
Sub Player_Ready
Log("Ready")
End Sub
Sub Player_Error (Message As String)
Log("Error: " & Message)
End Sub
Sub Player_Complete
Log("complete")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Error I am getting:
Error: com.google.android.exoplayer2.upstream.AssetDataSource$AssetDataSourceException: java.io.FileNotFoundException:
Build tool version: android-23
B4A version : 6.3.1
Phone : Nexus 6P
Emulator : Nougat / Intel
Thanks
Last edited: