SDKsuni-app
Create an audio message from a file
OpenIM uni-app / uni-app x SDK guide for Create an audio message from a file.
import { createSoundMessageFromFullPath } from '@/uni_modules/unix-openim-sdk'
const message = await createSoundMessageFromFullPath({ soundPath: '/data/user/0/app/cache/voice.m4a', duration: 8 })Commercial createSoundMessage() uses the structured form. Wait until recording is closed and readable; make duration match the actual media and the contract unit.
Was this page helpful?