getMessageOnlineUrl

Introduction

Get media message URL

The urls of all media messages (pictures, videos, voice, files) are empty. Users need to call this api to obtain the corresponding message urls and render them.

Parameter details

Parameter name Parameter type Required Description
msgID String yes message id

Returned template

V2TimValueCallback<V2TimMessageOnlineUrl>

{
    code : int
    desc : String
    data : {
      V2TimImageElem? imageElem;
      V2TimSoundElem? soundElem;
      V2TimVideoElem? videoElem;
      V2TimFileElem? fileElem;
    }
}

Return value details

name type description
code number Request result: Error codes. 0 means success.
desc string The description of the error. It will be empty if success.
data V2TimMessageOnlineUrl The result of media message URL

Code example


V2TimValueCallback < V2TimMessageOnlineUrl > getMessageOnlineUrlRes =
await TencentImSDKPlugin.v2TIMManager
  .getMessageManager()
  .getMessageOnlineUrl(
    msgID: '',
  );
if (getMessageOnlineUrlRes.code == 0) {

}

results matching ""

    No results matching ""