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
-
Import TextMesh Pro Essential
-
Input the license key through the Inspector. HISPlayerMultiStreamController GameObject -> HISPlayerMultiStreamController component -> License Key
- Open File > Build Settings > Add Open Scenes
- 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.
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.
In order to add/remove streams and URLs, please refer to the component HISPlayerMultiStreamController attached to the HISPlayerMultiStreamController GameObject in the Inspector.
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).
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.
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.