Send emoji reactions

View as Markdown

Send and receive emoji reactions and feedback with the SDK with the MobileRTCMeetingService+Reaction.h category.

let meetingService = MobileRTC.shared().getMeetingService()

To send reactions, first check that reactions are supported in the current meeting. Then, use sendEmojiReaction, which returns a MobileRTCSDKError object.

if (meetingService?.isEmojiReactionEnabled() == true) {
    let error = meetingService?.send(.clap)
    switch error {
    case .success:
        print("Send reaction succeeded.")
    default:
        print("Send error: \(String(describing: error))")
    }
}

Supported emojis and feedback

The MobileRTCEmojiReactionType enum currently supports only these unicode emojis.

  • Clap
  • Thumbsup
  • Heart
  • Joy
  • Openmouth
  • Tada

Emoji feedback is supported, but is done through a separate method.

meetingService?.send(.yes)

These feedback types are supported.

  • MobileRTCEmojiFeedbackType_Yes
  • MobileRTCEmojiFeedbackType_No
  • MobileRTCEmojiFeedbackType_SpeedUp
  • MobileRTCEmojiFeedbackType_SlowDown
  • MobileRTCEmojiFeedbackType_Away

Get reaction and feedback updates

To get updates related to emoji reaction and feedback, implement the relevant callbacks for the MobileRTCMeetingServiceDelegate protocol and set it as the delegate property.

func onEmojiReactionReceived(_ userId: UInt, reactionType type: MobileRTCEmojiReactionType, reactionSkinTone skinTone: MobileRTCEmojiReactionSkinTone) {
    // emoji reaction received: userID=\(userId) type=\(type), SkinTone=\(skinTone)
}

func onEmojiReactionReceived(inWebinar type: MobileRTCEmojiReactionType) {
    // emoji reaction received in webinar: type=\(type)
}

func onEmojiFeedbackReceived(_ userId: UInt, feedbackType type: MobileRTCEmojiFeedbackType) {
    // emoji feedback received: userID=\(userId) type=\(type)
}

func onEmojiFeedbackCanceled(_ userId: UInt) {
    emoji canceled: userID=\(userId)
}

…

meetingService.delegate = self

These callbacks are triggered when any participant sends a reaction or feedback in a meeting with the user ID of the participant who sent or canceled the reaction or feedback. There is also a dedicated callback for when webinar attendees anonymously send reactions.