Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

[Bug]Blocked media autoplay doesn't work properly #5636

Closed
2 tasks done
AndiAJ opened this issue Sep 27, 2019 · 27 comments
Closed
2 tasks done

[Bug]Blocked media autoplay doesn't work properly #5636

AndiAJ opened this issue Sep 27, 2019 · 27 comments
Labels
🐞 bug Crashes, Something isn't working, .. Feature:Media needs:ac Needs Android Component Work P1 Current sprint S2 Major Functionality/product severely impaired and a satisfactory workaround doesn't exist

Comments

@AndiAJ
Copy link
Collaborator

AndiAJ commented Sep 27, 2019

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

┆Issue is synchronized with this Jira Task

@AndiAJ AndiAJ added 🐞 bug Crashes, Something isn't working, .. S2 Major Functionality/product severely impaired and a satisfactory workaround doesn't exist Feature:Media labels Sep 27, 2019
@sv-ohorvath
Copy link
Contributor

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

@hackel
Copy link

hackel commented Sep 30, 2019

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

@sblatz
Copy link
Contributor

sblatz commented Sep 30, 2019

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

@sblatz
Copy link
Contributor

sblatz commented Sep 30, 2019

@cpeterso
Copy link

@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.

@neekless
Copy link
Contributor

neekless commented Oct 1, 2019

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.

@sblatz
Copy link
Contributor

sblatz commented Oct 1, 2019

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

@vesta0 vesta0 added P1 Current sprint 🙅 waiting Issues that are blocked or has dependencies that are not ready labels Oct 1, 2019
@vesta0
Copy link
Collaborator

vesta0 commented Oct 1, 2019

Done!

@liuche liuche added the needs:gv GeckoView bug required to fix the issue. See bugzilla.mozilla.org label Oct 5, 2019
@boek boek added needs:ac Needs Android Component Work and removed needs:gv GeckoView bug required to fix the issue. See bugzilla.mozilla.org labels Oct 16, 2019
@jonalmeida jonalmeida added the needs:gv GeckoView bug required to fix the issue. See bugzilla.mozilla.org label Oct 21, 2019
@jonalmeida
Copy link
Contributor

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?

@cpeterso
Copy link

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

@vesta0
Copy link
Collaborator

vesta0 commented Nov 4, 2019

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

@fluffyemily
Copy link

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?

@ekager ekager removed needs:gecko Issues that depend on Gecko but are not GV API changes needs:gv GeckoView bug required to fix the issue. See bugzilla.mozilla.org labels Apr 30, 2020
@ekager ekager added the eng:qa:needed QA Needed label May 8, 2020
@ekager
Copy link
Contributor

ekager commented May 8, 2020

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?

@AndiAJ
Copy link
Collaborator Author

AndiAJ commented May 11, 2020

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. ☺️

@AndiAJ AndiAJ removed the eng:qa:needed QA Needed label May 11, 2020
ekager added a commit to ekager/fenix that referenced this issue Jun 23, 2020
ekager added a commit to ekager/fenix that referenced this issue Jun 23, 2020
ekager added a commit that referenced this issue Jun 23, 2020
@liuche liuche mentioned this issue Jun 27, 2020
12 tasks
@liuche
Copy link
Contributor

liuche commented Jul 2, 2020

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!

@liuche liuche closed this as completed Jul 2, 2020
@ghost
Copy link

ghost commented Jul 16, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Crashes, Something isn't working, .. Feature:Media needs:ac Needs Android Component Work P1 Current sprint S2 Major Functionality/product severely impaired and a satisfactory workaround doesn't exist
Projects
None yet
Development

No branches or pull requests