Closed Bug 1478549 Opened 6 years ago Closed 6 years ago

Block autoplay can't be toggled on/off on Android

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(firefox61 unaffected, firefox62 unaffected, firefox63 verified)

VERIFIED FIXED
Firefox 63
Tracking Status
firefox61 --- unaffected
firefox62 --- unaffected
firefox63 --- verified

People

(Reporter: cpearce, Assigned: daleharvey)

References

Details

(Keywords: regression)

Attachments

(3 files)

Bug 1461656 broke the autoplay toggle in Fennec. STR: 1. Install Firefox Nightly on Android. 2. Open Settings > Advanced and ensure that "Allow Autoplay" is off. 3. Open http://pearce.org.nz/video/autoplay.html and observe that autoplay is blocked. 4. Open Settings > Advanced and toggle "Allow Autoplay" to on. 5. Reload http://pearce.org.nz/video/autoplay.html and observe that autoplay is still blocked, even though block autoplay should be disabled.
Dale: this is a regression from your patch in Bug 1470082 I think? (Not Bug 1461656 as I said in comment 0).
Blocks: 1470082
Flags: needinfo?(dharvey)
Will take, cheers for the report
Assignee: nobody → dharvey
Flags: needinfo?(dharvey)
Switching this to a list isnt ideal UX wise, however being that its behind advanced settings already in a product that looks to be mostly maintenance mode. If we were to implemented the pref fully we would still be using a list and adding the "ask" option, so I think this is reasonable to get it fixed for now
Comment on attachment 8995536 [details] Bug 1478549 - Allow user to configure android media autoplay pref. https://reviewboard.mozilla.org/r/259942/#review267090 ::: mobile/android/app/src/main/res/xml/preferences_advanced.xml:61 (Diff revision 1) > > - <SwitchPreference android:key="media.autoplay.default" > + <ListPreference android:key="media.autoplay.default" > - android:title="@string/pref_media_autoplay_enabled" > + android:title="@string/pref_media_autoplay_enabled" > - android:summary="@string/pref_media_autoplay_enabled_summary" /> > - > + android:entries="@array/pref_media_autoplay_default_entries" > + android:entryValues="@array/pref_media_autoplay_default_values" > + android:persistent="true" /> You should actually be able to use "false" here, since the pref value is actually read from and set in Gecko, so we don't care about the Android shared preferences, do we?
Attachment #8995536 - Flags: review?(jh+bugzilla) → review+
Comment on attachment 8995536 [details] Bug 1478549 - Allow user to configure android media autoplay pref. https://reviewboard.mozilla.org/r/259942/#review267090 > You should actually be able to use "false" here, since the pref value is actually read from and set in Gecko, so we don't care about the Android shared preferences, do we? Ah misunderstood what that flag was, thanks
Pushed by dharvey@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6c537d2395f5 Allow user to configure android media autoplay pref. r=JanH
Backed out changeset 6c537d2395f5 (bug 1478549) for failing at builds/worker/workspace/build/src/mach on a CLOSED TREE Backout link: https://hg.mozilla.org/integration/autoland/rev/3ca11bda3dfb007447a432d90d3b016ae9303052 Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=6c537d2395f50a795f4a45747a416f4907da701f Log link: https://treeherder.mozilla.org/logviewer.html#?job_id=190681503&repo=autoland&lineNumber=3469 Log snippet: [task 2018-07-28T10:31:18.247Z] 10:31:18 INFO - :geckoview:generateOfficialWithoutGeckoBinariesNoMinApiDebugRFile [task 2018-07-28T10:31:18.247Z] 10:31:18 INFO - :geckoview:compileOfficialWithoutGeckoBinariesNoMinApiDebugKotlin [task 2018-07-28T10:31:18.247Z] 10:31:18 INFO - :app:processOfficialWithoutGeckoBinariesNoMinApiPhotonDebugAndroidTestResources [task 2018-07-28T10:31:18.247Z] 10:31:18 INFO - :geckoview:generateOfficialWithoutGeckoBinariesNoMinApiDebugSources [task 2018-07-28T10:31:18.248Z] 10:31:18 INFO - :geckoview:javaPreCompileOfficialWithoutGeckoBinariesNoMinApiDebug [task 2018-07-28T10:31:18.248Z] 10:31:18 INFO - :geckoview:compileOfficialWithoutGeckoBinariesNoMinApiDebugJavaWithJavac [task 2018-07-28T10:31:18.248Z] 10:31:18 INFO - :app:generateOfficialWithoutGeckoBinariesNoMinApiPhotonDebugAndroidTestSources [task 2018-07-28T10:31:18.248Z] 10:31:18 INFO - Note: Some input files use or override a deprecated API. [task 2018-07-28T10:31:18.249Z] 10:31:18 INFO - Note: Recompile with -Xlint:deprecation for details. [task 2018-07-28T10:31:18.249Z] 10:31:18 INFO - :geckoview:transformClassesAndResourcesWithPrepareIntermediateJarsForOfficialWithoutGeckoBinariesNoMinApiDebug [task 2018-07-28T10:31:18.249Z] 10:31:18 INFO - :app:javaPreCompileOfficialWithoutGeckoBinariesNoMinApiPhotonDebug [task 2018-07-28T10:31:18.249Z] 10:31:18 INFO - :app:transformNativeLibsWithMergeJniLibsForOfficialWithoutGeckoBinariesNoMinApiPhotonDebug [task 2018-07-28T10:31:18.250Z] 10:31:18 INFO - :app:transformNativeLibsWithMergeJniLibsForOfficialWithoutGeckoBinariesNoMinApiPhotonDebugAndroidTest [task 2018-07-28T10:31:18.250Z] 10:31:18 INFO - FAILURE: Build failed with an exception. [task 2018-07-28T10:31:18.250Z] 10:31:18 INFO - * Where: [task 2018-07-28T10:31:18.250Z] 10:31:18 INFO - Build file '/builds/worker/workspace/build/src/mobile/android/app/build.gradle' line: 291 [task 2018-07-28T10:31:18.251Z] 10:31:18 INFO - * What went wrong: [task 2018-07-28T10:31:18.251Z] 10:31:18 INFO - Execution failed for task ':app:syncPreprocessedResForOfficialWithoutGeckoBinariesNoMinApiPhotonDebug'. [task 2018-07-28T10:31:18.251Z] 10:31:18 INFO - > Could not copy file '/builds/worker/workspace/build/src/obj-firefox/mobile/android/base/res/values/strings.xml' to '/builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/moz.build/src/officialWithoutGeckoBinariesNoMinApiPhotonDebug/res/values/strings.xml'. [task 2018-07-28T10:31:18.251Z] 10:31:18 INFO - * Try: [task 2018-07-28T10:31:18.251Z] 10:31:18 INFO - Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. [task 2018-07-28T10:31:18.252Z] 10:31:18 INFO - * Get more help at https://help.gradle.org [task 2018-07-28T10:31:18.252Z] 10:31:18 INFO - BUILD FAILED in 43s [task 2018-07-28T10:31:18.252Z] 10:31:18 INFO - 94 actionable tasks: 94 executed [task 2018-07-28T10:31:18.252Z] 10:31:18 INFO - Traceback (most recent call last): [task 2018-07-28T10:31:18.252Z] 10:31:18 INFO - File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main [task 2018-07-28T10:31:18.253Z] 10:31:18 INFO - "__main__", fname, loader, pkg_name) [task 2018-07-28T10:31:18.253Z] 10:31:18 INFO - File "/usr/lib/python2.7/runpy.py", line 72, in _run_code [task 2018-07-28T10:31:18.253Z] 10:31:18 INFO - exec code in run_globals [task 2018-07-28T10:31:18.253Z] 10:31:18 INFO - File "/builds/worker/workspace/build/src/python/mozbuild/mozbuild/action/file_generate.py", line 110, in <module> [task 2018-07-28T10:31:18.253Z] 10:31:18 INFO - sys.exit(main(sys.argv[1:])) [task 2018-07-28T10:31:18.254Z] 10:31:18 INFO - File "/builds/worker/workspace/build/src/python/mozbuild/mozbuild/action/file_generate.py", line 70, in main [task 2018-07-28T10:31:18.254Z] 10:31:18 INFO - ret = module.__dict__[method](output, *args.additional_arguments, **kwargs) [task 2018-07-28T10:31:18.254Z] 10:31:18 INFO - File "/builds/worker/workspace/build/src/mobile/android/gradle.py", line 39, in assemble_app [task 2018-07-28T10:31:18.254Z] 10:31:18 INFO - return android('assemble-app') [task 2018-07-28T10:31:18.255Z] 10:31:18 INFO - File "/builds/worker/workspace/build/src/mobile/android/gradle.py", line 31, in android [task 2018-07-28T10:31:18.255Z] 10:31:18 INFO - subprocess.check_call(cmd) [task 2018-07-28T10:31:18.255Z] 10:31:18 INFO - File "/usr/lib/python2.7/subprocess.py", line 186, in check_call [task 2018-07-28T10:31:18.255Z] 10:31:18 INFO - raise CalledProcessError(retcode, cmd) [task 2018-07-28T10:31:18.255Z] 10:31:18 INFO - subprocess.CalledProcessError: Command '[u'/builds/worker/workspace/build/src/mach', 'android', 'assemble-app']' returned non-zero exit status 1 [task 2018-07-28T10:31:18.256Z] 10:31:18 INFO - backend.mk:54: recipe for target '.deps/android_apks.stub' failed [task 2018-07-28T10:31:18.256Z] 10:31:18 INFO - make[4]: *** [.deps/android_apks.stub] Error 1 [task 2018-07-28T10:31:18.256Z] 10:31:18 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/mobile/android/base' [task 2018-07-28T10:31:18.256Z] 10:31:18 INFO - /builds/worker/workspace/build/src/config/recurse.mk:101: recipe for target 'mobile/android/base/export' failed [task 2018-07-28T10:31:18.256Z] 10:31:18 INFO - make[3]: *** [mobile/android/base/export] Error 2 [task 2018-07-28T10:31:18.257Z] 10:31:18 INFO - /builds/worker/workspace/build/src/config/recurse.mk:32: recipe for target 'export' failed [task 2018-07-28T10:31:18.257Z] 10:31:18 INFO - make[2]: *** [export] Error 2 [task 2018-07-28T10:31:18.257Z] 10:31:18 INFO - /builds/worker/workspace/build/src/config/rules.mk:423: recipe for target 'default' failed [task 2018-07-28T10:31:18.257Z] 10:31:18 INFO - make[1]: *** [default] Error 2 [task 2018-07-28T10:31:18.257Z] 10:31:18 INFO - client.mk:150: recipe for target 'build' failed [task 2018-07-28T10:31:18.258Z] 10:31:18 INFO - make: *** [build] Error 2 [task 2018-07-28T10:31:18.258Z] 10:31:18 INFO - 0 compiler warnings present. [task 2018-07-28T10:31:18.280Z] 10:31:18 ERROR - Return code: 2 [task 2018-07-28T10:31:18.280Z] 10:31:18 WARNING - setting return code to 2 [task 2018-07-28T10:31:18.281Z] 10:31:18 FATAL - 'mach build -v' did not run successfully. Please check log for errors. [task 2018-07-28T10:31:18.281Z] 10:31:18 FATAL - Running post_fatal callback... [task 2018-07-28T10:31:18.281Z] 10:31:18 FATAL - Exiting -1 [task 2018-07-28T10:31:18.281Z] 10:31:18 INFO - [mozharness: 2018-07-28 10:31:18.281838Z] Finished build step (failed) [task 2018-07-28T10:31:18.282Z] 10:31:18 INFO - Running post-run listener: _summarize [task 2018-07-28T10:31:18.282Z] 10:31:18 ERROR - # TBPL FAILURE # [task 2018-07-28T10:31:18.282Z] 10:31:18 INFO - [mozharness: 2018-07-28 10:31:18.282340Z] FxDesktopBuild summary: [task 2018-07-28T10:31:18.282Z] 10:31:18 ERROR - # TBPL FAILURE #
Flags: needinfo?(dharvey)
Ugh apologies, was missing a set of string forward definitions, have added and repushed, tested it and working this time
Flags: needinfo?(dharvey)
Pushed by dharvey@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/91daf0edd9cd Allow user to configure android media autoplay pref. r=JanH
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Depends on: 1479418
This doesn't seem to be fixed. Logged Bug 1479418.
Component: Site Identity and Permission Panels → General
Product: Firefox → Firefox for Android
this issue still exists on today's Android Nightly.
Status: RESOLVED → REOPENED
Flags: needinfo?(dharvey)
Resolution: FIXED → ---
yup as well as the weird behaviour in https://bugzilla.mozilla.org/show_bug.cgi?id=1479418 (the list doesnt get set to the current value). Considering this is advanced settings on a maintenance product, Jan would you be ok with a patch to remove the setting?
Flags: needinfo?(dharvey) → needinfo?(jh+bugzilla)
Flags: needinfo?(jh+bugzilla)
Ok great thanks for the pointer, I tested this on my android device and successfully displays the correct pref value and autoplay content respects the change in settings. Cheers
Attachment #9004084 - Flags: review?(jh+bugzilla)
Comment on attachment 9004084 [details] [diff] [review] 0001-Bug-1478549-Follow-up-to-add-prefs-helper.-r-janh.patch Review of attachment 9004084 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/geckoview/src/main/java/org/mozilla/gecko/PrefsHelper.java @@ +34,4 @@ > INT_TO_STRING_PREFS.add("home.sync.updateMode"); > INT_TO_STRING_PREFS.add("browser.image_blocking"); > INT_TO_BOOL_PREFS.add("browser.display.use_document_fonts"); > + INT_TO_STRING_PREFS.add("media.autoplay.default"); Nit: I think it would be nicer to group all INT_TO_STRING_PREFS.add() calls together.
Attachment #9004084 - Flags: review?(jh+bugzilla) → review+
Updated to fix order, Cheers Jan
Attachment #9004148 - Flags: review+
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
Verified as fixed on latest Nightly 63.0a1 (2018-09-04) with Nokia 6 (Android 7.1.1) and OnePlus 5T (Android 8.1.0).
Status: RESOLVED → VERIFIED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: