MAB Posted October 12, 2015 Share Posted October 12, 2015 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
Dealman Posted October 13, 2015 Share Posted October 13, 2015 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
MIKI785 Posted October 13, 2015 Share Posted October 13, 2015 Or you could use mta server's http server, just put an attribute download="false" in meta. Link to comment
MAB Posted October 13, 2015 Author Share Posted October 13, 2015 Or you could use mta server's http server, just put an attribute download="false" in meta. What do you mean? Link to comment
MIKI785 Posted October 14, 2015 Share Posted October 14, 2015 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). Link to comment
MAB Posted October 14, 2015 Author Share Posted October 14, 2015 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
MIKI785 Posted October 15, 2015 Share Posted October 15, 2015 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. Link to comment
MAB Posted October 15, 2015 Author Share Posted October 15, 2015 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
MIKI785 Posted October 15, 2015 Share Posted October 15, 2015 I wrote download="false", so put it in including the " signs. Link to comment
MAB Posted October 15, 2015 Author Share Posted October 15, 2015 I wrote download="false", so put it in including the " signs. thanks i'll try it out Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now