tsquillario / Jamstash

HTML5 Music Streamer for Subsonic
http://jamstash.com
272 stars 88 forks source link

Add option to estimate the content length of streamed media #254

Closed pR0Ps closed 5 years ago

pR0Ps commented 5 years ago

Enabling this can help with seeking within transcoded media.

Without knowing how big a file is, it's impossible to display an accurate progress bar. This option asks the server to send a "Content-Length" header with a guess (based on bitrate and song length) of how big the streamed file is going to be, enabling a progress bar to be shown.

This reliably works with CBR transcodes, but can have issues with VBR as the server doesn't know how big the file will be before it's transcoded. If the server estimates incorrectly then songs could stop playing before they actually finish or cause other glitches.

For the most part servers are pretty good with their estimates and being able to seek in a transcoded stream as it downloads is a substantial UX improvement so the option is enabled by default.