SA-MP Forums Archive
FTP in audio stream? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Other (https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: FTP in audio stream? (/showthread.php?tid=316614)



FTP in audio stream? - Jantjuh - 07.02.2012

Hi there & thx for reading this,

I was just wondering if it is possible to use the FTP protocol in PlayAudioStreamForPlayer.
Like this:
pawn Код:
PlayAudioStreamForPlayer(playerid, "ftp://user:pass@name/files/music/example.mp3");
It would be great if someone could tell me.

Thanks and have a nice day!


Re: FTP in audio stream? - Max_Coldheart - 07.02.2012

I guess it works?
Would be pretty cool at least. Try it out


Re: FTP in audio stream? - Jantjuh - 07.02.2012

Quote:
Originally Posted by CookieJar
Посмотреть сообщение
I guess it works?
Would be pretty cool at least. Try it out
Ty

The problem is, when I got to try it out I got to setup an FTP server. In order to use FTP I need to forward port 21. When I forward it, I have to restart my router which will cause all the local IP's in my network to change. Because I'm also hosting the MP3 files for THIS script, I can't permit to do that because it takes some time to restore everything

(Btw: I can't configure DHCP in my network so I can't assign static IP's to my computers )


Re : FTP in audio stream? - ricardo178 - 07.02.2012

Buying a FTP server is the best choise.


Re: Re : FTP in audio stream? - Jantjuh - 07.02.2012

Quote:
Originally Posted by ricardo178
Посмотреть сообщение
Buying a FTP server is the best choise.
True
I'll try to setup a free webhost with FTP to test it btw.


Re: FTP in audio stream? - Vince - 07.02.2012

Have you considered uploading your files on a storage site? DropBox for example. Also, if you don't have DHCP then all your computers must have a static ip, because DHCP is Dynamic Host Configuration Protocol


Re: FTP in audio stream? - Jantjuh - 07.02.2012

Quote:
Originally Posted by Vince
Посмотреть сообщение
Have you considered uploading your files on a storage site? DropBox for example. Also, if you don't have DHCP then all your computers must have a static ip, because DHCP is Dynamic Host Configuration Protocol
Thanks for the tip about DropBox!
And, I think I gotta learn some more about DHCP lol

Thank you,

J.


Re: FTP in audio stream? - Scott - 07.02.2012

SA-MP uses the bass audio library and I am assuming BASS_StreamCreateURL in order to play the audio stream.
Quote:

url URL of the file to stream. Should begin with "http://" or "https://" or "ftp://", or another add-on supported protocol.

So I would say it's worth giving a try, just be warned that the client will see whatever username/password you use to FTP.


Re: FTP in audio stream? - Jantjuh - 08.02.2012

Quote:
Originally Posted by h02
Посмотреть сообщение
SA-MP uses the bass audio library and I am assuming BASS_StreamCreateURL in order to play the audio stream.


So I would say it's worth giving a try, just be warned that the client will see whatever username/password you use to FTP.
That's true about the username & pass.

Thank you!!