0

I'm using Delphi 10.4.1 for developing android mobile application. I'm trying to use the media file name from the cloud file (http://publicipaddress:8000/playfile.mp3). And this files is playing properly in web browser. And When I tried the following code, I have received the excetion java.io.ioexception: Prepare failed status.

  MediaPlayer1.FileName := 'http://publicipaddress:8000/playfile.mp3';
  MediaPlayer1.Play;

Please help to resolve this issue. And I found few solution related to JAVA but don't know how to implement in Delphi. Thanks in advance

  • Does it work with `https` URLs? – Olivier Aug 15 '21 at 07:32
  • Does this answer your question? [How play .mp3 files loaded from a URL in TMediaPlayer with Firemonkey?](https://stackoverflow.com/questions/29974230/how-play-mp3-files-loaded-from-a-url-in-tmediaplayer-with-firemonkey) – SilverWarior Aug 15 '21 at 11:58
  • I'm facing this excetion java.io.ioexception: Prepare failed status. – test.89.1 Aug 15 '21 at 18:41
  • The standard `TMediaPlayer` class does not support streaming. In the first step, you need to download the stream to a temporary file by using THTTPClient. Secondly, you can reference in `TMediaPlayer.filename` to that temporary downloaded file. – Schneider Infosystems Ltd Aug 17 '21 at 05:26

0 Answers0