ZMVideoSDKCmdChannel.h 954 B

1234567891011121314151617181920212223
  1. //
  2. #import <Foundation/Foundation.h>
  3. @class ZMVideoSDKUser;
  4. NS_ASSUME_NONNULL_BEGIN
  5. /**
  6. @brief The command channel allows users to send commands or data (such as plain text or a binary encoded into string) to other users in the same session.
  7. */
  8. @interface ZMVideoSDKCmdChannel : NSObject
  9. /**
  10. @brief Send custom commands or data to other users in the current session.
  11. @Note Limit up to 60 custom commands per second.
  12. @param commandContent the custom commands or data, represented in string format.
  13. @param user An instance of ZMVideoSDKUser associated with the user who receives the command. See {@link ZMVideoSDKUser} If receiver is set to <code>nil</code>, the command is broadcast to all users.
  14. @return ZMVideoSDKErrors_Success if the command sends successfully, otherwise the send command request failed.
  15. */
  16. - (ZMVideoSDKErrors)sendCommand:(NSString *)commandContent receiveUser:(nullable ZMVideoSDKUser *)user;
  17. @end
  18. NS_ASSUME_NONNULL_END