Android Question MediaPlayerStream - correct way of writing path to file on server

hgperli

Member
Licensed User
Longtime User
hi,

I'm having difficulties in streaming a mp3 file from my server using the mediaplayerstream.
in my network, the server has the address 192.168.178.25, also called nasc0d5d5.
When using SBM, I'm successful in listing all files of a path in the server with
Sub Process_Globals
Dim MP3_Server As SMB
End Sub
Sub Activity_Create(FirstTime As Boolean)
MP3_Server.Initialize("MP3_Server")
MP3_Server.ListFiles("smb://192.168.178.25/public/.../","*")
end sub


however no success (instead an error message) when trying the same and mediaplayerstream (essential code below); I'd be greatful for any idea/help/solution.

Sub Process_Globals
Dim MP3_Server As SMB
Dim MinMP3_Player As MediaPlayerStream
End Sub
Sub Activity_Create(FirstTime As Boolean)
MP3_Server.Initialize("MP3_Server")
MinMP3_Player.Initialize("MinMP3_Player")
MinMP3_Player.Load("smb://192.168.178.25/public/.../<any_mp3_file>.mp3")
End Sub
Sub MinMP3_Player_StreamReady
MinMP3_Player.Play
End Sub
 

DonManfred

Expert
Licensed User
Longtime User
you need to download the file to your device from smb first. Then you can play it from local (your Device). The SMB-Lib does not support this i believe. for ex. a File.Exists("smb://192.168.178.25/public/.../<any_mp3_file>.mp3") will not work either.
 
Upvote 0
Top