.:HyPeX:. Posted March 11, 2014 Share Posted March 11, 2014 Hey guys, how can i create a PlaySound3D with any Stream radio? i know direct link like IP is supported and works but.. it doenst display all the stuff like author, etc. i wanted to make this PLS work: [playlist] NumberOfEntries=8 File1=http://pub5.di.fm:80/di_chilloutdreams Title1=Digitally Imported - Chillout Dreams Length1=-1 File2=http://pub3.di.fm:80/di_chilloutdreams Title2=Digitally Imported - Chillout Dreams Length2=-1 File3=http://pub8.di.fm:80/di_chilloutdreams Title3=Digitally Imported - Chillout Dreams Length3=-1 File4=http://pub1.di.fm:80/di_chilloutdreams Title4=Digitally Imported - Chillout Dreams Length4=-1 File5=http://pub7.di.fm:80/di_chilloutdreams Title5=Digitally Imported - Chillout Dreams Length5=-1 File6=http://pub6.di.fm:80/di_chilloutdreams Title6=Digitally Imported - Chillout Dreams Length6=-1 File7=http://pub2.di.fm:80/di_chilloutdreams Title7=Digitally Imported - Chillout Dreams Length7=-1 File8=http://pub4.di.fm:80/di_chilloutdreams Title8=Digitally Imported - Chillout Dreams Length8=-1 Version=2 Link to comment
Dealman Posted March 11, 2014 Share Posted March 11, 2014 Not sure what you're asking for, but you could take a look at the code of my internet radio, link's in the signature. Link to comment
denny199 Posted March 11, 2014 Share Posted March 11, 2014 It outputs for me correctly, I used: `onClientSoundChangedMeta` with this url for playSound3D: "http://pub5.di.fm:80/di_chilloutdreams" Link to comment
.:HyPeX:. Posted March 11, 2014 Author Share Posted March 11, 2014 It outputs for me correctly, I used:`onClientSoundChangedMeta` with this url for playSound3D: "http://pub5.di.fm:80/di_chilloutdreams" Yeah, but it says the radio name wich is chillout dreams and just that, nothing else. Link to comment
Karuzo Posted March 11, 2014 Share Posted March 11, 2014 What should it say either? If you want to show the name of the Song which is playing currently, youll need an api. Link to comment
Dealman Posted March 11, 2014 Share Posted March 11, 2014 Only some internet radios support 'dynamic' metas. Such as current artist and song, so don't expect each and every one to have it. Most "professional" ones have, though. You'll just have to try your way to see what radios use them or not. You do not need any API, only getSoundMetaTags. Link to comment
.:HyPeX:. Posted March 11, 2014 Author Share Posted March 11, 2014 Only some internet radios support 'dynamic' metas. Such as current artist and song, so don't expect each and every one to have it.Most "professional" ones have, though. You'll just have to try your way to see what radios use them or not. You do not need any API, only getSoundMetaTags. I'm using visualiser resource as core, so i know whenever its working or not Link to comment
denny199 Posted March 12, 2014 Share Posted March 12, 2014 You indeed don't need an api, LOL... Well, here's my code (ofcourse I used a costum drawing system) addEventHandler("onClientSoundStream", root, function(success, length, streamName) if streamName then local veh = getPedOccupiedVehicle(getLocalPlayer()) if veh then if radioSound[veh] == nil then return end if radioSound[veh].soundElement == source then outputChatBox("#FFFFFFRadio stream: #22AA22 " .. streamName, 0, 0, 0, true) end end end end ) addEventHandler("onClientSoundChangedMeta", root, function(streamTitle) if streamTitle then local veh = getPedOccupiedVehicle(getLocalPlayer()) if veh then if radioSound[veh] == nil then return end if radioSound[veh].soundElement == source then -- as you can see here, we check if the sound source = on the vehicle element outputChatBox("#FFFFFFRadio meta: #AA2222 " .. streamTitle, 0, 0, 0, true) -- this was outputting all the songs properly. --[[ message1 = streamTitle showRadio(false,message1,1) ]]-- end end end end ) 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