Skip to content

Commit eae377e

Browse files
authored
Update hisplayer-api.md
1 parent 2586d98 commit eae377e

File tree

1 file changed

+40
-40
lines changed

1 file changed

+40
-40
lines changed

hisplayer-api.md

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -242,122 +242,122 @@ This error occurs when the Internet connection fails.
242242
### Non-virtual functions
243243
These functions can’t be overridden and they can be used only inside the inherited script. If it’s needed to use some of these functions into the Unity scene, for example with buttons, it is needed to create a public function which connects the button with the API.
244244

245-
#### protected void SetUpPlayer()
245+
#### void SetUpPlayer()
246246
Initialize the player video stream system internally. It is necessary to use this function before anything else.
247247

248-
#### protected void Release()
248+
#### void Release()
249249
Free all resources internally. In the SDK v4.3.0 and below, it's necessary to call this function before changing between Unity scenes or before quitting the application. In the SDK v4.4.0 and above, the release is called automatically when changing scenes or quitting the application and it's not required to call this function.
250250

251-
#### protected void Play(int playerIndex)
251+
#### void Play(int playerIndex)
252252
Play a certain stream giving a **playerIndex**. 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.
253253

254-
#### protected void Pause(int playerIndex)
254+
#### void Pause(int playerIndex)
255255
Pause a certain stream giving a **playerIndex**. 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.
256256

257-
#### protected void Stop(int playerIndex)
257+
#### void Stop(int playerIndex)
258258
Stop a certain stream giving a **playerIndex**. 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.
259259

260-
#### protected void Seek(int playerIndex, long milliseconds)
260+
#### void Seek(int playerIndex, long milliseconds)
261261
Seek a certain stream to a certain time giving a **playerIndex** and the time of the track to be sought in **milliseconds**. The stream is associated with the index of the element of **Multi Stream Properties**, e.g. the index 0 is the element 0 in the list.
262262

263-
#### protected void SetVolume(int playerIndex, float volume)
263+
#### void SetVolume(int playerIndex, float volume)
264264
Modify the volume of a certain stream giving a **playerIndex**. The **volume** of the track value ranges between 0.0f and 1.0f. 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.
265265

266-
#### protected void AddStream(StreamProperties newStream)
266+
#### void AddStream(StreamProperties newStream)
267267
Add a new stream to the list **multiStreamProperties**. The stream must be added using this function instead of changing the list manually.
268268

269-
#### protected void AddVideoContent(int playerIndex, string url, HISPlayerMimeTypes mimeType = HISPlayerMimeTypes.URL_EXTENSION (optional))
269+
#### void AddVideoContent(int playerIndex, string url, HISPlayerMimeTypes mimeType = HISPlayerMimeTypes.URL_EXTENSION (optional))
270270
Add new content to a certain player. If the **enableDRM** variable is true, a video content with an empty license will be added. 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. The **url** is the link to the new video. Please, make sure the string is correct. This function supports local file paths. The **mimeType** parameter is optional and indicates which MIME type will be used for the new url.
271271

272-
#### protected void AddVideoContent(int playerIndex, string url, string keyServerUri, string tokenKey = “” (optional), string tokenValue= “” (optional), HISPlayerMimeTypes mimeType = HISPlayerMimeTypes.URL_EXTENSION (optional))
272+
#### void AddVideoContent(int playerIndex, string url, string keyServerUri, string tokenKey = “” (optional), string tokenValue= “” (optional), HISPlayerMimeTypes mimeType = HISPlayerMimeTypes.URL_EXTENSION (optional))
273273
Add new content to a certain player and its respective key server uri (tokenKey and tokenValue are optional parameters). The enableDRM variable must be true to use this function. 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. The **url** is the link to the new video. The keyServerUri is the token key associated with the URL. Please, make sure the string is correct. The **mimeType** parameter is optional and indicates which MIME type will be used for the new url.
274274

275-
#### protected void ChangeVideoContent(int playerIndex, int urlIndex)
275+
#### void ChangeVideoContent(int playerIndex, int urlIndex)
276276
Change the video’s URL of a certain player. The next playback will start paused if **autoPlay** is disabled. 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. The **urlIndex** is associated with the index of the element in the list of URLs.
277277

278-
#### protected void ChangeVideoContent(int playerIndex, string url)
278+
#### void ChangeVideoContent(int playerIndex, string url)
279279
Change the video’s URL of a certain player given a new URL. The next playback will start paused if **autoPlay** is disabled. 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. The parameter **url** is the link to the new video. Please, make sure the new URL is correctly written. This function supports local file paths.
280280

281-
#### protected void ChangeVideoContent(int playerIndex, string url, HISPlayerMimeTypes mimeType)
281+
#### void ChangeVideoContent(int playerIndex, string url, HISPlayerMimeTypes mimeType)
282282
Change the video’s URL of a certain player given a new URL. The next playback will start paused if **autoPlay** is disabled. 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. The parameter **url** is the link to the new video. Please, make sure the new URL is correctly written. This function supports local file paths. This function will replace the Playlist with the new URL. The **mimeType** indicates which MIME type will be used for the new url.
283283

284-
#### protected void ChangeVideoContent(int playerIndex, string url, string keyServerUri, string token key = “” (optional), string token value= “” (optional), HISPlayerMimeTypes mimeType = HISPlayerMimeTypes.URL_EXTENSION (optional))
284+
#### void ChangeVideoContent(int playerIndex, string url, string keyServerUri, string token key = “” (optional), string token value= “” (optional), HISPlayerMimeTypes mimeType = HISPlayerMimeTypes.URL_EXTENSION (optional))
285285
Change the video’s URL of a certain player given a new URL with DRM protection (tokenKey and tokenValue are optional parameters). The next playback will start paused if **autoPlay** is disabled. 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. The parameter **url** is the link to the new video. The **keyServerUri** is the license key associated with the URL. Please, make sure the parameters are correctly written. This function supports local file paths. The **mimeType** parameter is optional and indicates which MIME type will be used for the new url.
286286

287-
#### protected void RemoveVideoContent(int playerIndex, int urlIndex)
287+
#### void RemoveVideoContent(int playerIndex, int urlIndex)
288288
Remove content from 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. The **urlIndex** is associated with the index of the element in the list of URLs.
289289

290-
#### protected void RemoveStream(int playerIndex)
290+
#### void RemoveStream(int playerIndex)
291291
Remove 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.
292292

293-
#### protected void SetPlaybackSpeedRate(int playerIndex, float speed)
293+
#### void SetPlaybackSpeedRate(int playerIndex, float speed)
294294
Modify the **speed rate** of a certain stream giving a **playerIndex**. The value of the player's speed must be greater (>) than 0.0f and less than or equal (<=) to 8.0f. The default value of player's speed is 1.0f. 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.
295295

296-
#### protected float GetPlaybackSpeedRate(int playerIndex)
296+
#### float GetPlaybackSpeedRate(int playerIndex)
297297
Obtain the **speed rate** 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.
298298

299-
#### protected long GetVideoPosition(int playerIndex)
299+
#### long GetVideoPosition(int playerIndex)
300300
Provides information about the timeline position in milliseconds, of the current video 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.
301301

302-
#### protected long GetVideoDuration(int playerIndex)
302+
#### long GetVideoDuration(int playerIndex)
303303
Provides information about the total duration in milliseconds, of the current video 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.
304304

305-
#### protected HISPlayerTrack[] GetTracks(int playerIndex)
305+
#### HISPlayerTrack[] GetTracks(int playerIndex)
306306
Provides the list of the video tracks of the current video playing on 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.
307307

308-
#### protected int GetTrackBitrate(int playerIndex, int trackIndex)
308+
#### int GetTrackBitrate(int playerIndex, int trackIndex)
309309
Get the bitrate of a certain track 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.
310310

311-
#### protected int GetTrackWidth(int playerIndex, int trackIndex)
311+
#### int GetTrackWidth(int playerIndex, int trackIndex)
312312
Get the width of a certain track 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.
313313

314-
#### protected int GetTrackHeight(int playerIndex, int trackIndex)
314+
#### int GetTrackHeight(int playerIndex, int trackIndex)
315315
Get the height of a certain track 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 of the list.
316316

317-
#### protected int GetVideoWidth(int playerIndex)
317+
#### int GetVideoWidth(int playerIndex)
318318
Get the width of the current track 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.
319319

320-
#### protected int GetVideoHeight(int playerIndex)
320+
#### int GetVideoHeight(int playerIndex)
321321
Get the height of the current track 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.
322322

323-
#### protected int GetTrackID(int playerIndex, int trackIndex)
323+
#### int GetTrackID(int playerIndex, int trackIndex)
324324
Get the ID of a certain track 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.
325325

326-
#### protected int GetTrackCount(int playerIndex)
326+
#### int GetTrackCount(int playerIndex)
327327
Get the number of 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.
328328

329-
#### public void EnableCaptions(int playerIndex, bool enabled)
329+
#### void EnableCaptions(int playerIndex, bool enabled)
330330
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.
331331

332-
#### public HISPlayerCaptionTrack[] GetCaptionTrackList(int playerIndex)
332+
#### HISPlayerCaptionTrack[] GetCaptionTrackList(int playerIndex)
333333
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.
334334

335-
#### public int GetCaptionsCount(int playerIndex)
335+
#### int GetCaptionsCount(int playerIndex)
336336
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.
337337

338-
#### public string GetCaptionID(int playerIndex, int ccTrackIndex)
338+
#### string GetCaptionID(int playerIndex, int ccTrackIndex)
339339
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.
340340

341-
#### public string GetCaptionLanguage(int playerIndex, int ccTrackIndex)
341+
#### string GetCaptionLanguage(int playerIndex, int ccTrackIndex)
342342
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.
343343

344-
#### public void SelectCaptionTrack(int playerIndex, int ccTrackIndex)
344+
#### void SelectCaptionTrack(int playerIndex, int ccTrackIndex)
345345
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.
346346

347-
#### protected void SelectTrack(int playerIndex, int trackIndex)
347+
#### void SelectTrack(int playerIndex, int trackIndex)
348348
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.
349349

350-
#### public HisPlayerAudioTrack[] GetAudioTrackList(int playerIndex)
350+
#### HisPlayerAudioTrack[] GetAudioTrackList(int playerIndex)
351351
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.
352352

353-
#### public int GetAudioCount(int playerIndex)
353+
#### int GetAudioCount(int playerIndex)
354354
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.
355355

356-
#### public string GetAudioID(int playerIndex, int ccTrackIndex)
356+
#### string GetAudioID(int playerIndex, int ccTrackIndex)
357357
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.
358358

359-
#### public string GetAudioLanguage(int playerIndex, int ccTrackIndex)
359+
#### string GetAudioLanguage(int playerIndex, int ccTrackIndex)
360360
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.
361361

362-
#### public void SelectAudioTrack(int playerIndex, int audioTrackIndex)
362+
#### void SelectAudioTrack(int playerIndex, int audioTrackIndex)
363363
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.

0 commit comments

Comments
 (0)