Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with async play() in Chrome #3474

Closed
diestrin opened this issue Jul 28, 2016 · 14 comments
Closed

Issue with async play() in Chrome #3474

diestrin opened this issue Jul 28, 2016 · 14 comments

Comments

@diestrin
Copy link

Description

Chrome recently changed the play() method to return a promise, and this is causing issue when you call load() or pause() before the promise is resolved:
Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause()
Uncaught (in promise) DOMException: The play() request was interrupted by a call to load()

Steps to reproduce

  1. Use Chrome
  2. Go to http://videojs.com/advanced/ and open the web console
  3. Play the video and click in the timeline in a place where the video isn't buffered yet (try using a network throttling if the video is loading too fast)
  4. Move the timeline again to a place where the video isn't buffered yet (The issue will start after the second time you do this)

-- or --

  1. Go to http://videojs.com/advanced/ and open the web console
  2. Play any video
  3. Quickly play another video before the 1st start to reproduce
  4. You can do step 3 as many times as you want quickly and you'll see a lot of errors in the console

Results

En error is logged, but the video is still working

Expected

Wait for the play() promise to be resolved before calling another method

Actual

The play is expected to be sync and thus pause() and load() are being callede inmediatelly

Error output

Case 1: Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause()
Case 2: Uncaught (in promise) DOMException: The play() request was interrupted by a call to load()

Additional Information

Bug report in chrome: https://bugs.chromium.org/p/chromium/issues/detail?id=593273

versions

videojs

5.10.7 and 5.11.0

browsers

Chrome 51.0.2704.103 (not only this version)

OSes

OSx 10.10.5 (not only this OS)

plugins

No

@ghost
Copy link

ghost commented Jul 29, 2016

Thank you Austin for the call this morning, and got a better understanding
on the product. I m looking forward to hear back from your team.

Have a great weekend!
Kenneth

On Thursday, July 28, 2016, Diego Barahona notifications@github.com wrote:

Description

Chrome recently changed the play() method to return a promise, and this is
causing issue when you call load() or pause() before the promise is
resolved:
Uncaught (in promise) DOMException: The play() request was interrupted by
a call to pause()

Uncaught (in promise) DOMException: The play() request was interrupted by
a call to load()

Steps to reproduce

  1. Use Chrome
  2. Go to http://videojs.com/advanced/ and open the web console
  3. Play the video and click in the timeline in a place where the video
    isn't buffered yet (try using a network throttling if the video is loading
    too fast)
  4. Move the timeline again to a place where the video isn't buffered
    yet (The issue will start after the second time you do this)

-- or --

  1. Go to http://videojs.com/advanced/ and open the web console
  2. Play any video
  3. Quickly play another video before the 1st start to reproduce
  4. You can do step 3 as many times as you want quickly and you'll see
    a lot of errors in the console

Results

En error is logged, but the video is still working
Expected

Wait for the play() promise to be resolved before calling another method
Actual

The play is expected to be sync and thus pause() and load() are being
callede inmediatelly
Error output

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

Case 2: Uncaught (in promise) DOMException: The play() request was
interrupted by a call to load()

Additional Information

Bug report in chrome:
https://bugs.chromium.org/p/chromium/issues/detail?id=593273
versions videojs

5.10.7 and 5.11.0
browsers

Chrome 51.0.2704.103 (not only this version)
OSes

OSx 10.10.5 (not only this OS)
plugins

No


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#3474, or mute the thread
https://github.com/notifications/unsubscribe-auth/AHzjRYGZ5-8dlgkNPV9knjfwSj37H9pNks5qaOH-gaJpZM4JXbpw
.

@gkatsev
Copy link
Member

gkatsev commented Aug 15, 2016

This will be fixed by #3518

@misteroneill
Copy link
Member

This should be fixed in 5.11.3

@antonioribeiro
Copy link

I'm doing

videojs.seek(seekTo).pause();

And receiving this

image

On

* Video.js 5.13.2 <http://videojs.com/>

Removing the pause fixes warning, but, of course, video start playing. Is this something I'm doing wrong?

@beaufortfrancois
Copy link
Contributor

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.

@thijstriemstra
Copy link
Contributor

thijstriemstra commented Jun 16, 2017

Just ran into this issue with 6.2.0 and some plugin code, thanks for the article @beaufortfrancois.

@shikkaba
Copy link

shikkaba commented Oct 24, 2017

Still seeing this in 6.2.4. Is it still happening in 6.2.8?
Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause(). https://goo.gl/LdLk22 Promise (async) Html5.(anonymous function) @ video.js:19678 techGet_ @ video.js:21398 play @ video.js:21440 handleClick @ video.js:11752 bound @ video.js:2232 data.dispatcher @ video.js:1867

@benweidig
Copy link

Still seeing this in 6.4.0 if I seek a second time while player is still loading video for the first seek.

Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause().
Promise (async)
Html5.(anonymous function) @ video.js:19703
techGet_ @ video.js:21423
play @ video.js:21465
handleMouseUp @ video.js:13946
bound @ video.js:2232
data.dispatcher @ video.js:1867

@gkatsev
Copy link
Member

gkatsev commented Dec 4, 2017

Unless you're seeing issues with playback, you can safely ignore this error.

@GeyseR
Copy link

GeyseR commented Jan 28, 2018

I was able to reproduce the issue on videojs.com site. This is how it looks when user has relatively slow internet connection speed: play-pause-bug-on-videojs-com.zip
Hope this helps.

@H1D
Copy link
Contributor

H1D commented Jun 1, 2018

version 7.0.0-alpha.1 the issue is still here

@chuchuva
Copy link
Contributor

I confirm that it's still an issue in version 7.8.4

@gkatsev
Copy link
Member

gkatsev commented Aug 27, 2020

@chuchuva Can you please provide more information about where you're seeing the issue and detailed steps to reproduce?

@chuchuva
Copy link
Contributor

chuchuva commented Sep 1, 2020

@gkatsev I saw it in the logs. I can't reproduce it, sorry. 😞

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests