Skip to content

Commit f01244b

Browse files
authored
Merge pull request #10 from HISPlayer/release/4.9.0
Release/4.9.0
2 parents 0bc2e7c + 8acdef0 commit f01244b

File tree

5 files changed

+88
-4
lines changed

5 files changed

+88
-4
lines changed

assets/ads-properties.jpg

52.5 KB
Loading

assets/ads-properties.png

62.5 KB
Loading

hisplayer-api.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,18 @@ The following public APIs are provided by **HISPlayerManager**
106106
* **public int width**: Width of the track.
107107
* **public int height**: Height of the track.
108108
* **public int framerate**: Framerate of the track in frames per second.
109+
110+
* **public struct HISPlayerCaptionTrack**:
111+
* **public string id**: Id of the caption
112+
* **public string language**: Language of the caption
113+
114+
* **public struct HisPlayerAudioTrack**:
115+
* **public string id**: Id of the audio
116+
* **public string caption**: Language of the audio
117+
118+
* **public struct HISPlayerCaptionElement**: The information of the triggered event turns into caption’s format.
119+
* **public int playerIndex**: The index of the player where the event is triggered.
120+
* **public string language**: The next generated caption text.
109121

110122
* **public enum LogLevel**: The current logging level to filter which log messages are output.
111123
* **ERROR** : Indicates critical errors that may prevent the application from functioning correctly.
@@ -221,6 +233,21 @@ This event occurs whenever the volume has been modified.
221233
Override this method to add custom logic when **HISPlayerEvent.HISPLAYER_EVENT_END_OF_PLAYLIST** is triggered.
222234
This event occurs whenever an internal playlist reaches the end of the list.
223235

236+
#### protected virtual void EventTextRender(HISPlayerCaptionElement subtitlesInfo)
237+
Override this method to add custom logic when **HISPlayerEvent.HISPLAYER_EVENT_TEXT_RENDER** is triggered.
238+
This event occurs whenever a caption’s text has been generated.
239+
240+
<table>
241+
<tr>
242+
<th>Name</th>
243+
<th>Description</th>
244+
</tr>
245+
<tr>
246+
<td>caption</td>
247+
<td>The next generated caption text.</td>
248+
</tr>
249+
</table>
250+
224251
#### protected virtual void EventAutoTransition(HISPlayerCaptionElement subtitlesInfo)
225252
Override this method to add custom logic when **HISPlayerEvent.HISPlayerEvent.HISPLAYER_EVENT_AUTO_TRANSITION** is triggered.
226253
This event occurs when the playback has changed to the next video in the playlist automatically.
@@ -405,9 +432,48 @@ Get the number of tracks of a certain stream. The **playerIndex** is associated
405432
#### protected void SelectTrack(int playerIndex, int trackIndex)
406433
Select a certain track of a certain stream to be used as the main track. This action will disable ABR, to enable it again you can use **EnableABR** API. The possible tracks can be obtained from the tracks returned from the method GetTracks. The **playerIndex** is associated with the index of the element of **Multi Stream Properties**, e.g. the index 0 is the element 0 in the list.
407434

