Struct xpcom::interfaces::nsISuspendedTypes [] [src]

#[repr(C)]
pub struct nsISuspendedTypes { /* fields omitted */ }

interface nsISuspendedTypes : nsISupports

Methods

impl nsISuspendedTypes
[src]

[src]

Cast this nsISuspendedTypes to one of its base interfaces.

impl nsISuspendedTypes
[src]

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.
   */

SUSPENDED_PAUSE: i64 = 1

SUSPENDED_BLOCK: i64 = 2

SUSPENDED_PAUSE_DISPOSABLE: i64 = 3

SUSPENDED_STOP_DISPOSABLE: i64 = 4

Methods from Deref<Target = nsISupports>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsISuspendedTypes
[src]

IID: nsIID = nsID(673359936, 61449, 4581, [168, 55, 8, 0, 32, 12, 154, 102])

[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]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsISuspendedTypes
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.