HISPlayer Windows for Unity can play local content the Unity Streaming Assets and the Persistent Data Path (application's path) and absolute path. Streaming assets and persistent data path are supported from HISPlayer SDK v3.4.0. If you use SDK v3.3.0 and below, please refer to this section to play video using Absolute Path.
To use this format, it’s necessary to create a new folder into the Assets folder of Unity named StreamingAssets.
Add the video file inside the StreamingAssets folder and pass the file name (with the extension) to the Multi Stream Properties.
In case that subfolders are created inside StreamingAssets, the path of the file must include the subfolder’s name inside the field of Multi Stream Properties, e.g, with a subfolder named “MyVideos” the following path must be used:
MyVideos/localPlayback.mp4
Prepare a folder where all the HLS manifest files are stored, including the playlists and the segments. Pass the path of manifest file name with the extension (.m3u8) to the Multi Stream Properties. You may pass the master playlist or the media playlist.
If the content is encrypted with AES-128 key, the key file must be stored in the correct location following the #EXT-X-KEY
tag URI in the manifest file.
For example below stream.m3u8 includes the following : #EXT-X-KEY:METHOD=AES-128,URI="key.bin"
. The key file key.bin must exist in the valid path.
The Persistent Data Path is the internal path of the application. Unity allows you to access that folder from the C-sharp code with Application.persistentDataPath.
The returned path on Windows will be: %userprofile%/AppData/LocalLow/<companyname>/<productname>.
The HISPlayer SDK will take this path as the entry point to begin to search the desired local content.
Add the video file that is stored inside the application persistent data path and pass the file name (with the extension) to the Multi Stream Properties. In case that subfolders are created inside Application.persistentDataPath , the path of the file must include the subfolder’s name inside the field of Multi Stream Properties, e.g, with a subfolder named “MyVideos” the following path must be used:
MyVideos/localPlayback.mp4
Make sure all the HLS manifest files are stored in the Application.persistentDataPath, including the playlists and the segments. Pass the path of manifest file name with the extension (.m3u8) to the Multi Stream Properties. You may pass the master playlist or the media playlist.
If the content is encrypted with AES-128 key, the key file must be stored in the correct location following the #EXT-X-KEY
tag URI in the manifest file.
For example below stream.m3u8 includes the following : #EXT-X-KEY:METHOD=AES-128,URI="key.bin"
. The key file key.bin must exist in the valid path.
HISPlayer Windows SDK can play local content using the absolute path. For example : C:/yourVideo.mp4 .
Please input the absolute path where the video file is located to the Multi Stream Properties.