AgoraRtmImageMessage Class Reference

Inherits from AgoraRtmMessage : NSObject
Declared in AgoraRtmKit.h

Overview

The interface for setting and retrieving attributes of an image message. Inherited from AgoraRtmMessage.

  size

The size of the uploaded image in bytes.

@property (nonatomic, assign, readonly) long long size

Declared In

AgoraRtmKit.h

  mediaId

The media ID of the uploaded image.

@property (nonatomic, nonnull, readonly) NSString *mediaId

Discussion

NOTE

  • The media ID is automatically populated once the image is uploaded to the file server.

  • The media ID is valid for 7 days because the file server keeps all uploaded files for 7 days only.

Declared In

AgoraRtmKit.h

  thumbnail

The thumbnail data of the uploaded image.

@property (nonatomic, copy, nonnull) NSData *thumbnail

Discussion

NOTE

The size of thumbnail and fileName combined must not exceed 32 KB.

Declared In

AgoraRtmKit.h

  fileName

The file name of the uploaded image.

@property (nonatomic, copy, nonnull) NSString *fileName

Discussion

NOTE

The size of thumbnail and fileName combined must not exceed 32 KB.

Declared In

AgoraRtmKit.h

  height

The height of the uploaded image.

@property (nonatomic, assign) int height

Discussion

NOTE

  • If the uploaded image is in JPG, JPEG, BMP, or PNG format, the SDK automatically calculates the width and height of the image.

  • Image height that is set by the user overrides the height calculated by the SDK.

  • Is 0 if the SDK does not support the format of the uploaded image.

Declared In

AgoraRtmKit.h

  width

The width of the uploaded image.

@property (nonatomic, assign) int width

Discussion

NOTE

  • If the uploaded image is in JPG, JPEG, BMP, or PNG format, the SDK automatically calculates the width and height of the image.

  • Image width that is set by the user overrides the width calculated by the SDK.

  • Is 0 if the SDK does not support the format of the uploaded image.

Declared In

AgoraRtmKit.h

  thumbnailHeight

The height of the thumbnail.

@property (nonatomic, assign) int thumbnailHeight

Discussion

NOTE

You need to work out the height of the thumbnail by yourself, because the SDK does not work out the value for you.

Declared In

AgoraRtmKit.h

  thumbnailWidth

The width of the thumbnail.

@property (nonatomic, assign) int thumbnailWidth

Discussion

NOTE

You need to work out the width of the thumbnail by yourself, because the SDK does not work out the value for you.

Declared In

AgoraRtmKit.h