Integrations & SDKs
Android SDK

Using Your Own Player (Android)

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).

For using a custom player, the implementation should do the following:

  1. Extend their custom player to support the BaseHMPlayer implementation.
  2. Implement the PlayerCallback getPlayer() function

BaseHMPlayer Interface

This code shows the different values and functions in the BaseHMPlayer interface. If you have any questions about this, please contact our team.

Kotlin




Player Callback Interface

This function is how you define whether you want to use a custom, third party player, or the default one. Implement the getPlayer function in the callback to return a custom player. Returning null will result in the SDK using the inbuilt exo player implementation.

Kotlin




Other supporting classes

For your reference, these are other classes which may be helpful with your custom player implementation.

Player Event Listener

Kotlin


Player Error Class

Kotlin


Player Error Type Enum

Kotlin


Player State Enum

Kotlin


Player Progress Data

Kotlin