Skip to content

Latest commit

 

History

History
80 lines (52 loc) · 3.96 KB

import-sample.md

File metadata and controls

80 lines (52 loc) · 3.96 KB

Import HISPlayer Sample

Please, download the sample here -> HISPlayer Sample (no need to download it if you have received it in the email).

Importing the package is the same as importing other normal packages in Unity. Select the downloaded package and import it.

  • Assets > Import Package > Custom Package > HISPlayer_Sample.unitypackage

  • Complete the configuration for WebGL -> Configure Unity for WebGL

  • Open the scene Assets/HISPlayerSample/Scenes/HISPlayerSample.unity

image

  • Import TextMesh Pro Essential

  • Input the license key through the Inspector. HISPlayerController GameObject -> HISPlayerController component -> License Key

image

  • Open File > Build Settings > Add Open Scenes

webgl-settings

  • Build and Run

To check how to set up the SDK and API usage, please refer to Assets/HISPlayerSample/Scripts/HISPlayerController.cs and HISPlayerController GameObject in the Editor.

MultiStream UI Demo

The UI components in the sample scene are fully modifiable and each stream has its own UI. The sample is intended to show a comprehensive scene using the HISPlayer SDK to help demonstrate features such as play, pause, seek, etc using the multi stream feature.

image

image

Add/Remove Streams and URLs

In order to add/remove streams and URLs, please refer to the component HISPlayerMultiStreamController attached to the HISPlayerMultiStreamController GameObject in the Inspector.

Add/Remove Streams

You can add/remove streams by pressing the buttons +/- in the Multi Stream Properties list. Once a new stream is added, please, select the render mode and the surface where you want to display your videos (Material, Raw Image or RenderTexture).

streams

render-mode

Change URL

To change the default video URL using your own URL, please replace the element value with your own URL in the URL list of the stream you want to modify.

replace-url

Add/Remove URLs

You can add/remove URLs by selecting one element from the Multi Stream Properties list and then pressing the buttons +/- in the Url list. For changing the content of the videos, please refer to ChangeVideoContent API.

add-url