Class MediaSession

Object
org.mozilla.geckoview.MediaSession

@UiThread public class MediaSession extends Object
The MediaSession API provides media controls and events for a GeckoSession. This includes support for the DOM Media Session API and regular HTML media content.
See Also:
  • Field Details

    • SYSTEM_AUDIO_FOCUS_GAIN

      public static final int SYSTEM_AUDIO_FOCUS_GAIN
      The platform regained audio focus; resume what an interruption silenced.
      See Also:
    • SYSTEM_AUDIO_FOCUS_TRANSIENT_LOSS

      public static final int SYSTEM_AUDIO_FOCUS_TRANSIENT_LOSS
      The platform took audio focus transiently (e.g. a call); resumable on gain.
      See Also:
    • SYSTEM_AUDIO_FOCUS_PERMANENT_LOSS

      public static final int SYSTEM_AUDIO_FOCUS_PERMANENT_LOSS
      The platform took audio focus for good; the interruption is not resumed.
      See Also:
  • Constructor Details

    • MediaSession

      protected MediaSession(GeckoSession session)
      Create a new MediaSession for the given GeckoSession.
      Parameters:
      session - The GeckoSession this media session is associated with.
  • Method Details