Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Handle more autoplay permissions on intent
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro committed Mar 14, 2019
1 parent 4062b52 commit d1282fe
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -736,8 +736,13 @@ private void vrPrefsWorkAround(Context aContext, Bundle aExtras) {
out.write(("pref(\"gl.msaa-level\"," + msaaLevel + ");\n").getBytes());
}
addOptionalPref(out, "dom.vr.require-gesture", aExtras);
addOptionalPref(out, "media.autoplay.enabled.user-gestures-needed", aExtras);
addOptionalPref(out, "privacy.reduceTimerPrecision", aExtras);
if (aExtras != null && aExtras.getBoolean("media.autoplay.enabled", false)) {
// Enable playing audios without gesture (used for gfx automated testing)
out.write("pref(\"media.autoplay.enabled.user-gestures-needed\", false);\n".getBytes());
out.write("pref(\"media.autoplay.enabled.ask-permission\", false);\n".getBytes());
out.write("pref(\"media.autoplay.default\", 0);\n".getBytes());
}
} catch (FileNotFoundException e) {
Log.e(LOGTAG, "Unable to create file: '" + prefFileName + "' got exception: " + e.toString());
} catch (IOException e) {
Expand Down

0 comments on commit d1282fe

Please sign in to comment.