public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == RADIO) { if(response) { if(listitem == 0)// (BBC Radio 1) { ShowPlayerDialog(playerid, RADIO_CONFIRM, DIALOG_STYLE_MSGBOX,"BBC Radio 1 (United Kingdom)","{3399FF}You are now tuned into BBC Radio 1\n{FFFFFF}The Best New Music And Entertainment\n(98.1FM San Andreas)", "OK", ""); PlayAudioStreamForPlayer(playerid, "http://www.bbc.co.uk/radio/listen/live/r1.pls"); } // rest of stations // .............. if(listitem == 8) // (STOP RADIO) { StopAudioStreamForPlayer(playerid); } return 1; }
Hello there,
PlayAudioStreamForPlayer is a fairly new feature, and I am using it for the first time. It seems that however I'm having trouble with setting it up. The native client green message appears that the stream is playing, however I cannot hear it. As researched, some people had trouble with Audio apparently being totally quiet, however mine's set to full and I'm lost about where I could have gone wrong. I'd appreciate any help, cheers. Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == RADIO) { if(response) { if(listitem == 0)// (BBC Radio 1) { ShowPlayerDialog(playerid, RADIO_CONFIRM, DIALOG_STYLE_MSGBOX,"BBC Radio 1 (United Kingdom)","{3399FF}You are now tuned into BBC Radio 1\n{FFFFFF}The Best New Music And Entertainment\n(98.1FM San Andreas)", "OK", ""); PlayAudioStreamForPlayer(playerid, "http://www.bbc.co.uk/radio/listen/live/r1.pls"); } // rest of stations // .............. if(listitem == 8) // (STOP RADIO) { StopAudioStreamForPlayer(playerid); } return 1; } |
As far as I heard, Audio stream was for Shoutcast\Icecast radios, not national radios.
|
Originally Posted by seanny
As far as I heard, Audio stream was for Shoutcast\Icecast radios, not national radios
|
As said already, it's on full...
I heard that .pls streams generally work. All 7 radios I have are in .pls and all 6 apart from the one I provided in this topic, are non-national radios. |
It should generally work without any ID's, as logically, any media player such as VLC captures them and plays them. Same with the Audio Plugin, it worked before with the Audio_PlayStreamed native. I thought it'd be easier if I could give people the 0.3d format.
|