Answered by:
HTML 5 Streaming audio from audio tag, after stop/played again- continue not from stream

Question
-
Hello there :)
I have a little problem for straming media... well... i add to my app <audio> tag with src= online streaming radio (mp3) and make external controlls and etc with javascript. The problem is... this situation: i open app, everything is ok. Make playing radio. After some time- i click on pause. After 10 minutes click play again - now radio continue from place i left it, not from place in online streaming and after few seconds playing stops. Is there any solution how to restart media file or something, clear the buffer or else.
I hope you understand me and sorry for my english skills.
Thank you :)
- Edited by Boris Delev Friday, February 28, 2014 3:59 PM
Thursday, February 27, 2014 11:26 AM
Answers
-
I think i found solution for this... to clear media like that:
element.src = "about:blank"; element.load(); element.src = src; element.load();
Where = src; is audio media source (like online radio).
Thanks anyway.
- Marked as answer by Boris Delev Thursday, February 27, 2014 7:33 PM
Thursday, February 27, 2014 5:03 PM
All replies
-
I think i found solution for this... to clear media like that:
element.src = "about:blank"; element.load(); element.src = src; element.load();
Where = src; is audio media source (like online radio).
Thanks anyway.
- Marked as answer by Boris Delev Thursday, February 27, 2014 7:33 PM
Thursday, February 27, 2014 5:03 PM -
Thanks for Sharing the solution. However, try it with stop() and play().
To assign a "blank" address will definitely throw a HTML error, which might cause some unknown problem.
Hope my suggestion can help you.
--James
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.- Edited by Jamles HezModerator Friday, February 28, 2014 2:42 AM
Friday, February 28, 2014 2:40 AMModerator -
Yep, i will try, but in documentation- there is no mention for stop() method... with about:blank- no error occur in console. However i will try with stop... and nope, there is no stop() :/
(element is audio tag)
thank u anyway! :D and have a nice day
Saturday, March 1, 2014 2:59 PM