Closed EvgeniyDoctor closed 1 year ago
~Can you try this out using the demo page and see if the issue persists?~
Edit: I see you did test with the demo.
One other thing, you should avoid using var
and use const
or let
for declaring variables, except for very special cases. var
hoists the declaration to the top of your code, which you probably don't want.
Feel free to reference and copy the example code if you want and use that for your website.
The general flow is:
Audio
element in the options, call detachAudioElement()
on the instance.I won't be able to help much unless I can reproduce the error myself. Do you have a link to your website I can try or a link to your code?
In the meantime, to check if your browser environment is causing this error, can you try playing the streams here. Each button on the website represents a unique stream and creates its own instance of IcecastMetadataPlayer when clicked. You should be able to play as many streams simultaneously as you want.
Thank you, but actually, i do not need help anymore. I made all the functionality from scratch by myself without any js lib and it works. Even on iOS. So this issue does not matter for me anymore.
And i tested your link a little bit.
On linux (manjaro 22.1.2) in brave browser (Version 1.51.118 Chromium: 113.0.5672.126 (Official Build) (64-bit)) playback does not work (and in firefox), i get this error:
On windows 10 in the same browser of the same version everything works well, no errors. I edited my play function, so now it works sometimes and sometimes it does not; sometimes can play 2 audio streams at the same time (on linux). Before it was
player.play()
only.On the demo page most of the stations works.
Include:
If i go to
ip:port/name.ogg
in the browser, everything works fine.