Bug 1593843 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Fork from bug1577596 comment23, this is a workaround to allow Gecko to requery the autoplay permission from the embedding app without having too many times of IPC communication.

The workaround is "when we create media element and we are 100% sure it can't be allowed to autoplay by checking its property (ex. is element audible) and document activation first, then we notify GV and make the embedding app to decide the final decision".
We are going to send a play permission on GeckoView when media starts playing, which is used to let the embedding app (ex. Fenix) to decide if the audible/inaudible media can be allowed to play in that page.

One page could have at most one audible request and one inaudible request per living, once the request has been responded by the embedding app (ex. Fenix), then the result of the request would continuously be effective until the page is closed or being navigated to another page. Once we leave the previous page, we would drop those reqeust, which is equal to a denial.

For media, if we're waiting for the result of the request, that is an async process, so the media would be postponed to start playing until the we get the result of request. However, if we have already got the result before, we would use the previous result and would not send a request again. In addition, if the blocking autoplay model has allowed the page to play (ex. the page has been activated or the play is trigged by user input), then we would also allow media to start without sending a request.

Back to Bug 1593843 Comment 0