From 03e701b6d02cb47efe607787588878bf0a0d527a Mon Sep 17 00:00:00 2001 From: jbgomez Date: Sun, 17 Apr 2022 11:12:06 -0700 Subject: [PATCH 01/14] Add eagerPlayback global option to use `canplay` event --- src/howler.core.js | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/src/howler.core.js b/src/howler.core.js index aa60cdbe..f4bf0263 100644 --- a/src/howler.core.js +++ b/src/howler.core.js @@ -51,6 +51,7 @@ self.usingWebAudio = true; self.autoSuspend = true; self.ctx = null; + self.eagerPlayback = false; // Set to false to disable the auto audio unlocker. self.autoUnlock = true; @@ -63,8 +64,8 @@ /** * Get/set the global volume for all sounds. - * @param {Float} vol Volume from 0.0 to 1.0. - * @return {Howler/Float} Returns self or current volume. + * @param {float} vol Volume from 0.0 to 1.0. + * @return {Howler/float} Returns self or current volume. */ volume: function(vol) { var self = this || Howler; @@ -539,6 +540,22 @@ self._resumeAfterSuspend = true; } + return self; + }, + + /** + * Use `canplay` event for determining when playback can begin. In contrast with the `canplaythrough` event, + * `canplay` is fired when enough data has been loaded to begin playing the media, but not necessarily enough to + * play without stopping and buffering additional data. + * @return {Howler} + */ + _setEagerPlayback: function() { + var self = this; + + if (self._canPlayEvent === 'canplaythrough') { + self._canPlayEvent = 'canplay'; + } + return self; } }; @@ -623,6 +640,10 @@ // Web Audio or HTML5 Audio? self._webAudio = Howler.usingWebAudio && !self._html5; + if (Howler.eagerPlayback) { + Howler._setEagerPlayback(); + } + // Automatically try to enable audio. if (typeof Howler.ctx !== 'undefined' && Howler.ctx && Howler.autoUnlock) { Howler._unlockAudio(); @@ -974,7 +995,7 @@ node.load(); } - // Play immediately if ready, or wait for the 'canplaythrough'e vent. + // Play immediately if ready, or wait for the '_canPlayEvent' event. var loadedNoReadyState = (window && window.ejecta) || (!node.readyState && Howler._navigator.isCocoonJS); if (node.readyState >= 3 || loadedNoReadyState) { playHtml5(); @@ -984,7 +1005,7 @@ var listener = function() { self._state = 'loaded'; - + // Begin playback. playHtml5(); @@ -2260,7 +2281,7 @@ self._errorFn = self._errorListener.bind(self); self._node.addEventListener('error', self._errorFn, false); - // Listen for 'canplaythrough' event to let us know the sound is ready. + // Listen for '_canPlayEvent' event to let us know the sound is ready. self._loadFn = self._loadListener.bind(self); self._node.addEventListener(Howler._canPlayEvent, self._loadFn, false); From d65b6107d46335e81c2c9cab37d382352b6d49bb Mon Sep 17 00:00:00 2001 From: jbgomez Date: Sun, 17 Apr 2022 11:12:40 -0700 Subject: [PATCH 02/14] Only update currentTime when next value differs --- src/howler.core.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/howler.core.js b/src/howler.core.js index f4bf0263..b1c1f412 100644 --- a/src/howler.core.js +++ b/src/howler.core.js @@ -918,7 +918,9 @@ } else { // Fire this when the sound is ready to play to begin HTML5 Audio playback. var playHtml5 = function() { - node.currentTime = seek; + if (node.currentTime !== seek) { + node.currentTime = seek; + } node.muted = sound._muted || self._muted || Howler._muted || node.muted; node.volume = sound._volume * Howler.volume(); node.playbackRate = sound._rate; From a73d154c98fda93c265bc6b46bf2bc5249910cb4 Mon Sep 17 00:00:00 2001 From: jbgomez Date: Sun, 17 Apr 2022 11:13:08 -0700 Subject: [PATCH 03/14] Add test cases for eagerPlayback --- tests/css/styles.css | 21 ++++++++++++++-- tests/index.html | 49 ++++++++++++++++++++++++------------- tests/js/core.html5audio.js | 42 +++++++++++++++++++++++++++---- tests/js/core.webaudio.js | 34 +++++++++++++++++++++++-- tests/js/spatial.js | 34 +++++++++++++++++++++++-- 5 files changed, 152 insertions(+), 28 deletions(-) diff --git a/tests/css/styles.css b/tests/css/styles.css index 501b568e..13b0acf0 100644 --- a/tests/css/styles.css +++ b/tests/css/styles.css @@ -1,6 +1,6 @@ html { width: 100%; - height: 100%; + height: 100%; overflow: hidden; padding: 0; margin: 0; @@ -89,8 +89,25 @@ body { align-items: center; } +#globalOptions { + margin-bottom: 2rem; +} + +#globalOptions h6 { + font-size: 4vw; + margin: 0 0 1rem; +} + +.option { + font-size: 2vw; +} + +label { + vertical-align: middle; +} + @media screen and (max-height: 400px) { .button { padding: 5px; } -} \ No newline at end of file +} diff --git a/tests/index.html b/tests/index.html index a30b0201..c5150f52 100644 --- a/tests/index.html +++ b/tests/index.html @@ -6,24 +6,39 @@ -
- - - -
+
+
+
Global Options:
+
+ + +
+
+ + + +
- + document.getElementById('html5').onclick = function() { + navigateToTest('core.html5audio.html'); + }; + + document.getElementById('spatial').onclick = function() { + navigateToTest('spatial.html'); + }; + - \ No newline at end of file + diff --git a/tests/js/core.html5audio.js b/tests/js/core.html5audio.js index cd546ef7..82cefc8c 100644 --- a/tests/js/core.html5audio.js +++ b/tests/js/core.html5audio.js @@ -1,3 +1,33 @@ +// Set global options from query params +function parseValueFromEntry(entry) { + var [key, value] = entry; + var parsedValue = value; + + if (value.toLowerCase() === 'true') { + parsedValue = true; + } else if (value.toLowerCase() === 'false') { + parsedValue = false; + } else if (!isNaN(value)) { + parsedValue = parseFloat(value); + } + + return [key, parsedValue]; +} + +function setGlobalOptions([key, value]) { + if (Howler.hasOwnProperty(key)) { + Howler[key] = value; + } +} + +window.location.search + .slice(1) + .split('&') + .filter(([key]) => key) + .map(pair => pair.split('=')) + .map(parseValueFromEntry) + .forEach(setGlobalOptions); + // Cache the label for later use. var label = document.getElementById('label'); var start = document.getElementById('start'); @@ -30,11 +60,13 @@ sound1.once('load', function() { // Define the tests to run. var id; var tests = [ - function(fn) { - id = sound1.play(); + function(fn) { + sound1.once('play', function() { + label.innerHTML = 'PLAYING'; + setTimeout(fn, 2000); + }); - label.innerHTML = 'PLAYING'; - setTimeout(fn, 2000); + id = sound1.play(); }, function(fn) { @@ -265,4 +297,4 @@ var chain = function(i) { start.addEventListener('click', function() { tests[0](chain(1)); start.style.display = 'none'; -}, false); \ No newline at end of file +}, false); diff --git a/tests/js/core.webaudio.js b/tests/js/core.webaudio.js index f6690310..08d60910 100644 --- a/tests/js/core.webaudio.js +++ b/tests/js/core.webaudio.js @@ -1,3 +1,33 @@ +// Set global options from query params +function parseValueFromEntry(entry) { + var [key, value] = entry; + var parsedValue = value; + + if (value.toLowerCase() === 'true') { + parsedValue = true; + } else if (value.toLowerCase() === 'false') { + parsedValue = false; + } else if (!isNaN(value)) { + parsedValue = parseFloat(value); + } + + return [key, parsedValue]; +} + +function setGlobalOptions([key, value]) { + if (Howler.hasOwnProperty(key)) { + Howler[key] = value; + } +} + +window.location.search + .slice(1) + .split('&') + .filter(([key]) => key) + .map(pair => pair.split('=')) + .map(parseValueFromEntry) + .forEach(setGlobalOptions); + // Cache the label for later use. var label = document.getElementById('label'); var start = document.getElementById('start'); @@ -33,7 +63,7 @@ var tests = [ label.innerHTML = 'PLAYING'; setTimeout(fn, 2000); }); - + id = sound1.play(); }, @@ -269,4 +299,4 @@ if (Howler.usingWebAudio) { }, false); } else { window.location = 'core.html5audio.html'; -} \ No newline at end of file +} diff --git a/tests/js/spatial.js b/tests/js/spatial.js index a7aa810d..db06b660 100644 --- a/tests/js/spatial.js +++ b/tests/js/spatial.js @@ -1,3 +1,33 @@ +// Set global options from query params +function parseValueFromEntry(entry) { + var [key, value] = entry; + var parsedValue = value; + + if (value.toLowerCase() === 'true') { + parsedValue = true; + } else if (value.toLowerCase() === 'false') { + parsedValue = false; + } else if (!isNaN(value)) { + parsedValue = parseFloat(value); + } + + return [key, parsedValue]; +} + +function setGlobalOptions([key, value]) { + if (Howler.hasOwnProperty(key)) { + Howler[key] = value; + } +} + +window.location.search + .slice(1) + .split('&') + .filter(([key]) => key) + .map(pair => pair.split('=')) + .map(parseValueFromEntry) + .forEach(setGlobalOptions); + // Cache the label for later use. var label = document.getElementById('label'); var start = document.getElementById('start'); @@ -33,7 +63,7 @@ var tests = [ label.innerHTML = 'PLAYING'; setTimeout(fn, 2000); }); - + id = sound1.play(); }, @@ -116,4 +146,4 @@ if (Howler.usingWebAudio) { }, false); } else { window.location = 'core.html5audio.html'; -} \ No newline at end of file +} From 69198d3388ba1b15d3d41daf85647b088084e72b Mon Sep 17 00:00:00 2001 From: jbgomez Date: Sun, 17 Apr 2022 11:40:13 -0700 Subject: [PATCH 04/14] Update README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4a4766f0..2b098964 100644 --- a/README.md +++ b/README.md @@ -378,6 +378,8 @@ Automatically attempts to enable audio on mobile (iOS, Android, etc) devices and Each HTML5 Audio object must be unlocked individually, so we keep a global pool of unlocked nodes to share between all `Howl` instances. This pool gets created on the first user interaction and is set to the size of this property. #### autoSuspend `Boolean` `true` Automatically suspends the Web Audio AudioContext after 30 seconds of inactivity to decrease processing and energy usage. Automatically resumes upon new playback. Set this property to `false` to disable this behavior. +#### eagerPlayback `Boolean` `false` +When enabled, allows playback to begin before the browser has estimated that enough data has loaded in order to play the sound to its end, without having to stop and buffer for more content. #### ctx `Boolean` *`Web Audio Only`* Exposes the `AudioContext` with Web Audio API. #### masterGain `Boolean` *`Web Audio Only`* From 937abfd2a1663b4d213ce5391f8f1d4dbae1bc21 Mon Sep 17 00:00:00 2001 From: jbgomez Date: Sun, 17 Apr 2022 11:48:47 -0700 Subject: [PATCH 05/14] Change `_setEagerPlayback` to `_enableEagerPlayback` --- src/howler.core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/howler.core.js b/src/howler.core.js index b1c1f412..d1bf37e3 100644 --- a/src/howler.core.js +++ b/src/howler.core.js @@ -549,7 +549,7 @@ * play without stopping and buffering additional data. * @return {Howler} */ - _setEagerPlayback: function() { + _enableEagerPlayback: function() { var self = this; if (self._canPlayEvent === 'canplaythrough') { @@ -641,7 +641,7 @@ self._webAudio = Howler.usingWebAudio && !self._html5; if (Howler.eagerPlayback) { - Howler._setEagerPlayback(); + Howler._enableEagerPlayback(); } // Automatically try to enable audio. From 0e6723f9d0b0379970448a386375f419ce4c19ef Mon Sep 17 00:00:00 2001 From: jbgomez Date: Sun, 17 Apr 2022 14:32:24 -0700 Subject: [PATCH 06/14] Add all global options to tests, refactor to ES5 --- tests/css/styles.css | 15 ++++++++---- tests/index.html | 49 +++++++++++++++++++++++++++++++++---- tests/js/core.html5audio.js | 12 ++++++--- 3 files changed, 62 insertions(+), 14 deletions(-) diff --git a/tests/css/styles.css b/tests/css/styles.css index 13b0acf0..eda116c6 100644 --- a/tests/css/styles.css +++ b/tests/css/styles.css @@ -89,17 +89,22 @@ body { align-items: center; } -#globalOptions { - margin-bottom: 2rem; +#globalOptionsHeader { + font-size: 3vw; + margin: 0 0 1rem; } -#globalOptions h6 { - font-size: 4vw; - margin: 0 0 1rem; +#globalOptions { + display: flex; + flex-wrap: wrap; + justify-content: center; + width: 100%; + margin: 0 2rem 3rem; } .option { font-size: 2vw; + margin-right: 3rem; } label { diff --git a/tests/index.html b/tests/index.html index c5150f52..f5d9b2f3 100644 --- a/tests/index.html +++ b/tests/index.html @@ -7,11 +7,39 @@
+
Global Options:
-
Global Options:
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
- + +
+
+ + +
+
+ +
@@ -21,10 +49,21 @@
Global Options:
+ - \ No newline at end of file + diff --git a/tests/core.webaudio.html b/tests/core.webaudio.html index 7c16bae6..1e42da8b 100644 --- a/tests/core.webaudio.html +++ b/tests/core.webaudio.html @@ -11,6 +11,7 @@
+ - \ No newline at end of file + diff --git a/tests/js/core.html5audio.js b/tests/js/core.html5audio.js index 2d0c3f92..47da99e0 100644 --- a/tests/js/core.html5audio.js +++ b/tests/js/core.html5audio.js @@ -1,37 +1,3 @@ -// Set global options from query params -function parseValueFromEntry(entry) { - var key = entry[0]; - var value = entry[1]; - var parsedValue = value; - - if (value.toLowerCase() === 'true') { - parsedValue = true; - } else if (value.toLowerCase() === 'false') { - parsedValue = false; - } else if (!isNaN(value)) { - parsedValue = parseFloat(value); - } - - return [key, parsedValue]; -} - -function setGlobalOptions(entry) { - var key = entry[0]; - var value = entry[1]; - - if (Howler.hasOwnProperty(key)) { - Howler[key] = value; - } -} - -window.location.search - .slice(1) - .split('&') - .filter(function(entry) { return entry[0]; }) - .map(function(pair) { return pair.split('='); }) - .map(parseValueFromEntry) - .forEach(setGlobalOptions); - // Cache the label for later use. var label = document.getElementById('label'); var start = document.getElementById('start'); diff --git a/tests/js/core.webaudio.js b/tests/js/core.webaudio.js index 08d60910..4b673df4 100644 --- a/tests/js/core.webaudio.js +++ b/tests/js/core.webaudio.js @@ -1,33 +1,3 @@ -// Set global options from query params -function parseValueFromEntry(entry) { - var [key, value] = entry; - var parsedValue = value; - - if (value.toLowerCase() === 'true') { - parsedValue = true; - } else if (value.toLowerCase() === 'false') { - parsedValue = false; - } else if (!isNaN(value)) { - parsedValue = parseFloat(value); - } - - return [key, parsedValue]; -} - -function setGlobalOptions([key, value]) { - if (Howler.hasOwnProperty(key)) { - Howler[key] = value; - } -} - -window.location.search - .slice(1) - .split('&') - .filter(([key]) => key) - .map(pair => pair.split('=')) - .map(parseValueFromEntry) - .forEach(setGlobalOptions); - // Cache the label for later use. var label = document.getElementById('label'); var start = document.getElementById('start'); diff --git a/tests/js/parseGlobalOptions.js b/tests/js/parseGlobalOptions.js new file mode 100644 index 00000000..d799a939 --- /dev/null +++ b/tests/js/parseGlobalOptions.js @@ -0,0 +1,33 @@ +// Set global options from query params +function parseValueFromEntry(entry) { + var key = entry[0]; + var value = entry[1]; + var parsedValue = value; + + if (value.toLowerCase() === 'true') { + parsedValue = true; + } else if (value.toLowerCase() === 'false') { + parsedValue = false; + } else if (!isNaN(value)) { + parsedValue = parseFloat(value); + } + + return [key, parsedValue]; +} + +function setGlobalOptions(entry) { + var key = entry[0]; + var value = entry[1]; + + if (Howler.hasOwnProperty(key)) { + Howler[key] = value; + } +} + +window.location.search + .slice(1) + .split('&') + .filter(function(entry) { return entry[0]; }) + .map(function(pair) { return pair.split('='); }) + .map(parseValueFromEntry) + .forEach(setGlobalOptions); diff --git a/tests/js/spatial.js b/tests/js/spatial.js index db06b660..fa330d31 100644 --- a/tests/js/spatial.js +++ b/tests/js/spatial.js @@ -1,33 +1,3 @@ -// Set global options from query params -function parseValueFromEntry(entry) { - var [key, value] = entry; - var parsedValue = value; - - if (value.toLowerCase() === 'true') { - parsedValue = true; - } else if (value.toLowerCase() === 'false') { - parsedValue = false; - } else if (!isNaN(value)) { - parsedValue = parseFloat(value); - } - - return [key, parsedValue]; -} - -function setGlobalOptions([key, value]) { - if (Howler.hasOwnProperty(key)) { - Howler[key] = value; - } -} - -window.location.search - .slice(1) - .split('&') - .filter(([key]) => key) - .map(pair => pair.split('=')) - .map(parseValueFromEntry) - .forEach(setGlobalOptions); - // Cache the label for later use. var label = document.getElementById('label'); var start = document.getElementById('start'); diff --git a/tests/spatial.html b/tests/spatial.html index a9776d75..87011717 100644 --- a/tests/spatial.html +++ b/tests/spatial.html @@ -12,6 +12,7 @@ + - \ No newline at end of file + From bd4d5c141a87b78c6e4d3b7d5693e82e8a9e3139 Mon Sep 17 00:00:00 2001 From: jbgomez Date: Sun, 17 Apr 2022 14:46:33 -0700 Subject: [PATCH 08/14] Add code comment explaining need for conditional --- src/howler.core.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/howler.core.js b/src/howler.core.js index d1bf37e3..663797ac 100644 --- a/src/howler.core.js +++ b/src/howler.core.js @@ -918,6 +918,7 @@ } else { // Fire this when the sound is ready to play to begin HTML5 Audio playback. var playHtml5 = function() { + // When `eagerPlayback` is enabled, setting `currentTime` to the same value prevents the play promise from ever resolving if (node.currentTime !== seek) { node.currentTime = seek; } From 3e5c2c6b1b8ff05dadf57c3133576b3e38984c4f Mon Sep 17 00:00:00 2001 From: jbgomez Date: Sun, 17 Apr 2022 14:46:59 -0700 Subject: [PATCH 09/14] Fix punctuation in code comment --- src/howler.core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/howler.core.js b/src/howler.core.js index 663797ac..293a93d4 100644 --- a/src/howler.core.js +++ b/src/howler.core.js @@ -918,7 +918,7 @@ } else { // Fire this when the sound is ready to play to begin HTML5 Audio playback. var playHtml5 = function() { - // When `eagerPlayback` is enabled, setting `currentTime` to the same value prevents the play promise from ever resolving + // When `eagerPlayback` is enabled, setting `currentTime` to the same value prevents the play promise from ever resolving. if (node.currentTime !== seek) { node.currentTime = seek; } From 8c0c639c00798d6f9e64120ccfb271b6418c55a6 Mon Sep 17 00:00:00 2001 From: jbgomez Date: Sun, 17 Apr 2022 15:05:12 -0700 Subject: [PATCH 10/14] Remove ctx and masterGain global options from test page, update README --- README.md | 4 ++-- tests/index.html | 8 -------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 2b098964..2bb6c3b5 100644 --- a/README.md +++ b/README.md @@ -380,9 +380,9 @@ Each HTML5 Audio object must be unlocked individually, so we keep a global pool Automatically suspends the Web Audio AudioContext after 30 seconds of inactivity to decrease processing and energy usage. Automatically resumes upon new playback. Set this property to `false` to disable this behavior. #### eagerPlayback `Boolean` `false` When enabled, allows playback to begin before the browser has estimated that enough data has loaded in order to play the sound to its end, without having to stop and buffer for more content. -#### ctx `Boolean` *`Web Audio Only`* +#### ctx `AudioContext` `null` *`Web Audio Only`* Exposes the `AudioContext` with Web Audio API. -#### masterGain `Boolean` *`Web Audio Only`* +#### masterGain `GainNode` `null` *`Web Audio Only`* Exposes the master `GainNode` with Web Audio API. This can be useful for writing plugins or advanced usage. diff --git a/tests/index.html b/tests/index.html index f5d9b2f3..66c41782 100644 --- a/tests/index.html +++ b/tests/index.html @@ -33,14 +33,6 @@
Global Options:
-
- - -
-
- - -
From ad40ffc5f81ebbc13952d633393de8bf2c4d5357 Mon Sep 17 00:00:00 2001 From: jbgomez Date: Sun, 17 Apr 2022 15:07:03 -0700 Subject: [PATCH 11/14] Update global options width on test page --- tests/css/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/css/styles.css b/tests/css/styles.css index eda116c6..8be0928c 100644 --- a/tests/css/styles.css +++ b/tests/css/styles.css @@ -98,7 +98,7 @@ body { display: flex; flex-wrap: wrap; justify-content: center; - width: 100%; + width: 92%; margin: 0 2rem 3rem; } From 02d708703ee6f8de6690ee230875bbcd4c4451ba Mon Sep 17 00:00:00 2001 From: jbgomez Date: Sun, 17 Apr 2022 19:44:19 -0700 Subject: [PATCH 12/14] Make usingWebAudio true by default on test page --- tests/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/index.html b/tests/index.html index 66c41782..c030bc4b 100644 --- a/tests/index.html +++ b/tests/index.html @@ -10,7 +10,7 @@
Global Options:
- +
From 0448f11d1ca056ab689e296c829192c77834c117 Mon Sep 17 00:00:00 2001 From: jbgomez Date: Sun, 17 Apr 2022 19:55:47 -0700 Subject: [PATCH 13/14] Reconfigure global options layout on test page --- tests/css/styles.css | 22 +++++++++++++++++++--- tests/index.html | 12 ++++++------ 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/tests/css/styles.css b/tests/css/styles.css index 8be0928c..9e31c279 100644 --- a/tests/css/styles.css +++ b/tests/css/styles.css @@ -103,12 +103,28 @@ body { } .option { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-justify-content: space-between; + -webkit-box-pack: justify; + -ms-flex-pack: distribute; + justify-content: space-between; + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + margin: 0 2rem 1rem 0; font-size: 2vw; - margin-right: 3rem; } -label { - vertical-align: middle; +.option > * { + margin-bottom: 0; +} + +.option > label { + margin-right: 0.5rem; } @media screen and (max-height: 400px) { diff --git a/tests/index.html b/tests/index.html index c030bc4b..2a326011 100644 --- a/tests/index.html +++ b/tests/index.html @@ -10,28 +10,28 @@
Global Options:
+ -
+ -
+ -
+ -
+ -
+ -
From 013946ae0b5ea2eec9ae24c8749717880c5a4bce Mon Sep 17 00:00:00 2001 From: jbgomez Date: Mon, 18 Apr 2022 12:32:57 -0700 Subject: [PATCH 14/14] Update comment --- src/howler.core.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/howler.core.js b/src/howler.core.js index 293a93d4..442a39ca 100644 --- a/src/howler.core.js +++ b/src/howler.core.js @@ -918,7 +918,8 @@ } else { // Fire this when the sound is ready to play to begin HTML5 Audio playback. var playHtml5 = function() { - // When `eagerPlayback` is enabled, setting `currentTime` to the same value prevents the play promise from ever resolving. + // When `eagerPlayback` is enabled, setting `currentTime` to the same value prevents the + // play promise from ever resolving in Chromium-based browsers. if (node.currentTime !== seek) { node.currentTime = seek; }