Getting Started

It takes less than 10 minutes to import Native Media Player to your project. Here's a step by step guide to jump in.

0. Get Newtonsoft Json, if it isn't already in your project

https://docs.unity3d.com/Packages/com.unity.nuget.newtonsoft-json@2.0/manual/index.html

1. Create StreamingAssets folder

If you are using local audio files, create a new folder named ‘StreamingAssets’ under Assets. Put your audio files under this folder. You can skip this part if you are only using remote URLs.

2. Add NativeMediaPlayer to your scene

Import NativeMediaPlayer.prefab to your scene. It's located under Codeqo\NativeMediaPlayer\Prefabs.

3. Configure default settings

Configure NMPSettings using the Editor Inspector.

4. Configure core components

Inside NMPSettings.prefab, there are 4 objects each representing 4 major components to run this plugin. Each component is CRUCIAL, so take your time and do not skip this step. Configure each inspector values carefully. Visit following pages for more information.\

MediaSource.cs

pageInitialization

MediaEventListener.cs

pageCallbacks

AndroidSettings.cs

pageAndroid

iOSSettings.cs

pageiOS

5. Add track information

Import a Playlist prefab, multiple Playlist prefabs or a MediaItem prefab to your scene and attach them to the MediaSource. Configure track information(s) on the prefab's Editor Inspector.

6. Add album arts

When adding an album art image, click the texture and check ‘Read/Write Enabled’ under Advanced in the inspector.

Last updated