Bug 1520457 - Adjust the message written in the console when the auto-play policy block an AudioContext. r=flod,cpearce
authorPaul Adenot <paul@paul.cx>
Wed, 16 Jan 2019 22:14:08 +0000
changeset 514239 177103817494
parent 514238 ae73df344b93
child 514240 9fedba33cfa3
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflod, cpearce
bugs1520457
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1520457 - Adjust the message written in the console when the auto-play policy block an AudioContext. r=flod,cpearce Differential Revision: https://phabricator.services.mozilla.com/D16692
dom/locales/en-US/chrome/dom/dom.properties
dom/media/webaudio/AudioContext.cpp
--- a/dom/locales/en-US/chrome/dom/dom.properties
+++ b/dom/locales/en-US/chrome/dom/dom.properties
@@ -145,17 +145,17 @@ MediaStreamAddTrackDifferentAudioChannel
 MediaEMEInsecureContextDeprecatedWarning=Using Encrypted Media Extensions at %S on an insecure (i.e. non-HTTPS) context is deprecated and will soon be removed. You should consider switching to a secure origin such as HTTPS.
 # LOCALIZATION NOTE: %S is the URL of the web page which is calling web APIs without passing data (either an audioCapabilities or a videoCapabilities) that will soon be required. See https://bugzilla.mozilla.org/show_bug.cgi?id=1368583#c21 for explanation of this string.
 MediaEMENoCapabilitiesDeprecatedWarning=Calling navigator.requestMediaKeySystemAccess() (at %S) without passing a candidate MediaKeySystemConfiguration containing audioCapabilities or videoCapabilities is deprecated and will soon become unsupported.
 # LOCALIZATION NOTE: %S is the URL of the web page which is calling web APIs without passing data (a "codecs" string in the "contentType") that will soon be required. See https://bugzilla.mozilla.org/show_bug.cgi?id=1368583#c21 for explanation of this string.
 MediaEMENoCodecsDeprecatedWarning=Calling navigator.requestMediaKeySystemAccess() (at %S) passing a candidate MediaKeySystemConfiguration containing audioCapabilities or videoCapabilities without a contentType with a “codecs” string is deprecated and will soon become unsupported.
 # LOCALIZATION NOTE: Do not translate "Mutation Event" and "MutationObserver"
 MutationEventWarning=Use of Mutation Events is deprecated. Use MutationObserver instead.
 BlockAutoplayError=Autoplay is only allowed when approved by the user, the site is activated by the user, or media is muted.
-BlockAutoplayWebAudioError=Autoplay is only allowed after site is activated by the user gestures, or AudioContext is offline.
+BlockAutoplayWebAudioStartError=An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page.
 # LOCALIZATION NOTE: Do not translate "Components"
 ComponentsWarning=The Components object is deprecated. It will soon be removed.
 PluginHangUITitle=Warning: Unresponsive plugin
 PluginHangUIMessage=%S may be busy, or it may have stopped responding. You can stop the plugin now, or you can continue to see if the plugin will complete.
 PluginHangUIWaitButton=Continue
 PluginHangUIStopButton=Stop plugin
 # LOCALIZATION NOTE: Do not translate "NodeIterator" or "detach()".
 NodeIteratorDetachWarning=Calling detach() on a NodeIterator no longer has an effect.
--- a/dom/media/webaudio/AudioContext.cpp
+++ b/dom/media/webaudio/AudioContext.cpp
@@ -1012,17 +1012,17 @@ void AudioContext::MaybeUpdateAutoplayTe
         mozilla::Telemetry::LABELS_WEB_AUDIO_AUTOPLAY::NeverBlocked);
   } else if (!mWasEverAllowedToStart && mWasEverBlockedToStart) {
     AccumulateCategorical(
         mozilla::Telemetry::LABELS_WEB_AUDIO_AUTOPLAY::NeverAllowed);
   }
 }
 
 void AudioContext::ReportBlocked() {
-  ReportToConsole(nsIScriptError::warningFlag, "BlockAutoplayWebAudioError");
+  ReportToConsole(nsIScriptError::warningFlag, "BlockAutoplayWebAudioStartError");
   mWasAllowedToStart = false;
 
   if (!StaticPrefs::MediaBlockEventEnabled()) {
     return;
   }
 
   RefPtr<AudioContext> self = this;
   RefPtr<nsIRunnable> r =