SoundManager w HTML5 Audio Causes 206 Partial Content Errors?

I use SoundManager (SM) with the preferred HTML 5 sound along with the standard SM Flash backup.

For some reason, I see that the requests are canceled, which leads to a red error on the console, although the sounds play very well.

Any idea why? Is this the standard for CDN, or perhaps HTML5 audio? Has anyone seen this before? Thanks

Request URL:https://hall.com/misc/sounds/message_sent.mp3 Request Method:GET Status Code: 206 Partial Content (from cache) 

enter image description here

+4
source share
1 answer

This is a problem with the server hosting the MP3, not with SoundManager2. The server does not support partial content (i.e., byte requests). You can learn more about what is required to support partial content , or you can set the stream property on your sound object to false or by using SoundManager defaultOptions . This will suggest that the browser is requesting audio data without the Accept-Ranges: bytes HTTP header.

 soundManager.defaultOptions = { stream: false } 
+2
source

Source: https://habr.com/ru/post/1392776/


All Articles