BMXVoiceAttachment Class Reference

Inherits from BMXFileAttachment :
BMXMessageAttachment :
NSObject
Declared in BMXVoiceAttachment.h

Properties

duration

时长

@property (nonatomic, assign) int duration

Discussion

时长

Declared In

  • BMXVoiceAttachment.h

Instance Methods

initWithData:displayName:fileLength:duration:conversationId:

初始化BMXFileAttachment

- (instancetype)initWithData:(NSData *)*aData* displayName:(NSString *)*displayName* fileLength:(NSInteger)*fileLength* duration:(NSInteger)*duration* conversationId:(NSString *)*conversationId*

Parameters

aData
音频Data

displayName
显示名称

duration
时长

conversationId
会话Id

Discussion

初始化BMXFileAttachment

Declared In

  • BMXVoiceAttachment.h

Example:

initWithPath:displayName:duration:conversationId:

初始化BMXFileAttachment

- (instancetype)initWithPath:(NSString *)*path* displayName:(NSString *)*displayName* duration:(NSInteger)*duration* conversationId:(NSString *)*conversationId*

Parameters

path
音频路径

displayName
显示

duration
时长

Return Value

BMXFileAttachment

Discussion

初始化BMXFileAttachment

Declared In

  • BMXVoiceAttachment.h

Example:

    imageAttachment.pictureSize = CGSizeMake(image.size.width, image.size.height);
    messageObject = [self configMessage:imageAttachment];
    messageObject.contentType = BMXContentTypeImage;
    messageModel.imageRemoteURL = [imageAttachment thumbnailPath];
            
    break;
}
case MessageBodyType_Voice: {
    NSString *voicePath = (NSString *)content;
            
    BMXVoiceAttachment *vocieAttachment = [[BMXVoiceAttachment alloc] initWithPath:voicePath displayName:@"voice" duration:duartion conversationId:[NSString stringWithFormat:@"%ld",(long)self.conversationId]];

© 2019-2022 美信拓扑 | 官网 该文件修订时间: 2022-09-21 11:43:07

results matching ""

    No results matching ""