UI Implementations
NativeMediaPlayer offers easy UI implementations with pre-coded scripts with easy-to-use custom inspectors. Create an empty object in Unity hierarchy and add component to find one of the UI scripts outlined below.
- Media Button makes it easy to create your own media button such as play, pause, stop, loop, shuffle and more
- Volume Bar makes it easy to create your own volume bar
- Seek Bar makes it easy to create your own seek bar
- UI Settings manages shared properties that apply to all UI elements listed above
Media Button
Media Button is an All-In-One component that can create all buttons that NativeMediaPlayer currently supports like the image below.
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.