Fenix: [Bug]Blocked media autoplay doesn't work properly

Created on 27 Sep 2019  ·  27Comments  ·  Source: mozilla-mobile/fenix

Steps to reproduce

  1. Navigate to: https://www.gq.com/story/manny-jacinto-favorite-cameras-clothes-fitness-gear
  2. Navigate down the page until you reach a featured video
  3. Check whether the video start playing or not

Expected behavior

Video autoplay should not start

Actual behavior

Video autoplay starts

Dependencies

Device information

  • Android device:
    • Google Pixel 3a (Android 9)
    • Huawei Mate 20 Lite (Android 8.1.0)
    • Samsung Galaxy S7 (Android 7)
    • OnePlus A3 (Android 6.0.1)
    • LG Nexus 4 (Android 5.1.1)

  • Fenix version: Nightly Build #12700627 from 27/9

Notes

Somehow similar with #5634
► Video
20190927_142817

Media P1 S2 ac 🐞 bug

All 27 comments

Same behavior on 9gag.com or imgur.com gifs, songs from soundcloud, bmw.com (homepage or child pages), etc.

Just to rub it in, this is the site I've been using to test and their video ads autoplay every time. Does media.autoplay.allow-muted have no effect in GV? Tested on \"Nightly 190926 18:01\" (Those escaped quotes probably shouldn't appear in your Google Play listing!)

https://lifehacker.com/how-to-block-auto-play-videos-using-firefox-1833493848

@cpeterso is this a known issue in GV or does it seem like a Fenix problem?

@cpeterso is this a known issue in GV or does it seem like a Fenix problem?

This is probably a Gecko or GV bug. The GV team will investigate. Colin says desktop Firefox correctly blocks autoplay on the same site, suggesting this is a mobile-specific bug.

I was able to get Autoplay to stop by setting media.autoplay.default to 5 in about:config. (do this and refresh the autoplaying page, it should no longer autoplay). But this setting doesn't stick; after fenix is forced closed or removed from recent apps it resets to 1. According to the Firefox desktop 5 is block audio and video while 1 only blocks audio.

@vesta0 are you able to sync up with @cpeterso on the priority of this bug so we can eventually get this feature flag removed? :)

Done!

While this works as expected in Gecko, @vesta0 is this an API we want on GeckoView specifically so that mobile can turn it on/off for things like battery and data saving?

This video was muted and Gecko allows muted videos to autoplay. So autoplaying this muted video is not a bug.

@vesta0 - Is Fenix's "Site permissions > Autoplay > Video and audio blocked" setting intended to block autoplay of both muted and unmuted videos (differing from desktop Gecko's autoplay policy)?

Blocking all video autoplay by default might be desirable on mobile because of bandwidth and battery consumption. Maybe the UI needs separate options for muted and unmuted video autoplay? Or options for autoplay only on Wi-Fi? We need a decision from PM and UX here.

https://bugzilla.mozilla.org/show_bug.cgi?id=1585045#c3

@cpeterso thanks for describing the current behaviour, and yes we want the recommended option to be block both video and audio autoplay, see #5163

A clarification after I chatted with Vesta: Fenix wants to block autoplay of both muted and unmuted videos. Fenix wants to prevent autoplay of those annoying floating videos on news websites (because they are annoying and waste bandwidth and battery).

The GV bug to extend GV's autoplay API to support blocking of muted video is https://bugzilla.mozilla.org/show_bug.cgi?id=1577596.

Though the GV API is not ready, you can test this blocking behavior in Fenix Nightly now by manually setting GeckoView's media.autoplay.default about:config pref to level 5 (BLOCK_ALL).

GV issue resolved on 19th December

@pocmo looks like the GV issue was resolved, does this look ready for A-C to pick up?

This landed in AC, so this will get fixed when we pick up a new AC version. However, need to decide if this should go into 4.0, which would require a new AC dot release.

Talked to @pocmo and we just cut a new AC release, and will recut a new Fenix for release from master.

@liuche should we give some time to test this on nightly, first?

Talked to Arturo, and we can put this in 4.0 and FennecBeta, because it seems like an acceptable "beta" state for a feature (and don't think it will cause serious regressions like crashes).

This change has landed in AC, so it should show up in the next snapshot.

Hi, still reproducible on the latest Nightly Build #20570604 from 02/26 using the following devices:
• Google Pixel 3a (Android 9)
• Huawei Mate 20 Lite (Android 8.1.0)
• Samsung Galaxy S7 (Android 7)
• OnePlus A3 (Android 6.0.1)

I've used the following websites:
https://codepen.io/ksy36/pen/abzEaEb
https://www.gq.com/story/manny-jacinto-favorite-cameras-clothes-fitness-gear
https://googlechrome.github.io/samples/muted-autoplay/
https://lifehacker.com/how-to-block-auto-play-videos-using-firefox-1833493848

Odd behavior on gq.com,namely, when you visit the 1st time the video is blocked, if you refresh the page, or re-open it the autoplay kicks in.

► Video
20200226-165531

I'll remove the QA needed label until further notice.

Holding off until we hear back on https://github.com/mozilla-mobile/fenix/issues/8503#issuecomment-591689367

This issue is still marked needs:gv despite all associated Bugzilla bugs marked resolved. Is any further platform work needed for this, or can we remove the GeckoView dependency?

Hi, still reproducible on the latest Nightly Build #20570604 from 02/26 using the following devices:
• Google Pixel 3a (Android 9)
• Huawei Mate 20 Lite (Android 8.1.0)
• Samsung Galaxy S7 (Android 7)
• OnePlus A3 (Android 6.0.1)

I've used the following websites:
codepen.io/ksy36/pen/abzEaEb
gq.com/story/manny-jacinto-favorite-cameras-clothes-fitness-gear
googlechrome.github.io/samples/muted-autoplay
lifehacker.com/how-to-block-auto-play-videos-using-firefox-1833493848

Odd behavior on gq.com,namely, when you visit the 1st time the video is blocked, if you refresh the page, or re-open it the autoplay kicks in.

► Video
20200226-165531

I'll remove the QA needed label until further notice.

Testing on these sites, it seems like blocking autoplay is working on them now. 🤔 Could we retest?

Hi @ekager , I've re-checked this matter on the latest Nightly Build 200511 from 5/11 using the following devices:
• Google Pixel 3a (Android 10)
• Huawei Mate 20 Lite (Android 9)
• OnePlus A3 (Android 6.0.1)

✔️ codepen.io/ksy36/pen/abzEaEb
✔️ gq.com/story/manny-jacinto-favorite-cameras-clothes-fitness-gear
✔️ googlechrome.github.io/samples/muted-autoplay
❓ lifehacker.com/how-to-block-auto-play-videos-using-firefox-1833493848

After visiting lifehacker.com for the first time and accepting the Cookie policy the video seems to autoplay.
If you re-open the website the video doesn't autoplay.
► Video
20200511-150029
On the other hand, in some cases, each time you open lifehacker.com the Cookie policy banner gets displayed over and over again, even if you previously accepted the terms. (happens on Chrome as well)
When this happens, the video will always autoplay.

If you navigate to the website and don't accept the cookie policy the video doesn't start to autoplay.
► Video
20200511-151314

Please review and let me know how should we proceed. ☺️

Since most of these sites are working now, and the remaining site also doesn't work with Chrome, it might be a site compat issue for this remaining site, so we will close this issue as fixed. Thank you for the testing and the details!

Videos are still auto-playing on Reddit mobile website even when the videos auto-play is set to off

Was this page helpful?
0 / 5 - 0 ratings