Changelog

Welcome to the HotMic changelog, where we post the versions of the different applications and what was changed. Let us know if you have questions!

Nov 3, 2024 - Android SDK Version 1.9.6

Updates:

  • Added device_idto new_reactionpubnub message. This should resolve the issue of reactions not reflecting in iOS when reacted from Android.

Update Instructions

To update to this version, make sure that your build.gradle(app) includes the following dependency:

implementation 'io.hotmic.player:hotmic-android-sdk:1.9.6'



July 19, 2024 - iOS SDK Version 8.0.0 Developer Preview

NOTE: This is a preview release, feedback is welcome.

Updates:

  • Added HMPollObserving protocol to observe poll data for powering a custom polls interface
  • Added HMParticipantObserving protocol to observe participant data for powering a custom people interface
  • Updated dependencies

Here is more detail on each of those additions.

Poll Observing

To be notified of poll events as they occur, you can implement the HMMediaPlayerPollObserving protocol. Doing so will suppress the provided poll interface, allowing you to build your own interface.

Swift


When polls are fetched initially, the following function is called.

Swift


When a poll is created, the following function is called.

Swift


When a poll is updated, the following function is called.

Swift


When a poll is deleted, the following function is called.

Swift


Submit Poll Response

To respond to a poll from your custom poll interface, call the following function.

Text


Participant Observing

To be notified when the participants changes, you can implement the HMMediaPlayerParticipantObserving protocol. Doing so will suppress the provided people interface, allowing you to build your own interface.

Swift


Each time the participants are changed, the following function is called.

Swift


Update Instructions

To update to this version, run pod update HotMicMediaPlayer.

May 31, 2024 - iOS SDK Version 7.0.0 Developer Preview

NOTE: This is a preview release, feedback is welcome.

Updates:

  • Updated dependencies
  • Resolved an issue where people, tips, and polls sheets did not appear

Update Instructions

To update to this version, run pod update HotMicMediaPlayer.

May 29, 2024 - Android SDK Version 1.9.1-alpha1

Updates:

  • Target/compile sdk version upgraded to Android 34 (from 33)
  • Using the android x library exoplayer in place of the deprecated com.google version
  • Support for vertical video
  • If using custom player, nothing will show on top of the player, including the player control overlay or countdown timer, for both vertical and 16:9 videos

Update Instructions

To update to this version, make sure that your build.gradle(app) includes the following dependency:

implementation 'io.hotmic.player:hotmic-android-sdk:1.9.1-alpha1'

May 20, 2024 - iOS SDK Version 7.0.0 Developer Preview

NOTE: This is a preview release, feedback is welcome.

Features:

  • Added support for full-screen portrait video orientation
  • Replaced updatePollsConfiguration(isAvailable:hasUnansweredPolls:) with updatePollsConfiguration (isAvailable:unansweredPollsCount:)
  • Replaced playerViewControllerChatConfiguration(:) with playerViewController(_:viewControllerForContext:) and playerViewControllerChatHandler(_:)
  • Removed chatHandlerDidTapShowPeople(_:), chatHandlerDidTapShowPolls(_:), and chatHandlerDidTapShowTipping(_:)
  • Added close(), minimizeToPiPIfSupported(), showPeopleIfAvailable(), showPollsIfAvailable(), and showTipOptionsIfAvailable() to HMPlayerViewController
  • Added prefersVideoControlsHidden parameter to initializePlayerViewController(streamID:delegate:supportsMinimizingToPiP:)
  • Replaced playerViewController(_:playerForAssetAt:) with playerViewController(_:playerForOrientation:)
  • Added loadSource(url:), displayImageOverlay(url:), removeImageOverlay(), displayCountdown(date:imageOverlayURL:), and removeCountdown() to HMPlayer

Update Instructions

To update to this version, run pod update HotMicMediaPlayer.

March 7, 2024 - iOS SDK Version 6.0.0

Features:

  • Custom Content Improvements - You can now replace the view area below the player with your own content, completely customizable to you. This brings out of beta our feature from 5.1.0.
  • Added the ability to get data to populate the custom content area with chat information. More details are in the docs with the most relevant section changes listed below.

More Information:

When the player screen will display chat content, the following function is called allowing you to provide a custom chat handler and view controller to display. Provide nilif you'd like to use the default HotMic chat service and UI. Note the handler and view controller can be the same instance of your view controller if it conforms to HMChatHandler.

func playerViewControllerChatConfiguration(_ viewController: HMPlayerViewController) -> HMPlayerViewController.ChatConfiguration { return .init(handler: nil, viewController: nil) }

Chat Handler

The HMChatHandlerprotocol defines functions you implement if you'd like to provide a custom view controller for chat while utilizing the HotMic chat service. Your implementation needs to store a reference to an HMChatHandlerDelegateand call its functions to get information and inform the delegate when various events occur.

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

func setDelegate(_ delegate: HMChatHandlerDelegate) { self.delegate = delegate }

