Jump to content

Sounds Streams


MAB

Recommended Posts

I am making a login panel and i want to play a music on it but without loading it in the meta because it will increase the script size too much which leads to a huge download. I am arranging to play a sound from a URL so if you know how to upload a sound file to internet then use its URL to play it from the internet or play the sound of a youtube vedio please share.

Link to comment

As for uploading the file somewhere you can use services such as Mediafire and Dropbox, I believe Mediafire lets you use direct links if you subscribe. Then you just use playSound like usual, but put in the URL instead of the filepath.

Personally I have always used Kiwi6 to stream files.

As for YouTube, you can do this by using the new CEF Browser introduced with MTA 1.5 :)

Link to comment
All client files are avaiable on internal http server ao that players can download them, for example http://127.0.0.1:22004/login_panel/song.mp3 or something like that, of course you have to change the IP and Port to server's values since client doesn't know them (well, it does but its not accessible through scripting).

so all i do is to put the .mp3 in the folder without adding it in the meta then i do "playSound("http://ip:port/resourceName/fileName.mp3")" ha?

Link to comment
Yes but you have to add it to meta otherwise it wouldnt be avaible on the http server, put download="false" to the file in meta and it wont be downloaded by players at resource's start.

like that?

"theLink" download=false /> 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...