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:
- Extend their custom player to support the BaseHMPlayer implementation.
- Implement the PlayerCallback getPlayer() function
This code shows the different values and functions in the BaseHMPlayer interface. If you have any questions about this, please contact our team.
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.
For your reference, these are other classes which may be helpful with your custom player implementation.