Bug 855570 - Deprecate Audio Data API. r=ehsan

This commit is contained in:
Matthew Gregan 2013-03-28 14:36:29 +13:00
Родитель cbb9822c34
Коммит 9df358906f
4 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -28,3 +28,4 @@ DEPRECATED_OPERATION(MozSlice)
DEPRECATED_OPERATION(Components)
DEPRECATED_OPERATION(PrefixedVisibilityAPI)
DEPRECATED_OPERATION(NodeIteratorDetach)
DEPRECATED_OPERATION(MozAudioData)

Просмотреть файл

@ -18,6 +18,7 @@
#include "AudioChannelCommon.h"
#include <algorithm>
#include "mozilla/Preferences.h"
#include "mozilla/dom/EnableWebAudioCheck.h"
DOMCI_NODE_DATA(HTMLAudioElement, mozilla::dom::HTMLAudioElement)
@ -156,6 +157,10 @@ HTMLAudioElement::MozSetup(uint32_t aChannels, uint32_t aRate, ErrorResult& aRv)
return;
}
if (dom::EnableWebAudioCheck::PrefEnabled()) {
OwnerDoc()->WarnOnceAbout(nsIDocument::eMozAudioData);
}
// If there is already a src provided, don't setup another stream
if (mDecoder) {
aRv.Throw(NS_ERROR_FAILURE);

Просмотреть файл

@ -66,6 +66,7 @@
#include "nsIScriptError.h"
#include "nsHostObjectProtocolHandler.h"
#include "MediaMetadataManager.h"
#include "mozilla/dom/EnableWebAudioCheck.h"
#include "AudioChannelService.h"
@ -3536,6 +3537,9 @@ NS_IMETHODIMP HTMLMediaElement::GetMozFragmentEnd(double* aTime)
void HTMLMediaElement::NotifyAudioAvailableListener()
{
if (dom::EnableWebAudioCheck::PrefEnabled()) {
OwnerDoc()->WarnOnceAbout(nsIDocument::eMozAudioData);
}
if (mDecoder) {
mDecoder->NotifyAudioAvailableListener();
}

Просмотреть файл

@ -134,3 +134,5 @@ OldCSPHeaderDeprecated=The X-Content-Security-Policy and X-Content-Security-Repo
BothCSPHeadersPresent=This site specified both an X-Content-Security-Policy/Report-Only header and a Content-Security-Policy/Report-Only header. The X-Content-Security-Policy/Report-Only header(s) will be ignored.
# LOCALIZATION NOTE: Do not translate "NodeIterator" or "detach()".
NodeIteratorDetachWarning=Calling detach() on a NodeIterator no longer has an effect.
# LOCALIZATION NOTE: Do not translate "Mozilla Audio Data API" and "Web Audio API".
MozAudioDataWarning=The Mozilla Audio Data API is deprecated. Please use the Web Audio API instead.