• Streaming a .mp3 or a .wav with datastream(?)
    35 replies, posted
Yeah, please help.
Not possible. (With the datastream, at least)
That's why i put a (?), Is there another way? If so, what?
Have an external URL and use an HTML VGUI element.
I've not looked into it myself at all, but supposedly gm_bass has some kind of streaming feature. Whether or not you could use it from the server, I doubt it. What you're best idea is, is to use a mixture of HTML panels and usermessages to stream from a website. :ninja:
I suck at html D:
This has nothing to do with HTML coding. All you have to do is vgui.Create("HTML") and html:OpenURL("your_url with music").
Oh. Nifty :D [editline]05:30PM[/editline] It gives me Not opening URL: [url]http://www.dextah.com/songs/earthquake.mp3[/url], is .mp3 a blocked extension?
I tried opening that file and it's corrupted or something.
If you're trying to play an MP3 file directly, I would recommend embedding it in Windows Media Player with autostart on (I've had some issues with trying to just open the URL). Google "Windows Media Player HTML Embed" and you'll be on your way.
Or take a peak into the Gmod Mp3 players code thats on Garrysmod.org, it plays the .mp3's fine.
[QUOTE=Chad Mobile;19807445]Or take a peak into the Gmod Mp3 players code thats on Garrysmod.org, it plays the .mp3's fine.[/QUOTE] That's, er, a clientside script that plays already-downloaded mp3s, not at all what he's trying to do.
Oh..sorry then :downsrim:
Thanks for the help guys, i'm going to try Entoros's method now. [editline]09:10AM[/editline] Do i need to create an HTML for every .mp3? because that would be kinda retarded.
I don't really want to learn PHP lol. Well i do, but it would take ages.
PHP Code for a website: [lua] <?php $mp3 = $_GET['mp3']; $mp3 .= '.mp3'; if(file_exists("songs/" . $mp3)){ if (!empty($mp3)){ -- Your player code here. } else { -- default if song don't exist. } } else { --default song. } ?> [/lua] Save as something like music.php and use [url]http://website.com/music.php?mp3=songname[/url] php isn't all that hard.
Why don't you take a look at the code on the php source on my gStream thread? It has everything you need to host your own stuff. If you don't want to use gStream, it's still useful to learn from. It's doing exactly what you want.
What do you mean "Your player code here" Averice, what code?
Thanks, i actually got it by using a flash player instead.
Flash seems to work spiffingly for me.
What if the client doesn't have Flash installed?
But you have to use IE. It's Steam.
You sure? I recall having to download flash when they had that snow animation on the homepage of the store.
But I remember my browser going "DOWNLOAD ADOBE FLASH NAO". Or maybe it was javascript, who knows.
I remember the Steam store requiring flash too. I'm pretty sure it's necessary.
It was flash guys, also i have it working with flash. Soooo. Yeah.
The steam store requires flash. I know this because flash sucks in wine.
I'm switching my gStream to WMP I think. It seems that all of a sudden, steam likes opening java when flash elements open. So it's been crashing a lot of people. Not sure what that's about. I wish steam used a newer IE.
I would use gm_bass from an external site.
Sorry, you need to Log In to post a reply to this thread.