From 7dbfaf59140b1107475649b66d0b244db01bd77b Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Fri, 13 Apr 2018 09:31:20 -0700 Subject: [PATCH] Document infinite duration bug better --- js/media/elementSource.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/media/elementSource.js b/js/media/elementSource.js index 706d80f5..9af10fbb 100644 --- a/js/media/elementSource.js +++ b/js/media/elementSource.js @@ -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; }