Video.js: Chrome on Android logs error about preventDefault inside passive event listener when scrubbing

Created on 6 Oct 2017  路  5Comments  路  Source: videojs/video.js

Description

Chrome on Android logs the following error in the browser console when the user starts scrubbing: "Unable to preventDefault inside passive event listener invocation."

JSBin (In case JSBin is unavailable: simply set up a starter template and use the latest version of video.js)

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.
1. Do one of these:
* Open a page with video.js in Chrome or Android. Start a remote debugger from Chrome on desktop.
* Open a page with video.js in Chrome on desktop. Open the Chrome DevTools and use the device toolbar to emulate an Android phone (e.g. Galaxy S5).
2. Click play
3. Scrub a couple of time on the seekbar

Results

Expected

No errors are logged to the browser console.

Actual

The browser console shows multiple errors with the message: "Unable to preventDefault inside passive event listener invocation."

Error output

Unable to preventDefault inside passive event listener invocation.
event.preventDefault @ video.js:22647
handleMouseDown @ video.js:13249
handleMouseDown @ video.js:4436
bound @ video.js:23004
data.dispatcher @ video.js:22790

Additional Information

It appears that Slider.handleMouseDown is registered as a passive event listener for touchstart, but still calls event.preventDefault().

Fortunately, this doesn't break the player: Chrome simply logs an error but continues executing the rest of the code. It would be nice if video.js could avoid logging these errors though. 馃槃

versions

videojs

  • 5.20.2
  • 6.2.4

    browsers

  • Chrome 61 on Android

  • Chrome 61 on desktop (when emulating Android)

    OSes

  • Android

    plugins

None

Most helpful comment

STILL EXISTS in "video.js": "^7.6.0",

video.es.js:1707 Unable to preventDefault inside passive event listener invocation.
event.preventDefault @ video.es.js:1707
handleMouseDown @ video.es.js:12222
handleMouseDown @ video.es.js:13085
bound @ video.es.js:2221
data.dispatcher @ video.es.js:1845
video.es.js:1711 Unable to preventDefault inside passive event listener invocation.

All 5 comments

i have the same problem on mobile with videojs 6.2.1.
error :The play() request was interrupted by a call to pause() doesn't show on #4319 .There is only one error last Unable to preventDefault inside passive event listener invocation.

if it's done , please mark me. Thanks.

I can confirm this behaviour in the Chrome Developer Tools - Responsive Mode.
It doesn't seem to break the player, but it quickly fills the console with the following 2 error messages:
The play() request was interrupted by a call to pause()
Unable to preventDefault inside passive event listener invocation.

Same problem here.

Same, version 6.8.0. This needs to be fixed!

STILL EXISTS in "video.js": "^7.6.0",

video.es.js:1707 Unable to preventDefault inside passive event listener invocation.
event.preventDefault @ video.es.js:1707
handleMouseDown @ video.es.js:12222
handleMouseDown @ video.es.js:13085
bound @ video.es.js:2221
data.dispatcher @ video.es.js:1845
video.es.js:1711 Unable to preventDefault inside passive event listener invocation.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

borm picture borm  路  3Comments

0xsven picture 0xsven  路  3Comments

kitsunde picture kitsunde  路  4Comments

kocoten1992 picture kocoten1992  路  4Comments

uikoo9 picture uikoo9  路  4Comments