Hi, I am developing a chat with audio messaging and I faced a problem. I can download the file from the server using FTP, but I cannot play it, I have the error here:
This looks like a pretty good solution. But the problem is that audio messages are stored on the server, where they can be sent from an android device and there will be no possibility to edit the audio. Maybe mediaplayer isn't the only solution to this problem?
Sub CreatePlayer(url As String) As NativeObject
Dim u As NativeObject
u = u.Initialize("NSURL").RunMethod("URLWithString:", Array(url))
Dim player As NativeObject
player = player.Initialize("AVPlayer").RunMethod("alloc", Null).RunMethod("initWithURL:", Array(u))
Return player
End Sub
Thanks for the answer. I decided to test your assumption
I uninstalled the application and tried to download these files again via FTP. The download was successful (Success = True in FTP_DownloadCompleted).
Displayed the size of this file in the audio playback function
Thanks for the advice. I downloaded a file from the server with a size of 62451. I thought there might be a problem with the file name, because it starts with a "!" But the error has not gone anywhere. I tried to upload the file directly to the server and then download it and play it on Ipad and everything worked, but my audio messages from android break on the initialization of the Media Player.
P.S. I tried to download the file from the server to the pc and it plays without problems