Skip to content

Commit 760b1d7

Browse files
Update hisplayer-api.md
1 parent b3d870a commit 760b1d7

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

hisplayer-api.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,21 @@ This event occurs whenever the volume has been modified.
233233
Override this method to add custom logic when **HISPlayerEvent.HISPLAYER_EVENT_END_OF_PLAYLIST** is triggered.
234234
This event occurs whenever an internal playlist reaches the end of the list.
235235

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+
236251
#### protected virtual void EventAutoTransition(HISPlayerCaptionElement subtitlesInfo)
237252
Override this method to add custom logic when **HISPlayerEvent.HISPlayerEvent.HISPLAYER_EVENT_AUTO_TRANSITION** is triggered.
238253
This event occurs when the playback has changed to the next video in the playlist automatically.
@@ -417,9 +432,33 @@ Get the number of tracks of a certain stream. The **playerIndex** is associated
417432
#### protected void SelectTrack(int playerIndex, int trackIndex)
418433
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.
419434

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+
420453
#### protected void EnableABR(int playerIndex)
421454
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.
422455

456+
#### protected void SetMaxBitrate(int playerIndex, int bitrate)
457+
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.
458+
459+
#### protected void SetMinBitrate(int playerIndex, int bitrate)
460+
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.
461+
423462
#### protected void DisableABR(int playerIndex)
424463
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.
425464

0 commit comments

Comments
 (0)