New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 776011 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocked on:
issue 715049



Sign in to add a comment

setting media source during user gesture event removes permission to play

Reported by kevin.br...@sendtonews.com, Oct 18 2017

Issue description

Steps to reproduce the problem:
1. As the result of a user gesture, modify the source of a video player that has not been authorized to play, and register an event callback to play once canplay fires.
2. As the result of canplay event, play
3. get not authorized error

What is the expected behavior?
As the event chain was initiated by a user gesture, the play should be allowed.

What went wrong?
The play was not allowed, console emits a user gesture not allowed error.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 61.0.3163.98  Channel: stable
OS Version: 7.0.0
Flash Version: 

There should be a 'gestureLockReleased' property of some kind that can be queried by javascript to see if a media element has been authorized to play
 
chrome_autoplay_bug.html
1.4 KB View Download
Cc: msrchandra@chromium.org
Labels: Needs-triage-Mobile Triaged-Mobile Needs-Feedback
@kevin.brogan -- Thank You for the report.
Could you please provide us the device details and also screen cast of the issue which would help us to triage it further.
Thanks in Advance.
Device is LG G5 rs988. I don't have screencast software installed and am not intending to. The example file I included should be more than enough.
Project Member

Comment 3 by sheriffbot@chromium.org, Oct 23 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "msrchandra@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: -Blink>JavaScript Blink

Comment 5 by rbyers@chromium.org, Oct 26 2017

Cc: mustaq@chromium.org mlamouri@chromium.org
Components: -Blink Blink>Media

Comment 6 by mustaq@chromium.org, Oct 26 2017

Cc: -mlamouri@chromium.org
Owner: mlamouri@chromium.org
I couldn't repro in Chrome 62.0.3202.62 in Linux.

Is there any Android specific gesture handling during media playback?

Blockedon: 715049
This issue will be fixed by  bug 715049 . However, your problem will still exists on Safari iOS and other browsers.

The recommended way to resolve your problem is explained in this article: https://developers.google.com/web/updates/2017/06/play-request-was-interrupted

Hope this helps :)
The issue here is that the permission to play is being lost even though the play command is the result of a gesture. This is happening on the android version of chrome.

 bug 715049  is the copying of autoplay functionality to desktop, from android.

You're saying that copying a feature from android to desktop will fix the bug on the source platform, android. I don't see how that logically makes sense. If anything, you will copy the errant behavior onto desktop. Can you confirm what you meant?
According to your original issue, you do not call play on the user gesture:
"""
1. As the result of a user gesture, modify the source of a video player that has not been authorized to play, and register an event callback to play once canplay fires.
"""

What I read is that you set the `src` when the user gesture happens and you later, asynchronously call `play()`. The link I provided above should give you directions to help. The bug I linked will also make this behaviour work.
You are correct I call it asynchronously, however current expected behavior is that the permission to play carries through asynchronous events is it not? Or is is that the only asynchronous event allowed is the message event, through a post message call?

If it is intended that post message is the only way to carry the permission than can you consider this a feature request to align asyncrounous behevior across all linked events?

I can call the load function as stated in your linked blog post, and I've confirmed that this works, but it still leaves me rather stranded when forced to deal with 3rd party libraries that don't do this.
Status: Available (was: Unconfirmed)
`postMessage()` and `setTimeout()` will carry the gesture token. Not all async calls will. It's a bit of a mess and we are working on making things simpler on that side. We are also changing the autoplay policy to no longer rely on all this, thus the dependency. It should help with your problems, see https://blog.chromium.org/2017/09/unified-autoplay.html
Status: Fixed (was: Available)
This should be fixed in M66

Sign in to add a comment