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
  • How to start
  • 1. Create an empty game object
  • 2. Add a special UI component
  • Media Button
  • Volume Bar
  • Seek Bar
  • UI Settings
  1. Functionalities

UI Components

PreviousMedia EventsNextAndroid Settings

Last updated 11 months ago

How to start

1. Create an empty game object

Create an empty object in Unity hierarchy.

2. Add a special UI component

Find and add one of the component outlined below to your object created in step 1.

  • Media Button : standard media buttons such as play, pause, stop, loop and shuffle

  • Volume Bar : a slider that controls the media volume

  • Seek Bar : a slider that controls the media position

  • UI Settings : a manager that controls shared UI properties

Media Button

Media Button is an All-In-One component that can create all buttons that NativeMediaPlayer currently supports like the image below.

Media Button can become one of the many buttons

Choose Button Type to determine which button it is, and put in the necessary components such as Image and Events. Button colors are defined with UI Settings, and check Dark Mode if you want to use the Dark Mode colors.

Volume Bar

To create a volume bar, create a Unity built-in slider and put that into Volume Bar. The slider will behave as volume bar of the NativeMediaPlayer. In case you need events, add the events to the slider.

Seek Bar

Seek Bar also needs a Unity built-in slider. Create a slider and put it into Seek Bar. The slider will behave as seek bar of the NativeMediaPlayer. Update Interval is how often seek bar will be updated, and the default value is 0.5f which means that it will be updated every 0.5 seconds. You can add texts that will display the current position and the duration of the current media item.

UI Settings

UI Settings manages all shared properties of NativeMediaPlayer UI elements. It only manages UI colors in the current version.