Hey there, I found a workaround to make volume in CS:GO changeable.
First of all, I found, that you can change volume of audio stream in <audio> tag.
Then I made this testpage:
HTML Code:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function get(name){
if(name=(new RegExp('[?&]'+encodeURIComponent(name)+'=([^&]*)')).exec(location.search))
return decodeURIComponent(name[1]);
}
window.onload = function()
{
var radio = document.getElementById("myRadio");
radio.src = get('url');
radio.volume = get('volume');
};
</script>
</head>
<body>
<audio autoplay id="myRadio" src="" controls>
</audio>
</body>
</html>
My radiostations.ini now looks like this:
Code:
"Chillstep" http://pub1.diforfree.org:8000/di_chillstep_hi
"Chillstep 0.6" http://path.to.my/workaround.html?url=http://pub1.diforfree.org:8000/di_chillstep_hi&volume=0.6
"Chillstep 0.3" http://path.to.my/workaround.html?url=http://pub1.diforfree.org:8000/di_chillstep_hi&volume=0.3
And, it worked.
NOTE: This will work ONLY if you have direct audio stream url.
But it's not that hard to find .m3u radio playlists and extract stream url from them.
I wanted to make some changes, but I suck at making plugins, so
I decided to make a request for you:
Can you do menu on !radio look like this:
Code:
1. Choose station
2. Volume
3. Turn off
9. Close
Volume menu will look something like this:
Code:
1. 100%
2. 80%
3. 60%
4. 40%
5. 20%
8. Back
9. Close
You put your stream urls to radiostations.ini
And when someone changes station or volume, plugin redirect him on http://my.workaround/page?url={stream_ulr}&volume={volume}
This way we will have nice CS:GO radio with changeable volume =)