Struct xpcom::interfaces::nsISuspendedTypes
[−]
[src]
#[repr(C)]pub struct nsISuspendedTypes { /* fields omitted */ }
interface nsISuspendedTypes : nsISupports
Methods
impl nsISuspendedTypes
[src]
pub fn coerce<T: nsISuspendedTypesCoerce>(&self) -> &T
[src]
Cast this nsISuspendedTypes
to one of its base interfaces.
impl nsISuspendedTypes
[src]
pub const NONE_SUSPENDED: i64
NONE_SUSPENDED: i64 = 0
/**
* 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.
*/
pub const SUSPENDED_PAUSE: i64
SUSPENDED_PAUSE: i64 = 1
pub const SUSPENDED_BLOCK: i64
SUSPENDED_BLOCK: i64 = 2
pub const SUSPENDED_PAUSE_DISPOSABLE: i64
SUSPENDED_PAUSE_DISPOSABLE: i64 = 3
pub const SUSPENDED_STOP_DISPOSABLE: i64
SUSPENDED_STOP_DISPOSABLE: i64 = 4
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsISuspendedTypes
[src]
const IID: nsIID
IID: nsIID = nsID(673359936, 61449, 4581, [168, 55, 8, 0, 32, 12, 154, 102])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsISuspendedTypes
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsISuspendedTypes
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.