question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The play() request was interrupted by a call to pause()

See original GitHub issue

Hi,

Sometimes, I’ve got this error when I load the page :

undefined:1 Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause().

It’s happens randomly and when the message is displayed in console : I can’t edit dropdown list and text area.

Here is my call code and it happens just after :

        console.log('INJECT BLOCKLY')
        @blockly = Blockly.inject('blocklyDiv', {
            toolbox: @opts.toolbox
            zoom:
                controls: true,
                wheel: false,
                startScale: 0.7,
                maxScale: 3,
                minScale: 0.3,
                scaleSpeed: 1.2
            grid:
                spacing: 25
                length: 3
                colour: '#ddd'
                snap: true
        })

I’ve tried to delay inject with a setTimeout, but it doesn’t change anything.

For information, I use “page.js” for this UI.

Thanks by advance if you’ve a solution.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:22 (12 by maintainers)

github_iconTop GitHub Comments

4reactions
hugoruscitticommented, Sep 20, 2016

Is valid to simply disable sound preload ? i make this change to my code and everything seems to be ok:

Blockly.WorkspaceSvg.prototype.preloadAudio_ = function() {};
3reactions
beaufortfrancoiscommented, Jun 16, 2017

For info, I’ve just published an article about this exact issue at https://developers.google.com/web/updates/2017/06/play-request-was-interrupted that tells you exactly what is happening and how to fix it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to prevent "The play() request was interrupted by a call to ...
The simple fix for this is to just not call play or pause right after each other. Use the media events instead to...
Read more >
DOMException - The play() request was interrupted
Note: Calling video.pause() isn't the only way to interrupt a video. You can entirely reset the video playback state, including the buffer, with ......
Read more >
Uncaught (in promise) DOMException: The play() request was ...
on Chrome the error displayed in the console is : “Uncaught (in promise) DOMException: The play() request was interrupted by a call to...
Read more >
The play() request was interrupted by a call to pause()
We are facing the DomException while playing all audio immediately one by one. Error: The play() request was interrupted by a call to...
Read more >
Uncaught (in promise) DOMException: The play() request was ...
I still get the error "Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause().
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found