Skip to content

Commit 70cad51

Browse files
authored
Update hisplayer-api.md
1 parent f01244b commit 70cad51

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

hisplayer-api.md

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -371,126 +371,126 @@ Override this method to add custom logic when an error callback is triggered. Pl
371371
### Non-virtual functions
372372
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 in the Unity scene, for example with buttons, it is needed to create a public function that connects the button with the API.
373373

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

377-
#### protected void Release()
377+
#### void Release()
378378
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.
379379

380-
#### protected void Play(int playerIndex)
380+
#### void Play(int playerIndex)
381381
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.
382382

383-
#### protected void Pause(int playerIndex)
383+
#### void Pause(int playerIndex)
384384
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.
385385

386-
#### protected void Stop(int playerIndex)
386+
#### void Stop(int playerIndex)
387387
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.
388388

389-
#### protected void Seek(int playerIndex, int milliseconds)
389+
#### void Seek(int playerIndex, int milliseconds)
390390
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.
391391

392-
#### protected void SetVolume(int playerIndex, float volume)
392+
#### void SetVolume(int playerIndex, float volume)
393393
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.
394394
Call this API after having interaction with the web page/screen, otherwise audio will not play on WebGL due to browser autoplay policy.
395395

396-
#### protected void ChangeVideoContent(int playerIndex, int urlIndex, int resumePosition = 0 (optional), AdsProperties ads = null (optional))
396+
#### void ChangeVideoContent(int playerIndex, int urlIndex, int resumePosition = 0 (optional), AdsProperties ads = null (optional))
397397
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. The **resumePosition** parameter is optional and is the time position in second(s) where the new content is starting the playback, default value is 0. The **AdsProperties** is an ads properties to use when loading the new content, default value is null.
398398

399-
#### protected void ChangeVideoContent(int playerIndex, string url, int resumePosition = 0 (optional), AdsProperties ads = null (optional))
399+
#### void ChangeVideoContent(int playerIndex, string url, int resumePosition = 0 (optional), AdsProperties ads = null (optional))
400400
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. The **resumePosition** parameter is optional and is the time position in second(s) where the new content is starting the playback, default value is 0. The **AdsProperties** is an ads properties to use when loading the new content, default value is null.
401401

402-
#### protected long GetVideoPosition(int playerIndex)
402+
#### long GetVideoPosition(int playerIndex)
403403
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.
404404

405-
#### protected long GetVideoDuration(int playerIndex)
405+
#### long GetVideoDuration(int playerIndex)
406406
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.
407407

408-
#### protected HISPlayerTrack[] GetTracks(int playerIndex)
408+
#### HISPlayerTrack[] GetTracks(int playerIndex)
409409
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.
410410

411-
#### protected int GetTrackBitrate(int playerIndex, int trackIndex)
411+
#### int GetTrackBitrate(int playerIndex, int trackIndex)
412412
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.
413413

414-
#### protected int GetTrackWidth(int playerIndex, int trackIndex)
414+
#### int GetTrackWidth(int playerIndex, int trackIndex)
415415
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.
416416

417-
#### protected int GetTrackHeight(int playerIndex, int trackIndex)
417+
#### int GetTrackHeight(int playerIndex, int trackIndex)
418418
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.
419419

420-
#### protected int GetVideoWidth(int playerIndex)
420+
#### int GetVideoWidth(int playerIndex)
421421
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.
422422

423-
#### protected int GetVideoHeight(int playerIndex)
423+
#### int GetVideoHeight(int playerIndex)
424424
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.
425425

426-
#### protected int GetTrackID(int playerIndex, int trackIndex)
426+
#### int GetTrackID(int playerIndex, int trackIndex)
427427
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.
428428

429-
#### protected int GetTrackCount(int playerIndex)
429+
#### int GetTrackCount(int playerIndex)
430430
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.
431431

432-
#### protected void SelectTrack(int playerIndex, int trackIndex)
432+
#### void SelectTrack(int playerIndex, int trackIndex)
433433
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.
434434

435-
#### public void EnableCaptions(int playerIndex, bool enabled)
435+
#### void EnableCaptions(int playerIndex, bool enabled)
436436
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.
437437

438-
#### public HISPlayerCaptionTrack[] GetCaptionTrackList(int playerIndex)
438+
#### HISPlayerCaptionTrack[] GetCaptionTrackList(int playerIndex)
439439
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.
440440

441-
#### public int GetCaptionsCount(int playerIndex)
441+
#### int GetCaptionsCount(int playerIndex)
442442
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.
443443

444-
#### public string GetCaptionID(int playerIndex, int ccTrackIndex)
444+
#### string GetCaptionID(int playerIndex, int ccTrackIndex)
445445
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.
446446

447-
#### public string GetCaptionLanguage(int playerIndex, int ccTrackIndex)
447+
#### string GetCaptionLanguage(int playerIndex, int ccTrackIndex)
448448
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.
449449

450-
#### public void SelectCaptionTrack(int playerIndex, int ccTrackIndex)
450+
#### void SelectCaptionTrack(int playerIndex, int ccTrackIndex)
451451
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.
452452

453-
#### public HisPlayerAudioTrack[] GetAudioTrackList(int playerIndex)
453+
#### HisPlayerAudioTrack[] GetAudioTrackList(int playerIndex)
454454
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.
455455

456-
#### public int GetAudioCount(int playerIndex)
456+
#### int GetAudioCount(int playerIndex)
457457
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.
458458

459-
#### public string GetAudioID(int playerIndex, int audioTrackIndex)
459+
#### string GetAudioID(int playerIndex, int audioTrackIndex)
460460
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.
461461

462-
#### protected string GetAudioLanguage(int playerIndex, int audioTrackIndex)
462+
#### string GetAudioLanguage(int playerIndex, int audioTrackIndex)
463463
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.
464464

465-
#### protected void SelectAudioTrack(int playerIndex, int audioTrackIndex)
465+
#### void SelectAudioTrack(int playerIndex, int audioTrackIndex)
466466
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.
467467

468-
#### protected void EnableABR(int playerIndex)
468+
#### void EnableABR(int playerIndex)
469469
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.
470470

471-
#### protected void SetMaxBitrate(int playerIndex, int bitrate)
471+
#### void SetMaxBitrate(int playerIndex, int bitrate)
472472
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.
473473

474-
#### protected void SetMinBitrate(int playerIndex, int bitrate)
474+
#### void SetMinBitrate(int playerIndex, int bitrate)
475475
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.
476476

477-
#### protected void DisableABR(int playerIndex)
477+
#### void DisableABR(int playerIndex)
478478
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.
479479

480-
#### protected bool IsLive(int playerIndex)
480+
#### bool IsLive(int playerIndex)
481481
Returns true if a certain stream is a live 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.
482482

483-
#### protected float GetAdDuration(int playerIndex)
483+
#### float GetAdDuration(int playerIndex)
484484
Get the duration of a certain advertisement in milliseconds (ms). 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.
485485

486-
#### protected float GetAdRemainingTime(int playerIndex)
486+
#### float GetAdRemainingTime(int playerIndex)
487487
Get the remaining time of a certain advertisement in milliseconds (ms). 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.
488488

489-
#### protected float GetAdCurrentTime(int playerIndex)
489+
#### float GetAdCurrentTime(int playerIndex)
490490
Get the current time of a certain advertisement in milliseconds (ms). 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.
491491

492-
#### protected void SetPlaybackSpeedRate(int playerIndex, float speed)
492+
#### void SetPlaybackSpeedRate(int playerIndex, float speed)
493493
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.
494494

495-
#### protected float GetPlaybackSpeedRate(int playerIndex)
495+
#### float GetPlaybackSpeedRate(int playerIndex)
496496
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.

0 commit comments

Comments
 (0)