Native Media Player
Glitch9 Inc.Main Docs.
  • Introduction
    • Native Media Player
    • Preparation
    • Initialization
  • Functionalities
    • Media Item
    • Media Metadata
    • Playlist
    • Media Events
    • UI Components
    • Android Settings
    • iOS Settings
  • Advanced
    • Manual Initialization
    • Creating Playlist at Runtime
    • Single Media Item Playlists
  • API Reference
    • MediaPlayer
      • Properties
      • Methods
    • MediaEvents
    • MediaItem
    • MediaMetadata
    • Playlist
    • Configuration Details
  • Support
    • FAQ
    • Troubleshooting
      • SeekTo (Seekbar) doesn't work
      • java.lang.NoClassDefFoundError
      • One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified
      • AndroidX Build Error: resource android:attr/lStar not found.
    • Update Logs
Powered by GitBook
On this page
  • General Configurations
  • Default Values
  • Fallback Media Metadata
  • UI Colors
  • 5. Android Media Actions
  • Android Notification Settings
  • Android Audio Attributes
  • Android Audio Focus Request
  • iOS Media Actions
  1. API Reference

Configuration Details

General Configurations

Auto Init

  • Description: Automatically initialize the media player.

  • Type: Boolean

  • Default: false

Play On App Start

  • Description: Start playing media when the app starts.

  • Type: Boolean

  • Default: false

Enable Background Play

  • Description: Allow media playback in the background.

  • Type: Boolean

  • Default: false

Enable Background Controls

  • Description: Enable background media controls.

  • Type: Boolean

  • Default: false

Default Values

Repeat Mode

  • Description: Set the repeat mode for media playback.

  • Type: Enum (e.g., None, One, All)

  • Default: None

Seek Increment

  • Description: Set the seek increment in seconds.

  • Type: Float

  • Default: 5.0

Pre Buffer Duration

  • Description: Set the pre-buffer duration in seconds.

  • Type: Float

  • Default: 5.0

Start Media Item Index

  • Description: Set the starting index for media items.

  • Type: Integer

  • Default: 0

Fallback Media Metadata

Add Index Type

  • Description: Set the index type for adding media.

  • Type: Enum

  • Default: None

Album Title

  • Description: Set the album title for media.

  • Type: String

  • Default: Unknown

Album Artist

  • Description: Set the album artist for media.

  • Type: String

  • Default: Unknown

Title

  • Description: Set the title for media.

  • Type: String

  • Default: Unknown

Artist

  • Description: Set the artist for media.

  • Type: String

  • Default: Unknown

UI Colors

Light Mode Enabled Color

  • Description: Set the color for enabled light mode.

  • Type: Color

  • Default: #FFFFFF

Light Mode Disabled Color

  • Description: Set the color for disabled light mode.

  • Type: Color

  • Default: #CCCCCC

Dark Mode Enabled Color

  • Description: Set the color for enabled dark mode.

  • Type: Color

  • Default: #000000

Dark Mode Disabled Color

  • Description: Set the color for disabled dark mode.

  • Type: Color

  • Default: #333333

5. Android Media Actions

Small Icon

  • Description: Set the small icon for notifications.

  • Type: Sprite

  • Default: null

Use Stop

  • Description: Enable the stop action.

  • Type: Boolean

  • Default: false

Use Skip To Next

  • Description: Enable the skip to next action.

  • Type: Boolean

  • Default: false

Use Skip To Previous

  • Description: Enable the skip to previous action.

  • Type: Boolean

  • Default: false

Use Fast Forward

  • Description: Enable the fast forward action.

  • Type: Boolean

  • Default: false

Use Rewind

  • Description: Enable the rewind action.

  • Type: Boolean

  • Default: false

Use Seek Bar

  • Description: Enable the seek bar.

  • Type: Boolean

  • Default: true

Android Notification Settings

Notification Id

  • Description: Set the notification ID.

  • Type: Integer

  • Default: 1

Notification Importance

  • Description: Set the notification importance.

  • Type: Enum (e.g., Low, Default, High, Max)

  • Default: Default

Notification Channel Id

  • Description: Set the notification channel ID (for SDK26+).

  • Type: String

  • Default: media_playback_channel

Notification Channel Name

  • Description: Set the notification channel name (for SDK26+).

  • Type: String

  • Default: Media Playback

Notification Channel Description

  • Description: Set the notification channel description (for SDK26+).

  • Type: String

  • Default: Media playback controls

Android Audio Attributes

Audio Usage

  • Description: Set the audio usage attribute.

  • Type: Enum (e.g., Media, Voice Communication, Alarm)

  • Default: Media

Content Type

  • Description: Set the content type attribute.

  • Type: Enum (e.g., Music, Speech, Movie)

  • Default: Music

Allowed Capture Policy

  • Description: Set the allowed capture policy (for SDK26+).

  • Type: Enum (e.g., Allow All, Allow None, Allow Same App)

  • Default: Allow All

Android Audio Focus Request

Accepts Delayed Focus Gain

  • Description: Marks this focus request as compatible with delayed focus.

  • Type: Boolean

  • Default: false

Will Pause When Ducked

  • Description: Declare the intended behavior of the application with regards to audio ducking.

  • Type: Boolean

  • Default: true

Audio Focus Gain

  • Description: Gains audio focus.

  • Type: Boolean

  • Default: true

Audio Focus Gain Transient

  • Description: Gains audio focus for a short time.

  • Type: Boolean

  • Default: true

Audio Focus Loss

  • Description: Loses audio focus.

  • Type: Boolean

  • Default: false

Audio Focus Loss Transient

  • Description: Loses audio focus for a short time.

  • Type: Boolean

  • Default: false

Audio Focus Loss Transient Can Duck

  • Description: Audio focus is reduced by another signal.

  • Type: Boolean

  • Default: false

iOS Media Actions

Use Stop

  • Description: Enable the stop action.

  • Type: Boolean

  • Default: false

Use Skip To Next

  • Description: Enable the skip to next action.

  • Type: Boolean

  • Default: false

Use Skip To Previous

  • Description: Enable the skip to previous action.

  • Type: Boolean

  • Default: false

Use Fast Forward

  • Description: Enable the fast forward action.

  • Type: Boolean

  • Default: false

Use Rewind

  • Description: Enable the rewind action.

  • Type: Boolean

  • Default: false

Use Seek Bar

  • Description: Enable the seek bar.

  • Type: Boolean

  • Default: true

Disable AVAudioSession Toggle

  • Description: Disable toggling of the AVAudioSession.

  • Type: Boolean

  • Default: false

PreviousPlaylistNextFAQ

Last updated 11 months ago