435+
#### public void EnableCaptions(int playerIndex, bool enabled)
436+
Enables the captions of the stream. The **playerIndex** is associated with the index of the element of **Multi Stream Properties**, e.g. the index 0 is the element 0 in the list.
437+
438+
#### public HISPlayerCaptionTrack[] GetCaptionTrackList(int playerIndex)
439+
Provide information about all the captions of a certain stream. The **playerIndex** is associated with the index of the element of **Multi Stream Properties**, e.g. the index 0 is the element 0 in the list.
440+
441+
#### public int GetCaptionsCount(int playerIndex)
442+
Obtain the number of captions of a certain stream. The **playerIndex** is associated with the index of the element of **Multi Stream Properties**, e.g. the index 0 is the element 0 in the list.
443+
444+
#### public string GetCaptionID(int playerIndex, int ccTrackIndex)
445+
Obtain the ID of a certain caption of a certain player. The **playerIndex** is associated with the index of the element of **Multi Stream Properties**, e.g. the index 0 is the element 0 in the list.
446+
447+
#### public string GetCaptionLanguage(int playerIndex, int ccTrackIndex)
448+
Obtain the language of a certain caption of a certain player. The **playerIndex** is associated with the index of the element of **Multi Stream Properties**, e.g. the index 0 is the element 0 in the list.
449+
450+
#### public void SelectCaptionTrack(int playerIndex, int ccTrackIndex)
451+
Select a certain caption of a certain stream to be used. Before using this functions is recommended to use GetCaptionTrackList in order to know all the information about the captions. The **playerIndex** is associated with the index of the element of **Multi Stream Properties**, e.g. the index 0 is the element 0 in the list.
452+
453+
#### public HisPlayerAudioTrack[] GetAudioTrackList(int playerIndex)
454+
Provide information about all the audio tracks of a certain stream. The **playerIndex** is associated with the index of the element of **Multi Stream Properties**, e.g. the index 0 is the element 0 in the list.
455+
456+
#### public int GetAudioCount(int playerIndex)
457+
Obtain the number of audio of a certain stream. The **playerIndex** is associated with the index of the element of **Multi Stream Properties**, e.g. the index 0 is the element 0 in the list.
458+
459+
#### public string GetAudioID(int playerIndex, int audioTrackIndex)
460+
Obtain the ID of a certain audio of a certain player. The **playerIndex** is associated with the index of the element of **Multi Stream Properties**, e.g. the index 0 is the element 0 in the list.
461+
462+
#### protected string GetAudioLanguage(int playerIndex, int audioTrackIndex)
463+
Obtain the language of a certain audio of a certain player. The **playerIndex** is associated with the index of the element of **Multi Stream Properties**, e.g. the index 0 is the element 0 in the list.
464+
465+
#### protected void SelectAudioTrack(int playerIndex, int audioTrackIndex)
466+
Select a certain audio-track of a certain stream to be used. Before using this functions is recommended to use GetAudioTrackList in order to know all the information about the audio-tracks. The **playerIndex** is associated with the index of the element of **Multi Stream Properties**, e.g. the index 0 is the element 0 in the list.
467+
408468
#### protected void EnableABR(int playerIndex)
409469
Enables the ABR to change automatically between tracks. The **playerIndex** is associated with the index of the element of **Multi Stream Properties**, e.g. the index 0 is the element 0 in the list.
410470

471+
#### protected void SetMaxBitrate(int playerIndex, int bitrate)
472+
Set a new maximum bitrate (in bits per second) of a specific track. This doesn’t disable ABR. The possible tracks can be obtained from the tracks returned from the method GetTracks. The **playerIndex** is associated with the index of the element of **Multi Stream Properties**, e.g. the index 0 is the element 0 in the list.
473+
474+
#### protected void SetMinBitrate(int playerIndex, int bitrate)
475+
Set a new minimum bitrate (in bits per second) of a specific track. This doesn’t disable ABR. The possible tracks can be obtained from the tracks returned from the method GetTracks. The **playerIndex** is associated with the index of the element of **Multi Stream Properties**, e.g. the index 0 is the element 0 in the list.
476+
411477
#### protected void DisableABR(int playerIndex)
412478
Disables the ABR to prevent the player from changing tracks regardless of bandwidth. The **playerIndex** is associated with the index of the element of **Multi Stream Properties**, e.g. the index 0 is the element 0 in the list.
413479

releases.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# HISPlayer Unity WebGL SDK Release Notes
22

3+
### Version 4.9.0
4+
##### July 10, 2025
5+
- [**Added**] Added GetCaptionTrackList, GetCaptionCount, GetCaptionID, GetCaptionLanguage, EnableCaptions, SelectCaptionTrack APIs to get and select different caption tracks.
6+
- [**Added**] Added GetAudioTrackList, GetAudioCount, GetAudioID, GetAudioLanguage, SelectAudioTrack APIs to get and select different audio tracks.
7+
8+
### Version 4.8.0
9+
##### July 7, 2025
10+
- [**Improvement**] Enhancement to InspectorGUI to dynamically show/hide certain options.
11+
- [**Added**] StartingBitrate moved from the general settings to the settings of each individual stream
12+
- [**Added**] Added TrackBitrateRange to select the bitrate range allowed in each stream
13+
- [**Added**] Added ResolutionMaxSize to select the resolution max size allowed in each stream
14+
- [**Added**] Added ResolutionMinSize to select the resolution min size allowed in each stream
15+
- [**Added**] Added SetMaxABRResolution and SetMinABRResolution to change the resolution settings allowed by the ABR in runtime
16+
317
### Version 4.7.0
418
##### March 3, 2025
519
- [**Added**] GetPlaybackSpeedRate and SetPlaybackSpeedRate APIs

setup-guide.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ You can also use the **Resources > Materials > HISPlayerDefaultMaterial.mat** we
119119

120120
<p align="center">
121121
<img width=37% alt="image" src="https://github.com/HISPlayer/UnityAndroid-SDK/assets/47497948/eacab2a8-7cee-4218-add9-98672f250540">
122-
<img width=45% alt="image" src="https://github.com/HISPlayer/UnityWebGL-SDK/assets/47497948/ffe0ea80-d66b-4fac-beb0-01152bce200e">
122+
<img width=45% alt="image" src="https://github.com/user-attachments/assets/b27744d4-1f21-4237-ae1c-e241a022f8d4" />
123123
</p>
124124

125125
### <ins>Raw Image</ins>
@@ -128,7 +128,7 @@ This action will be related to Unity’s Canvas. If there is not a Canvas create
128128
For the creation, select **GameObject > UI > Raw Image**. Once it is created, attach it to the stream controller component
129129

130130
<p align="center">
131-
<img width="600" alt="image" src="https://github.com/HISPlayer/UnityWebGL-SDK/assets/47497948/5dcc7a3f-7de5-4e87-a5e3-3e08587360b4">
131+
<img width="819" height="597" alt="image" src="https://github.com/user-attachments/assets/fda93ea3-72a7-4142-ad81-f93f0ce002a7" />
132132
</p>
133133

134134
### <ins>RenderTexture</ins>
@@ -139,7 +139,7 @@ For creating it from zero, select **Assets > Create > Render Texutre** and then
139139
Once all this process it’s done, associate the **RenderTexture** to the script component.
140140

141141
<p align="center">
142-
<img src="https://github.com/HISPlayer/UnityiOS-SDK/assets/47497948/a0f26bc1-c7b1-432e-ad87-1a2d203d32c8">
142+
<img width="824" height="596" alt="image" src="https://github.com/user-attachments/assets/41154693-08aa-4d74-8a70-c5a587723d37" />
143143
</p>
144144

145145
## 2.3 Configure HISPlayer Properties
@@ -166,9 +166,13 @@ Use Multi Stream Properties to set all the configuration needed for multi stream
166166
* <span style="color:blue">**LoopPlayback**</span>: Loop the current playback. It's true by default.
167167
* <span style="color:blue">**AutoTransition**</span>: Change the playback to the next video in the playlist. This action won't have effect when loopPlayback is true. It's false by default.
168168
* <span style="color:blue">**AdsProperties**</span>: List of properties to configure advertisement insertions for each player in the scene. For more information, please refer to [**Playing Ads**](./playing-ads.md)
169+
* <span style="color:blue">**Starting Bitrate**</span>: The bitrate in bps the player will try to start playing. Setting it to 0 will make the player start with the lowest track.
170+
* <span style="color:blue">**Track Bitrate Range**</span>: Limits the tracks by bitrate range. X = Minimum bitrate, Y = Maximum bitrate (in bps).
171+
* <span style="color:blue">**Resolution Max Size**</span>: Limits the tracks by maximum resolution. X = Max width (px), Y = Max height (px).
172+
* <span style="color:blue">**Resolution Min Size**</span>: Limits the tracks by minimum resolution. X = Min width (px), Y = Min height (px).
169173

170174
<p align="center">
171-
<img src="https://github.com/HISPlayer/UnityAndroid-SDK/assets/32887298/a6cddeab-c0d2-4607-b14f-1cbaf97db56c">
175+
<img width="776" height="748" alt="image" src="https://github.com/user-attachments/assets/429d95d0-bd09-4759-b9e0-7f217d3c7247" />
172176
</p>
173177

174178
## 2.4 Build and Run

0 commit comments

Comments
 (0)