RevueSDK · Swift reference Guides

Class

LocalParticipant

本地參與者(自己)— 發佈 Track、控制相機/麥克風/螢幕分享

class LocalParticipant

Overview

透過 Room.shared.localParticipant 取得,隨 SDK 初始化就存在。 撥號不在這裡:邀請好友用 Revue.shared.friends.sendInvitation(friendId:message:), 對方接受後以 RemoteParticipant 出現在 Room.shared.remoteParticipants。

let local = Room.shared.localParticipant!

// 開硬體(不 publish)
local.setCamera(enabled: true)
local.setMicrophone(enabled: true)

// 發布給指定的人:每位接收者各發布一次,各得到一份 publication
let videoPub = try await local.publish(videoTrack: local.cameraTrack, to: participantA)
let audioPub = try await local.publish(audioTrack: local.microphoneTrack, to: participantA)

Topics

Instance Properties

Instance Methods

Relationships

Inherits From