diff --git a/js/media/elementSource.js b/js/media/elementSource.js index aa07b5bd..706d80f5 100644 --- a/js/media/elementSource.js +++ b/js/media/elementSource.js @@ -129,7 +129,9 @@ export default class ElementSource { getDuration() { const { duration } = this._audio; - return isNaN(duration) ? 0 : duration; + // 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. + return isNaN(duration) || duration === Infinity ? 0 : duration; } getTimeElapsed() {