RevueSDK · Swift reference Guides

Instance Method

room(_:participant:didReceiveMessage:)

收到 Room 內參與者訊息

func room(_ room: Room, participant: RemoteParticipant, didReceiveMessage message: String)

Discussion

由 LocalParticipant.publish(message:to:) 送達。觸發條件:

  1. 對方透過 Room 層 API 送訊息

  2. envelope type == “msg” 且格式合法

  3. delta(now - ts)<= 10 秒

  4. 對方 friendId 仍在 Room.remoteParticipants 內

收不到訊息的常見原因: