goldfire / howler.js

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

HTML5 audio does not work with Samsung Internet browser #1013

Closed peterpp closed 4 years ago

peterpp commented 6 years ago

Hello, I tried a HTML5 demo on your website with Samsung's proprietary (and default) "Internet" browser and it doesn't work. In particular: Music Player, Live Radio and HTML5 tests are silent. Other demos and tests work fine. I tired also Google Chrome and everything is OK there.

Device: Samsung Galaxy S7 Edge, Android 7.0. Browser: Samsung Internet 7.2.10.33

goldfire commented 6 years ago

Unfortunately, I don't have access to a Samsung device. Were there any errors in the console?

peterpp commented 6 years ago

I managed to set remote debugging via Chrome, but there are no messages in console.

peterpp commented 6 years ago

I investigate it more and found a problem with this creepy browser. Only 2 bytes are requested from audio file. This 2 bytes are returned by server and playing will stop.

For example URL: https://howlerjs.com/assets/howler.js/examples/player/audio/rave_digger.webm In Google Chrome request contains HTTP header:

Range: bytes=0-

Response contains HTTP headers:

Content-Length: 1399941
Content-Range: bytes 0-1399940/1399941

In Samsung Internet range 0-1 is requested:

Range:bytes=0-1

And valid response from server:

Content-Length:2
Content-Range:bytes 0-1/1399941

I have no idea why this happens and what to do to prevent this.

peterpp commented 6 years ago

OK, after lots of tests my result is that range 0-1 is not a problem. I believe this is an ugly bug of this browser. Maybe it's a badly implemented feature to block automatic playing without user interaction. I tried clean usage of HTML5

BobbyLH commented 5 years ago

I encounter same problem, but our other project play well in the SAMSUNG original browser. So I had made some test and unfortunately find that the 2.0.13(tag) working well but not in higher version. Now I have to downgrade the version to 2.0.13 for temporary measure.

goldfire commented 4 years ago

Closing due to inactivity. If this is still an issue, reply with more info and I'll reopen.