Closed Bug 1649358 Opened 5 years ago Closed 5 years ago

Firefox won't block autoplaying video on Business Insider

Categories

(Core :: Audio/Video: Playback, defect, P3)

77 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla80
Tracking Status
firefox80 --- verified

People

(Reporter: erwinm, Assigned: alwu)

Details

Attachments

(4 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:77.0) Gecko/20100101 Firefox/77.0

Steps to reproduce:

Basic safety settings as discussed here:

https://bugzilla.mozilla.org/show_bug.cgi?id=1634453

media.autoplay.blocking_policy 1

media.autoplay.default 5

media.autoplay.enabled.user-gestures-needed false

media.block-autoplay-until-in-foreground false

Visit https://www.businessinsider.com/trump-near-sadistic-phone-calls-female-world-leaders-merkel-may-2020-6

Page down.

Actual results:

A video autoplays.

Expected results:

Video should not autoplay, it's obnoxious and can be unsafe.

The autoplay controls in about:preferences should be clear and should allow users to block all autoplay.

Related bug 1635281

Note that the Google Docs explanation is a Google Doc, so it converts Page Down to animated smooth scrolling, so it isn't accessible for users with visual motion sensitivities, who may need to block autoplay.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

Hi, I'm not able to reproduce this on all versions of Firefox.

Did you activate the page by mouse clicking or keyborad pressing before the media starts playing? Because our default autoplay policy would only block media before the page gets activated by user gestures. You can check more details in [1].

In addition, I noticed that you were using media.autoplay.blocking_policy=1, which would also get affected by the timer thershold, you can set up the value of the timer by adjust the pref dom.user_activation.transient.timeout. Or use media.autoplay.blocking_policy=2 to see if it works for you.

Please check the document, or here is a PDF version [2], for more details.

[1] https://bit.ly/3dNl6LY
[2] PDF version https://drive.google.com/file/d/1Lkk37Vq8YhURxPL7UBVy0CuuZJU62PYQ/view?usp=sharing


I'm going to close this bug because I guess the autoplay was allowed because a user has activated the page, so that is not a bug.
If you still have any question, free feel to set NI on me.
Thank you.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME

"Did you activate the page by mouse clicking or keyboard pressing before the media starts playing? Because our default autoplay policy would only block media before the page gets activated by user gestures. You can check more details in [1]."

If I open the page and page down, the video autoplays.

If I open the page and scroll down, the video autoplays.

If these are enough to set off autoplay, then the safety settings to block autoplay are not enough to protect users from autoplay.

The link to [1] leads to a Google Doc. Is there an accessible version?

P.S. Managed to download.

P.S. Setting it to media.autoplay.blocking_policy 2 does not work either.

Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---

Hi, sorry, there is a PDF version [1].
Does this issue occur on a fresh profile, or private browsing window? Could you reproduce it on Nightly?
Could you help me use MOZ_LOG=Autoplay:5 to capture the log and update it to bugzilla?
Thank you.

[1] https://drive.google.com/file/d/1Lkk37Vq8YhURxPL7UBVy0CuuZJU62PYQ/view
[2] https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/HTTP_logging

Flags: needinfo?(erwinm)

With just the barest safety fixes-- ui.caretBlinkTime 0, autoplay block audio and video, autoscroll off, smooth scroll off-- autoplay block audio and video fails to block the video in Nightly.

I'm not sure how to test a fresh regular profile without risking the safety settings in my current profile.

As it is, I've got an awful migraine from trying to set up safety settings, and from testing this.

Flags: needinfo?(erwinm)
Attached file Log from Nightly

Thank you for your logging, now I know what the problem is, will have a patch to fix that.

Assignee: nobody → alwu
Severity: -- → S3
Priority: -- → P3

Hmm, no, sorry I was wrong. From your log in comment9, it shows that the site has a speicalize autoplay setting which is "Block Audio", so inaudible media is allowed to play on that site.

The site permission setting can override the default autoplay setting. Therefore, if you want to block inaudible media on that site, you should change that setting setting to "Block Audio and Video" [1].

[1] go to about:preferences#privacy -> Autoplay (press "setting button") -> modify site's permission

Flags: needinfo?(erwinm)

But I don't have any site-specific exceptions there.

If sites can override user safety settings without user permission, that is a problem.

Flags: needinfo?(erwinm)

(In reply to MarjaE from comment #12)

If sites can override user safety settings without user permission, that is a problem.

I don't think so, maybe we incorrectly access a wrong value of permission. It might be related with the change in bug1597450.
BTW, have you tried to reproduce this issue on a private browsing window yet?
In addition, could you provide the information from the about:support page?
Thank you.

Flags: needinfo?(erwinm)

Ah, I found that I can reproduce this issue now.

Flags: needinfo?(erwinm)

However, even if I can reproduce this issue via checking the log directly. On the website [1], I still can't see any video playing. There is a video under the NOW WATCH:..... section looking like playing, but it actually didn't. I don't know about the detail, but I guess the website is changing poster images automatically which makes it look like playing.

[1] https://www.businessinsider.com/trump-near-sadistic-phone-calls-female-world-leaders-merkel-may-2020-6

Hi, Smaug,

When debugging this issue, I encouter a situation where autoplay media element doesn't have any inner window. The window I got from [1] would be null, do you know how does that happen? Why media element can exist without an inner window? Am I able to simulate that situation in the mochitest?

Thank you.

[1] https://searchfox.org/mozilla-central/rev/91d82d7cbf05a71954dfa49d0e43824c7c973e62/dom/media/AutoplayPolicy.cpp#223

Flags: needinfo?(bugs)

It's still playing when I check that page. It's animated pain not strobing pain.

Could you give me a screenshot to show me what media was playing automatically?
Thank you.

Flags: needinfo?(erwinm)
Flags: needinfo?(erwinm)

That is exactly what I mentioned. That's not media playback, the website uses their own custom player, and it changes poster images by themselves, which doesn't trigger the media playback. The media element still keeps paused.

We can have different autoplay permission setting for specific sites, and those setting can override the global autoplay setting.

Eg. Global permission setting is Block Audio & Video but site A is being set to Block Audio Only, then when inaudible video wants to start on siteA, it would be allowed to autoplay.

Returning DENY_ACTION is like specifically modify the site permission setting, but in those cases, we should return UNKNOWN_ACTION because we are actually not able to check the site permission.

But those aren't poster images (which can be bad enough if they slide out or flash) that's a moving video with some stutter.

That is because a website is doing something strange to mimic the media playback, but that is actually not a real media playback. I don't know why they did that.

They're using jwplayer. Which also supports advertisers. Which probably explains why it's designed to override basic user safety and accessibility settings.

Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/26243db0c5dd return `UNKNOWN_ACTION` when fail to get autoplay permission r=bryce
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80

I don't understand how tweaking global vs. site-specific permissions would affect this. I hadn't set any site-specific permissions to let Business Insider punch me. I thought perhaps that the site was overriding user permissions, but it seems to work around them using jwplayer.

If an element is moved to a data document (or created there initially), that document doesn't have inner window.
Or if the window has been closed, the relevant document may not have inner window anymore.

Flags: needinfo?(bugs)
Flags: qe-verify+

Tried to verify with 77.0, but while there was no autoplay the mentioned fake playback wasn't noticed either.
To verify changes, got 80.0 and checked on Windows 10, macOS 11.0 and did not see anything auto-starting with the mentioned settings. The site's gimmicky fake-play works at this point.
In regards to this, marking the bug as verified since it seems to work.

My 2 cents; that the behaviour is ment to catch the attention of the visitor; thus clicking to "pause" the playback and forcing a view.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: