Stream message Elem.
Instance Methods | |
| (void) | - startTTS:succ:fail: |
| (void) | - stopTTS:fail: |
| (V2TIMElem *_Nullable) | - nextElem |
| (void) | - appendElem: |
Properties | |
| NSString * | markdown |
| NSData * | data |
| BOOL | isStreamEnded |
| - (void) startTTS: | (nullable V2TIMTTSVoiceFormat *) | voiceFormat | |
| succ: | (_Nullable V2TIMSucc) | succ | |
| fail: | (startTTS(voiceFormat:succ:fail:)) | NS_SWIFT_NAME | |
Start real-time TTS (Text-to-Speech) synthesis for the current stream message
| voiceFormat | Voice format, optional. Use it to specify voice ID and playback speed. |
| - (void) stopTTS: | (_Nullable V2TIMSucc) | succ | |
| fail: | (stopTTS(succ:fail:)) | NS_SWIFT_NAME | |
Stop TTS synthesis for the current stream message
| - (V2TIMElem * _Nullable) nextElem |
Get the next Elem. If your message has multiple Elems, you can get the next Elem object from the current Elem. If the return value is nil, it means the Elem acquisition is over. For detailed usage, please refer to the document Message sending and receiving
| - (void) appendElem: | (appendElem(elem:)) | NS_SWIFT_NAME |
Add the next element
To configure multiple elements, after creating a Message object, you can add the next element via the element object of Message. The following is the sample code for creating V2TIMTextElem and V2TIMCustomElem:
V2TIMMessage *msg = [[V2TIMManager sharedInstance] createTextMessage:"text"];
V2TIMCustomElem *customElem = [[V2TIMCustomElem alloc] init];
customElem.data = ["自定义消息" dataUsingEncoding:NSUTF8StringEncoding];
[msg.textElem appendElem:customElem];
|
readnonatomicstrong |
Stream message markdown content.
|
readnonatomicstrong |
Stream message binary data.
|
readnonatomicassign |
Whether the stream message has ended.