javascript - Buffering on audio source -
i'm using javascript radio player, so, got bad network , connection drops out, want know if there's function buffering, reload stream if crashes. hope answer, thanks.
greetings, julia.
if use case radio data streaming can't access past data, if use case media-player can use buffered
property of audio element query range of media has been buffered @ moment or currenttime
property access current execution time.
var myaudioelement = document.createelementbytag('audio') // let's suppose audio element has radio streaming attached source myaudioelement.buffered // returns last data has been downloaded source myaudioelement.currenttime // returns time of last data played
maybe should see connection api aware of when user go offline
Comments
Post a Comment