diff --git a/core/workspace_audio.js b/core/workspace_audio.js index 7a6acde4f..11f16b8b1 100644 --- a/core/workspace_audio.js +++ b/core/workspace_audio.js @@ -28,7 +28,6 @@ const userAgent = goog.require('Blockly.utils.userAgent'); * @constructor */ const WorkspaceAudio = function(parentWorkspace) { - /** * The parent of the workspace this object belongs to, or null. May be * checked for sounds that this object can't find. @@ -105,9 +104,10 @@ WorkspaceAudio.prototype.preload = function() { const playPromise = sound.play(); // Edge does not return a promise, so we need to check. if (playPromise !== undefined) { - // If we don't wait for the play request to complete before calling pause() - // we will get an exception: (DOMException: The play() request was interrupted) - // See more: https://developers.google.com/web/updates/2017/06/play-request-was-interrupted + // If we don't wait for the play request to complete before calling + // pause() we will get an exception: (DOMException: The play() request was + // interrupted) See more: + // https://developers.google.com/web/updates/2017/06/play-request-was-interrupted playPromise.then(sound.pause).catch(function() { // Play without user interaction was prevented. });