Store the host ID and use it to indicate when a chat was sent by the host.

func setHostID(_ id: String) { self.hostId = id }

Update the configuration of the people feature. Make it accessible in the interface if available. The number of people is provided, allowing you to display this in the interface, for example as a badge on the button.

func updatePeopleConfiguration(isAvailable: Bool, count: Int) { peopleButton.isHidden = !isAvailable peopleButton.badge = count }

Update the configuration of the polls feature. Make it accessible in the interface if available. The state of unanswered polls is provided, allowing you to display an indicator in the interface, for example as an "unread" badge on the button.

func updatePollsConfiguration(isAvailable: Bool, hasUnansweredPolls: Bool) { pollsButton.isHidden = !isAvailable pollsButton.unreadBadge.isHidden = !hasUnansweredPolls }

Update the configuration of the tipping feature. Make it accessible in the interface if available.

func updateTippingConfiguration(isAvailable: Bool) { tippingButton.isHidden = !isAvailable }

Update the top insets of your interface to avoid underlapping other interface elements.

func updateTopContentInset(_ topInset: CGFloat) { tableView.contentInset.top = topInset }

Make the chat input toolbar visible.

func displayChatInputToolbar() becomeFirstResponder() }

Dismiss the chat input toolbar.

func dismissChatInputToolbar() { resignFirstResponder() }

Dismiss the keyboard if it is visible.

func dismissChatInputToolbar() { inputAccessoryView?.textField.resignFirstResponder() }

Handle the backlog of chats and tips to display them in your interface.

