Skip to content

Latest commit

 

History

History
81 lines (53 loc) · 4.03 KB

import-multi-stream-sample.md

File metadata and controls

81 lines (53 loc) · 4.03 KB

Import HISPlayer MultiStream Sample

Please, download the sample here -> HISPlayer MultiStream 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_MultiStream_Sample.unitypackage

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

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

image

  • Import TextMesh Pro Essential

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

image

  • Open File > Build Settings > Add Open Scenes

image

  • Build and Run

To check how to set up the SDK and API usage, please refer to Assets/HISPlayerMultiStream/Scripts/HISPlayerMultiStreamController.cs and HISPlayerMultiStreamController 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

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.

image

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.

urls