Skip to content

Stream videos in HLS & DASH formats into Unity apps including Widevine DRM protection.

Notifications You must be signed in to change notification settings

NexPlayer/NexPlayer_Unity_Plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 

Repository files navigation

Unity video player


NexPlayer™ for Unity is a cross-platform video streaming player for Unity games and apps that supports both regular and 360 video playback on Android, iOS, Windows, macOS, Nintendo Switch™, Xbox One S/X, Xbox Series X/S, VR Headsets, UWP(Universal Windows Platform) HoloLens and WebGL. NexPlayer's Unity video plugin is the only player supporting Widevine DRM-protected HLS & DASH streaming on Android & iOS devices.

This repository contains the NexPlayer™ Unity video streaming player plugin features list as well as an installation guide. If you want to get a copy of our fully working demo, contact us at our website.

Demo Examples

Our Unity video plugin allows the introduction of new exciting scenes within your Unity projects. With our plugin, you can use in-game actions and objects to modify video content.

Render videos on any Unity GameObject


NexPlayer for Unity Video Player Sample Interface

Multi Streaming


Pluto TV: Immersive OTT experience in VR PartyOn: Immerse in the music metaverse
GREE, Inc.: Virtual cinema platform WebGL: Browser-based metaverses, blockchain

Table of Contents


Features

The NexPlayer™ for Unity video streaming player plugin contains the latest features. As our Unity video plugin is developed entirely in-house, we can implement any desired functionalities.

We support the following features:

Overview

  • mp4 download and playback
  • HLS & DASH Streaming with ABR (Adaptive Bitrate)
  • AES-128 HLS
  • Widevine DRM for Streaming and Local Playback for Android & iOS
  • Windows & macOS Editor (Easy to Use)
  • Up to 8K (UHD) Resolution
  • Rendering Videos on 2D & 3D Objects

Basic Features

  • Auto Playback
  • Play / Pause
  • Seek
  • Audio Volume Adjustment
  • Loop Playback
  • Configurable Aspect Ratio
  • Portrait / Landscape Orientation

Advanced Features

  • Offline Streaming Playback for HLS & DASH
  • MultiView (Display Multiple Synchronized Streams): Android & iOS only
  • WebVTT Subtitles & CEA-608/708 Closed Captions
  • Multiple Audio & Subtitle Track Selection
  • Spread Video Across Multiple Objects
  • Transparency and Chroma Support
  • Metadata: ID3 tags
  • Audio PCM data
  • AudioSource piping to Unity

360 Video Playback and Virtual Reality (VR)

  • Touch input which includes movement, and camera rotation
  • Gyroscope input to move the camera
  • Mouse input to move the camera
  • Automatic Ground Leveler to stabilize the video
  • Custom shaders to map 2D, 3D Over/Under and 3D Left/Right 360 videos
  • Compatible with VR libraries for Unity (Google Cardboard, Vive & Oculus)

Supported Platforms

Platform Supported Graphics APIs HLS DASH Local Inside App (Streaming Assets) DRM protection
Android OpenGLES2, OpenGLES3 ✔️ ✔️ ✔️ ✔️ ✔️
iOS Metal ✔️ ✔️ ✔️ ✔️ ✔️
Windows DirectX11 / DirectX12 ✔️ ✔️ ✔️ ✔️
macOS Metal ✔️ ✔️ ✔️
HTML 5 WebGL 1.0 / WebGL 2.0 ✔️ ✔️
Nintendo Switch NVN ✔️ ✔️
Xbox DirectX11 / DirectX12 ✔️ ✔️ ✔️ ✔️
HoloLens DirectX11 / DirectX12 ✔️ ✔️ ✔️ ✔️
UWP DirectX11 / DirectX12 ✔️ ✔️ ✔️ ✔️

Demo Installation Guide

Create or open an Unity project and import the NexPlayer™ Unity video streaming player plugin.

Quickstart_Step_0

Using NexPlayerSimple

NexPlayerSimple is a slimmed down version of our full-featured example player, NexPlayer. You can use it by following these steps:

  1. To add video playback to your scene, you will need to add a NexPlayerSimple component to your scene:
    1. Navigate to the NexPlayer menu and click "Create NexPlayer Simple Object"

      Create NexPlayer Simple
Object

    2. This will add a new GameObject (NexPlayerSimple) to your scene, which will contain the NexPlayerSimple component along with the NexPlayerRenderController component.
  2. NexPlayerSimple supports any of the three supported RenderModes (RawImage, RenderTexture and Material Override). Using the inspector in the NexPlayerRenderController component, select the desired Render Mode and set the reference to that Render Object.

    Render Mode settings

Example: Using Raw Image

  1. Set the "Starting Render Mode" to Raw Image:

    Starting Render Mode: Material Override

  2. Create a Raw Image in your scene (GameObject → UI → Raw Image) and drag and drop it onto the Raw Image field of the NexPlayerRenderController component:

    Set the RawImage field

  3. Start the scene and the video will play on the Raw Image.

Example: Using Material Override

  1. Set the "Starting Render Mode" to Material Override:

    Starting Render Mode: Raw Image

  2. Create a cube in your scene (GameObject → 3D Object → Cube) and drag and drop it onto the Material Override field of the NexPlayerRenderController component:

    Create NexPlayer Simple
Object

  3. Start the scene and the video will play on the cube.

Using NexPlayer

NexPlayer is our full-featured example player. You can use it by following this steps:

1) Play Regular Video

Create the NexPlayer_Manager GameObject by either using the NexPlayer Context Menu at the top or right clicking in the Hierarchy (Object Context Menu).

Quickstart_Step_1


Create the NexPlayer_UI GameObject using the NexPlayer™ Context Menu.

Quickstart_Step_2


Set NexPlayer_Manager references to the UI elements by clicking on the button "Set UI References".

Quickstart_Step_2_1


Create the NexPlayer Samples Controller GameObject using the NexPlayer™ Context Menu.

Quickstart_Step_3


Select any of the different samples provided by NexPlayer™.

Quickstart_Step_3_1


Finally, Change the NexPlayer™ component inside NexPlayer_Manager with the desired stream settings.

2) Play a 360 Scene

Select the value Nex Player 360 for the Active Sample setting at the Samples Controller GameObject.

NexPlayer Video Streaming Player Plugin

3) Load Any NexPlayer™ Sample Demo

Select any of the following samples as the Active Sample setting at the Samples Controller GameObject.

- Raw Image
- Render Texture
- Transparency
- Video Spread
- Material Override
- Multiple Renderers 
- Change Render Mode
- NexPlayer360
- Multistream Raw Image  
- Multistream Render Texture  

Add the Scene to the list and switch to the desired platform.

Platform Build Configuration

The NexPlayer™ Plugin for Unity provides the build configuration window to set the build configuration for each platform in a fast and easy way.

Open the window by clicking in the top context menu NexPlayer/Build Configuration Window.

Build Configuration Window

The window automatically detects and informs of any conflicts regarding the build configuration (graphics API, Internet settings...). The following messages will be shown if the build configuration is correct:

Build Configuration Window correct settings

The following warning will be displayed if the build configuration is not correctly configured. The button will change the configuration automatically:

Build Configuration Window incorrect settings

Frequently Asked Questions

To view the FAQ proceed to the Unity Support Page


Contact

[email protected]
+34 914 184 356
See you also at trade shows around the world!



Nintendo Switch is a trademark of Nintendo.
WebGL, Video Player WebGL, Unity Video Player on WebGL, Unity Video Player, playing video in unity, Play Video in Unity WebGL, HTML5 Video Player for Unity WebGL, Live Video in WebGL, 3D, UnityEngine.Video, UnityEngine.VideoModule, Unity Engine Video, VideoPlayer.renderMode, renderheads/unityplugin, Video Player component - Unity, Web3, web3 gaming and entertainment, blockchain, Cryptocurrency, Playing Video in Unity, Best VR Video Player for Unity, UnityEngine.VideoPlayer, UnityEngine.VideoClip, Metaverse, Advanced video playback for Unity, Unity Asset Store, Immersive 360 video experience, Augmented, Mixed, Virtual Reality, Oculus Quest, Oculus Quest2, Hololense Meta Quest, Gear VR, Google Cardboard, Daydream, HTC Vive Focus, Pico Goblin & Neo, EDM, Electronic Dance Music, Audio PCM data, Audio piping to Unity, Audio Source to Unity, Adding audio to your Unity scene, UWP, Windows, Playback raw PCM, How to play .pcm file, Gets PCM audio data, Unity3D, Amazon IVS Unity.
Unity Xbox video player, Xbox One S, Xbox One X, Series X/S live, Xbox, PCM audio, Playing Video in Unity, Livestreaming the Metaverse, Can Streaming Video Keep Up with the Metaverse? can streaming video survive the metaverse, AR, VR, XR, Amazon Interactive Video Service, timed metadata, embed metadata, metadata, ID3 tags, audio source, audio output, timestamps, HMI - Human Machine interface, infotainment, Automotive.