func handleBacklog(chats: [HMChat], tips: [HMTip]) { // Update data source... tableView.reloadData() }

Handle new chats, tips, and reactions to insert them into your interface. This function is called periodically to give you the opportunity to handle the pending items. Return true if handled or false if not. If not handled, the same items will be provided in the next invocation.

func handlePending(chats: [HMChat], tips: [HMTip], reactions: [HMChatReaction]) -> Bool { if !chats.isEmpty || !tips.isEmpty { // Update data source... tableView.insertRows(at: newIndexPaths, with: .automatic) } if !reactions.isEmpty { // Update data source, update cell contents, update cell height... } return true }

Remove a chat by ID.

func handleDeletedChat(id: String) { // Update data source... tableView.deleteRows(at: indexPath], with: .automatic) }

Remove a tip by ID.

func handleDeletedTip(id: String) { // Update data source... tableView.deleteRows(at: indexPath], with: .automatic) }

Remove a reaction by chat ID, user ID, and type.

func handleDeletedReaction(chatID: String, userID: String, type: HMChatReactionType) { // Update data source, update cell contents, update cell height... }

Chat Handler Delegate

The HMChatHandlerDelegateprotocol defines functions your HMChatHandlerimplementation calls to get information and inform HotMic when various events occur.

Asks the delegate if the handler can display the chat input toolbar.

override var canBecomeFirstResponder: Bool { delegate?.chatHandlerCanDisplayChatInputToolbar(self) ?? false }

Asks the delegate if the currently authenticated user can moderate another user.

if delegate?.chatHandler(self, canModerateUser: userID) == true { // Display options to block user from chat/tip and delete chat/tip... }

Asks the delegate if the currently authenticated user can make another user a moderator.

if delegate?.chatHandler(self, canMakeUserModerator: userID) == true { // Display option to make user moderator... }

Inform the delegate the handler invoked send chat.

delegate?.chatHandler(self, didTapSendChat: text)

Inform the delegate the handler invoked add reaction.

delegate?.chatHandler(self, didTapAddReaction: reactionType, to: chat.id)

Inform the delegate the handler invoked remove reaction.

delegate?.chatHandler(self, didTapRemoveReaction: reactionType, from: chat.id)

Inform the delegate the handler invoked make user moderator.

delegate?.chatHandler(self, didTapMakeUserModerator: userID)

Inform the delegate the handler invoked report chat.

delegate?.chatHandler(self, didTapReportChat: chat)

Inform the delegate the handler invoked report tip.

delegate?.chatHandler(self, didTapReportTip: tip)

Inform the delegate the handler invoked block user from chat.

delegate?.chatHandler(self, didTapBlockUserFromChat: chat)

Inform the delegate the handler invoked block user from tip.

delegate?.chatHandler(self, didTapBlockUserFromTip: tip)

Inform the delegate the handler invoked delete chat.

delegate?.chatHandler(self, didTapDeleteChat: chat)

Inform the delegate the handler invoked delete tip.

delegate?.chatHandler(self, didTapDeleteTip: tip)

Inform the delegate the handler invoked view a user's profile.

delegate?.chatHandler(self, didTapViewUserProfile: userID)

Inform the delegate the handler invoked the people feature.

delegate?.chatHandlerDidTapShowPeople(self)

Inform the delegate the handler invoked the polls feature.

delegate?.chatHandlerDidTapShowPolls(self)

Inform the delegate the handler invoked the tipping feature.

delegate?.chatHandlerDidTapShowTipping(self)

Get Chat Reactions

You can fetch reaction details for a specific chat. Use this to create an interface that lists people who reacted and which reaction they chose if you provide a custom view controller for chat.

HMMediaPlayer.getReactions(chatID: chat.id) { result in switch result { case .success(let reactions): // Display the list of reactions case .failure(let error): // Handle error } }

Breaking Changes:

  • Replaced playerViewController(:, viewControllerForContext:) with playerViewControllerChatConfiguration(:)
  • Removed HMPlayerViewController.CustomContentContext

How Custom Content Works

We have supported custom content in previous versions, allowing you to implement your own video player to display stream content, in lieu of the HotMic default video player. The code to do that looked something like this:

func playerViewController(_ viewController: HMPlayerViewController, playerForAssetAt url: URL) -> HMPlayer? { return nil }

You can continue to use custom video players as before, but now you can now further customize the content on the player screen. You can now edit the section below the player, which typically includes chat content. To do this, you can provide your own view controller, which means all the content in the view controller (effectively everything below the player) is customized.

The following function is called allowing you to provide a custom view controller to display in a given context. Return nil if you'd like to use the default view controller.

func playerViewController(_ viewController: HMPlayerViewController, viewControllerForContext context: HMPlayerViewController.CustomContentContext) -> UIViewController? { return nil }

At this time, this feature should be considered beta. You can add your own content to the view controller, but don't have information from HotMic (yet) to reproduce all existing features. In an upcoming release, you will get an interface to interact with data from the stream. This includes chats, reactions, and more. This will allow you to build a completely alternate interface with all the features of the default HotMic provided view controller.

Update Instructions

To update to this version, run pod update HotMicMediaPlayer.

Feb 23, 2024 - Android SDK Version 1.9.0-alpha1

Features:

  • Custom Content Improvements (Beta) - You can now replace the view area below the player with your own content, completely customizable to you.

How Custom Content Works

We have supported custom content in previous versions, allowing you to implement your own video player to display stream content, in lieu of the HotMic default video player. This still exists. Now, the SDK will allow you to replace the default chat fragment shown under the player with your own custom fragment. For this, while calling the player, provide a custom fragment using the api setChatFragment. A sample builder call will look something like:

val builder = HotMicPlayer.Builder(this) .setUICallback(playerUiHandler) .setStreamId(streamId) .enableTroubleshootOption() .credential("d34seae5-121b-4r3b-a55c-2d7s34mbfwe3") .setChatFragment(DummyChatFragment()) .show(R.id.player_fragment_container)

At this time, this feature should be considered alpha. You can add your own fragment, but don't have information from HotMic (yet) to reproduce all existing features. In an upcoming release, you will get an interface to interact with data from the stream. This includes chats, reactions, and more. This will allow you to build a completely alternate interface with all the features of the default HotMic provided fragment.

Upcoming releases will complete the ability to customize this view, including:

  • Allowing you to have you own layout, and specify where the player, chat and other fragments should be shown. For example, you can choose to remove the chat fragment OR place the player fragment in a separate area of the screen OR shrink the chat layout and introduce a new custom panel in between.
  • We will expose the chat apis and related data, using which, you can build and style your own custom chat fragment.

Update Instructions

To update to this version, make sure that your build.gradle(app) includes the following dependency:

implementation 'io.hotmic.player:hotmic-android-sdk:1.9.0-alpha1'

February 14, 2024 - iOS SDK Version 5.1.0

Features:

  • Custom Content Improvements (Beta) - You can now replace the view area below the player with your own content, completely customizable to you.

Improvement:

  • Now built from Xcode 15 (supporting iOS 17). You may need to use Xcode 15 to use this version of the SDK.
  • Several dependencies were updated to improve performance and reduce bugs.

How Custom Content Works

We have supported custom content in previous versions, allowing you to implement your own video player to display stream content, in lieu of the HotMic default video player. The code to do that looked something like this:

func playerViewController(_ viewController: HMPlayerViewController, playerForAssetAt url: URL) -> HMPlayer? { return nil }

You can continue to use custom video players as before, but now you can now further customize the content on the player screen. You can now edit the section below the player, which typically includes chat content. To do this, you can provide your own view controller, which means all the content in the view controller (effectively everything below the player) is customized.

The following function is called allowing you to provide a custom view controller to display in a given context. Return nil if you'd like to use the default view controller.

func playerViewController(_ viewController: HMPlayerViewController, viewControllerForContext context: HMPlayerViewController.CustomContentContext) -> UIViewController? { return nil }

At this time, this feature should be considered beta. You can add your own content to the view controller, but don't have information from HotMic (yet) to reproduce all existing features. In an upcoming release, you will get an interface to interact with data from the stream. This includes chats, reactions, and more. This will allow you to build a completely alternate interface with all the features of the default HotMic provided view controller.

Update Instructions

To update to this version, run pod update HotMicMediaPlayer.