Integrations & SDKs
iOS SDK

Using Your Own Player (iOS)

HotMicMediaPlayer allows you to integrate your own player into your application. In order do to this, you must:

  • Include the player in your application to be played. (e.g. Bitmovin, JWPlayer, Exo).
  • Use our protocol to forward commands to your player when the HotMic protocol dictates (e.g. pause the player).
  • Send to HotMic various player events (e.g. notify HotMic the player is paused).

The HMPlayer protocol defines variables and functions you must implement in order to provide a custom player. Your implementation must also store a reference to an HMPlayerDelegate and call its functions to inform the delegate when various events occur.

Provide a view to display on-screen.

Swift
ο»Ώ

Provide the playing status.

Swift
ο»Ώ

Provide the paused status.

Swift
ο»Ώ

Provide the seeking status.

Swift
ο»Ώ

Provide the mute status.

Swift
ο»Ώ

Provide the current audio level as a value between 0 and 100.

Swift
ο»Ώ

Provide the total duration in seconds of the VoD stream or infinity if it’s a live stream.

Swift
ο»Ώ

Provide the current playback position in seconds. For a VoD stream, the time ranges between 0 and the duration of the asset. For a live stream, the time is a Unix timestamp denoting the current playback position.

Swift
ο»Ώ

Provide the current playback rate as a value between 0 and 2.

Swift
ο»Ώ

Store the delegate in a weak optional variable to call its functions in the future.

Swift
ο»Ώ

Invoke play.

Swift
ο»Ώ

Invoke pause.

Swift
ο»Ώ

Turn on volume muted.

Swift
ο»Ώ

Turn off volume muted.

Swift
ο»Ώ

Change the audio level.

Swift
ο»Ώ

Seek to the given playback position for the VoD stream.

Swift
ο»Ώ

Seek by the given time shift offset in seconds from the live edge for the live stream, or seek to the current time plus the given time shift offset for the VoD stream. Return an HMPlayerLiveTimeShiftError if the new time shift is too far behind or ahead of the live position.

Swift
ο»Ώ

Seek the live stream to its 'now' playback time.

Swift
ο»Ώ

Change the playback rate. A value between 0 and 1 enables slow motion and a value between 1 and 2 enables fast forward.

Swift
ο»Ώ

Prepare for device rotation to begin.

Swift
ο»Ώ

Handle device rotation ended.

Swift
ο»Ώ

Prepare to enter fullscreen mode.

Swift
ο»Ώ

Prepare to exit fullscreen mode.

Swift
ο»Ώ

Player Delegate

The HMPlayerDelegate protocol defines functions your HMPlayer implementation calls to inform HotMic when various events occur.

Inform the delegate the player invoked play with intention to start/resume playback.

Swift
ο»Ώ

Inform the delegate the player state changed to playing.

Swift
ο»Ώ

Inform the delegate the player state changed to paused.

Swift
ο»Ώ

Inform the delegate the player state changed to buffering.

Swift
ο»Ώ

Inform the delegate the player finished seeking in a live stream by adjusting the time shift.

Swift
ο»Ώ

Inform the delegate the player recovered from a stall due to sufficient buffer.

Swift
ο»Ώ

Inform the delegate the player's playback position changed.

Swift
ο»Ώ

Inform the delegate the player's duration changed.

Swift
ο»Ώ

Inform the delegate the player encountered an error.

Swift
ο»Ώ

ο»Ώ