In the game I'm currently creating, players can click on a radio in some of the rooms and it then starts streaming from one of the local radios.
This works fine when starting the streaming using the Browser plugin. When the player clicks on the radio object, the Browser object
"var audio = new Audio('http://onefm.ice.infomaniak.ch:80/onefm-high.aac');audio.play();"
"audio.pause();audio.currentTime = 0;"
This is the correct way to stop the stream playing, but I suspect the issue is that the "audio" object is not declared anymore (the browser
forgets it when it has finished executing the first set of instructions, as the variable "audio" is local).
In a conventional programming language, I wouldn't have a problem, as I would have stored the variable and just recalled it, but I don't
stream object back to a variable in order to then use this variable with the pause() method and to set the currentTime parameter to zero?