Open Bug 1897707 Opened 2 years ago Updated 1 year ago

video autoplay blocked randomly via wrongful NotAllowedError

Categories

(Core :: Audio/Video, defect)

Firefox 126
All
Android
defect

Tracking

()

UNCONFIRMED

People

(Reporter: git, Unassigned, NeedInfo)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0

Steps to reproduce:

Firefox on Android 14 exhibits really strange behavior around autoplaying video, where it blocks autoplay. This happens from time to time across multiple internet pages and recently on this page that I work on: https://okuno.osaka
Here is also a link with https://github.com/liriliri/eruda active to allow for mobile debugging: https://okuno.osaka/?eruda=true

Attached video in chronological order:
0:00 Showing of current version and build
0:05 Showing how bug still occurs in most permissive autoplay user settings
0:13 Multiple page reloads, of which only few result in the exception being thrown
0:17 Exception thrown, autoplay bloacked
0:20 Usage of eruda to open mobile console and show exception
0:30 Removal of banner from DOM to show Play button being displayed, even though controls is not set in the video tag and playing cannot be started
0:48 New reloads autoplay correctly
0:52 after 2 reloads, the 3rd one again blocks autoplay

This doesn't happen always, but when constantly reloading, it happens once in 5 reloads.

It only happens on Firefox Android.

The autoplaying video fits all the required criteria to be autoplayed: Muted set to true: (It doesn't even have an audio track) and no other autoplay blocking settings active. Infact, "Allow audio and video" is specifically set to true!

Both javascript video.play() and the video tag <video autoplay playsinline loop muted> are ignored and throw errors.

DOMException {name: "NotAllowedError", message: "The play method is not allowed by the user agent or the platform in the current context, possibly because the user denied permission" ... }

I suspect the video being loaded very very early in the DOM having something to do with it.
I took a video of the bug and attached it as a file.

Actual results:

Autoplaying videos sometimes throw erroneous "NotAllowedError",.

Expected results:

Video should not fail autoplaying once every ~10 or so reloads.

*accidentally clicked include user-agent even though I posted from a PC, please ignore that piece of information.

Can reproduce it with the given site and saw the same error log. Could the media team take a look on why this is happening?

DOMException {name: "NotAllowedError", message: "The play method is not allowed by the user agent or the platform in the current context, possibly because the user denied permission" ... }
Component: Media → Audio/Video
Product: Fenix → Core

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jmathies)
Flags: needinfo?(jmathies) → needinfo?(alwu)
No longer blocks: media-triage
Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: