RevueSDK · Swift reference Guides

Instance Method

sendInvitation(friendId:message:)

送出通話邀請給朋友

@MainActor func sendInvitation(friendId: String, message: String? = nil) throws

Parameters

friendId

對方好友 ID(Base58 字串)

message

撥號時帶的 free-form opaque string(UTF-8 byte 上限 256,由 SDK 不檢查 / native 把關)

Discussion

設計哲學:撥號階段不協商媒體能力(audio/video bitrate 永遠預留 audio=48 / video=3000 kbps)。 「實際是否傳送音視訊」由通話建立後的 LocalParticipant.publish* / sendVideoFrame 控制。 message 為 free-form opaque string、SDK 不解析;上層(業務 App)可自由約定協定 (例:用 "video" / "audio" 標示來電類型,或塞 JSON envelope)。

Throws

FriendCallError(見該型別的對照表)。 常見:.alreadyInCall(-28) / .friendNotReachable(-20) / .noDirectPath(-26) / .messageTooLong(-30) / .invalidArgument(-2)