CometChatAudioBubble is the content view for a MediaMessage if the media sent is an audio.

Methods

MethodsTypeDescription
set(fileURL: String)Stringused to set the audio url for the bubble
set(title: String)Stringa text to display as name of the audio file
set(subTitle: String)Stringa text to display below the name of the audio file
set(style: AudioBubbleStyle)AudioBubbleStyleused to customize appearance of this bubble
set(playIcon: UIImage)UIImagecustomize the icon to display to play the audio

AudioBubbleStyle

AudioBubbleStyle is the class containing methods to customize appearance of this bubble.
MethodsTypeDescription
set(titleColor: UIColor)UIColorused to set title text color of the message
set(titleFont: UIFont)UIFontused to set title font of the message
set(iconTint: UIColor)UIColorused to provide color to the audio play icon
set(background: UIColor)UIColorused to set background color
set(borderColor: UIColor)UIColorused to set a border color
set(borderWidth: CGFloat)CGFloatused to set border
set(cornerRadius: CometChatCornerStyle)CometChatCornerStyleused to set border radius

Usage

//create audio bubble style object
 let audioBubbleStyle = AudioBubbleStyle()

//modify style properties
    audioBubbleStyle.set(background: .black)
        audioBubbleStyle.set(borderWidth: 2.0)
        audioBubbleStyle.set(borderColor: .black)
        audioBubbleStyle.set(cornerRadius: CometChatCornerStyle(cornerRadius: 5.0))
        audioBubbleStyle.set(titleColor: .red)
        audioBubbleStyle.set(titleFont:UIFont.systemFont(ofSize: 12.0))
        audioBubbleStyle.set(iconTint: .darkGray)

   //set style to the audio bubble object
    audioBubble.set(style: audioBubbleStyle)