goldfire / howler.js

Javascript audio library for the modern web.
https://howlerjs.com
MIT License
24k stars 2.24k forks source link

Seek and pause on chrome restart player #1289

Open lukaszweg opened 4 years ago

lukaszweg commented 4 years ago

Hello, when I am using chrome and want to change seek or pause currently playing song, my player restarting it, This occurs only on Chrome. On Firefox for example everything working well. Somone had similar problem and know how to resolve it? I don't want to change html5 to false because I want to stream song, not wait for full dowloading :(

mxvin commented 4 years ago

You're right. Demo player with html5: true is breaking after seeking or pausing player, Toggling html5: false, make seek and pause behave correctly on Chrome. idk what possible workaround for this problem

mxvin commented 4 years ago

Nah, this is just http header issue. see here https://stackoverflow.com/questions/37044064/html-audio-cant-set-currenttime#comment97935607_52520120 You need to set header "Accept-Ranges: bytes" on the audio file. Chrome seems more sensitive about this compare to firefox for assigning the audio.currentTime

tettusud commented 4 years ago

@mxvin could you help me how can I work around this? I am facing same issue when html5 is true, its resetting to start.