Backed out changeset 1681062d82dd (bug 1242874) for timeouts in own test browser_mediaPlayback_suspended_multipleAudio.js
This commit is contained in:
@@ -6,55 +6,6 @@
|
||||
|
||||
interface mozIDOMWindow;
|
||||
|
||||
typedef uint32_t nsSuspendedTypes;
|
||||
|
||||
[scriptable, builtinclass, uuid(2822a840-f009-11e5-a837-0800200c9a66)]
|
||||
interface nsISuspendedTypes : nsISupports
|
||||
{
|
||||
/**
|
||||
* The suspended enum is used in three different situations,
|
||||
* - platform audio focus (Fennec/B2G)
|
||||
* - remote media control (Fennec)
|
||||
* - block auto-play video in non-active page
|
||||
*
|
||||
* Note: the "remote side" must control the AudioChannelAgent using
|
||||
* nsIAudioChannelAgentCallback.windowSuspendChanged() callback instead using
|
||||
* play/pause methods or any button in the webpage.
|
||||
*
|
||||
* - SUSPENDED_PAUSE :
|
||||
* It's used when transiently losing audio focus, the media can't be resumed
|
||||
* until we gain the audio focus again. It would change the internal state of
|
||||
* MediaElement when it's being suspended/resumed, and it would trigger the
|
||||
* related JS event. eg. "play" and "pause" event.
|
||||
*
|
||||
* - SUSPENDED_BLOCK
|
||||
* It's used to prevent auto-playing media in inactive page in order to
|
||||
* reduce the power consumption, and the media can't be resumed until the
|
||||
* page becomes active again. It would change the internal state of
|
||||
* MediaElement when it's being blocked/resumed, so it won't trigger the
|
||||
* related JS event. eg. "play" and "pause" event.
|
||||
*
|
||||
* - SUSPENDED_PAUSE_DISPOSABLE
|
||||
* It's used for remote media-control to pause the playing media and when we
|
||||
* lose audio focus permanently. It's disposable suspended, so the media can
|
||||
* be resumed arbitrary after that. Same as SUSPENDED_PAUSE, it would change
|
||||
* the internal state of MediaElement when it's being suspended.
|
||||
*
|
||||
* - SUSPENDED_STOP_DISPOSABLE
|
||||
* It's used for remote media-control to stop the playing media. The remote
|
||||
* control would disappear after stopping the media, so we would disconnect
|
||||
* the audio channel agent. It's disposable suspended, so the media can be
|
||||
* resumed arbitrary after that. Same as SUSPENDED_PAUSE, it would change
|
||||
* the internal state of MediaElement when it's being suspended.
|
||||
*/
|
||||
|
||||
const uint32_t NONE_SUSPENDED = 0;
|
||||
const uint32_t SUSPENDED_PAUSE = 1;
|
||||
const uint32_t SUSPENDED_BLOCK = 2;
|
||||
const uint32_t SUSPENDED_PAUSE_DISPOSABLE = 3;
|
||||
const uint32_t SUSPENDED_STOP_DISPOSABLE = 4;
|
||||
};
|
||||
|
||||
[uuid(15c05894-408e-4798-b527-a8c32d9c5f8c)]
|
||||
interface nsIAudioChannelAgentCallback : nsISupports
|
||||
{
|
||||
@@ -63,11 +14,6 @@ interface nsIAudioChannelAgentCallback : nsISupports
|
||||
*/
|
||||
void windowVolumeChanged(in float aVolume, in bool aMuted);
|
||||
|
||||
/**
|
||||
* Notified when the window needs to be suspended or resumed.
|
||||
*/
|
||||
void windowSuspendChanged(in uint32_t aSuspend);
|
||||
|
||||
/**
|
||||
* Notified when the capture state is changed.
|
||||
*/
|
||||
|
||||
@@ -468,13 +468,6 @@ FMRadio::WindowVolumeChanged(float aVolume, bool aMuted)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
FMRadio::WindowSuspendChanged(nsSuspendedTypes aSuspend)
|
||||
{
|
||||
// TODO : implementation.
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
FMRadio::WindowAudioCaptureChanged(bool aCapture)
|
||||
{
|
||||
|
||||
@@ -5134,13 +5134,6 @@ NS_IMETHODIMP HTMLMediaElement::WindowVolumeChanged(float aVolume, bool aMuted)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLMediaElement::WindowSuspendChanged(nsSuspendedTypes aSuspend)
|
||||
{
|
||||
// TODO : implementation.
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef MOZ_EME
|
||||
MediaKeys*
|
||||
HTMLMediaElement::GetMediaKeys() const
|
||||
|
||||
@@ -531,13 +531,6 @@ AudioDestinationNode::WindowVolumeChanged(float aVolume, bool aMuted)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
AudioDestinationNode::WindowSuspendChanged(nsSuspendedTypes aSuspend)
|
||||
{
|
||||
// TODO : implementation.
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
AudioDestinationNode::WindowAudioCaptureChanged(bool aCapture)
|
||||
{
|
||||
|
||||
@@ -733,13 +733,6 @@ nsSpeechTask::WindowVolumeChanged(float aVolume, bool aMuted)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSpeechTask::WindowSuspendChanged(nsSuspendedTypes aSuspend)
|
||||
{
|
||||
// TODO : implementation.
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSpeechTask::WindowAudioCaptureChanged(bool aCapture)
|
||||
{
|
||||
|
||||
@@ -1848,13 +1848,6 @@ nsNPAPIPluginInstance::WindowVolumeChanged(float aVolume, bool aMuted)
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsNPAPIPluginInstance::WindowSuspendChanged(nsSuspendedTypes aSuspend)
|
||||
{
|
||||
// TODO : implementation.
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsNPAPIPluginInstance::WindowAudioCaptureChanged(bool aCapture)
|
||||
{
|
||||
|
||||
@@ -718,13 +718,6 @@ Telephony::WindowVolumeChanged(float aVolume, bool aMuted)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Telephony::WindowSuspendChanged(nsSuspendedTypes aSuspend)
|
||||
{
|
||||
// Not support yet.
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Telephony::WindowAudioCaptureChanged(bool aCapture)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user