Promises are not considered part of user-interaction, breaking Twitch embedded replay button.
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Tracking
()
Webcompat Priority | P3 |
Tracking | Status | |
---|---|---|
firefox63 | --- | affected |
People
(Reporter: twisniewski, Unassigned)
References
(Depends on 1 open bug)
Details
(Whiteboard: [webcompat:p3])
In bug 1469200, I found that Twitch's embedded player is calling a video's play() function not directly as part of the `click` event, but in a promise that is made while handling the click event: >key: 'play', >value: function () { > var e = this; > return this._srcReady.then(function () { > return new Promise(function (t) { > if (e._video.readyState >= 3) > t(e._video.play()); > else { > var n = function n() { > e._video.removeEventListener(o.c, n), > t(e._video.play()) > }; > e._video.addEventListener(o.c, n) > } > }) > }).catch (function (t) { > 'NotAllowedError' === t.name && (e._video.dispatchEvent(new CustomEvent(o.m)), e._video.dispatchEvent(new CustomEvent(o.k))) > }) >} Chrome allows the play promise to resolve, Firefox does not (it never resolves or rejects it). If I do not wait for the _srcReady or other promises, then it plays fine in Firefox (but is missing Twitch's error-handling): >key: 'play', >value: function () { > var e = this; > return e._video.play(); >} This makes me suspect that we should carry over permission to call play through into promise callbacks (and possibly requestAnimationFrame as well).
Comment 1•6 years ago
|
||
(Promises have nothing to do with event handling)
Updated•6 years ago
|
Updated•6 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Comment 2•5 years ago
|
||
See bug 1547409. Migrating webcompat priority whiteboard tags to project flags.
Comment 3•5 years ago
|
||
Tom, can we re-test to see if these reproduces?
Comment 4•5 years ago
|
||
(In reply to Mike Taylor [:miketaylr] from comment #3)
Tom, can we re-test to see if these reproduces?
Just tested it - still reproducible.
Reporter | ||
Comment 5•5 years ago
|
||
Confirmed, the test case in https://bugzilla.mozilla.org/show_bug.cgi?id=1469200#c3 still reproduces.
Comment 6•5 years ago
•
|
||
(In reply to Thomas Wisniewski [:twisniewski] from comment #5)
Confirmed, the test case in https://bugzilla.mozilla.org/show_bug.cgi?id=1469200#c3 still reproduces.
https://bugzilla.mozilla.org/show_bug.cgi?id=1469200#c12 pointed out that this looks the website issue.
Should we just close this as duplicate of bug 1469200?
Updated•5 years ago
|
Reporter | ||
Comment 7•5 years ago
|
||
Yes, based on that we might we well just close this as a dupe, thanks.
Description
•