mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-25 11:04:00 +00:00
Document infinite duration bug better
This commit is contained in:
parent
ddc5fb74cb
commit
9cbef0cedc
1 changed files with 2 additions and 1 deletions
|
|
@ -130,7 +130,8 @@ export default class ElementSource {
|
|||
getDuration() {
|
||||
const { duration } = this._audio;
|
||||
// Safari on iOS currently has a strange behavior where it reports
|
||||
// the duration as infinity. For now, 0 is better even though it's still wrong.
|
||||
// the duration as infinity if an Accept-Ranges header is not returned.
|
||||
// For now, 0 is better even though it's still wrong.
|
||||
return isNaN(duration) || duration === Infinity ? 0 : duration;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue