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