meeting オブジェクトは、RealtimeKit セッションとやり取りするための中核インターフェイスです。参加者、ローカルユーザーの操作、チャット、投票、プラグインなどへアクセスできます。このオブジェクトは、SDK を初期化したときに返されます。
このガイドでは、meeting オブジェクト上の主要な名前空間と、よく使うプロパティ、メソッド、イベントを説明します。各名前空間の詳細は、リンク先のリファレンスを参照してください。
meeting オブジェクトには、ミーティングの各側面を整理する複数のプロパティがあります。
meeting.self ↗ は、ミーティング内のローカルユーザー(自分)を表します。自分の音声、動画、画面共有を操作するためのプロパティとメソッドを提供します。
主なプロパティ:
// Participant identifiers
meeting.self.id; // Peer ID (unique per session)
meeting.self.userId; // Participant ID (persistent across sessions)
meeting.self.name; // Participant display name
// Media state
meeting.self.audioEnabled; // Boolean: Is audio enabled?
meeting.self.videoEnabled; // Boolean: Is video enabled?
meeting.self.screenShareEnabled; // Boolean: Is screen share active?
// Media tracks
meeting.self.audioTrack; // Audio MediaStreamTrack, if audio is enabled
meeting.self.videoTrack; // Video MediaStreamTrack, if video is enabled
meeting.self.screenShareTracks; // Structure: { audio: MediaStreamTrack, video: MediaStreamTrack }, if screen share is enabled
// Room state
meeting.self.roomJoined; // Boolean: Has joined the meeting?
meeting.self.roomState; // Current room stateよく使うメソッド:
// Media controls
await meeting.self.enableAudio(); // Emits a `audioUpdate` event on `meeting.self` when successful.
await meeting.self.disableAudio(); // Emits a `audioUpdate` event on `meeting.self` when successful.
await meeting.self.enableVideo(); // Emits a `videoUpdate` event on `meeting.self` when successful.
await meeting.self.disableVideo(); // Emits a `videoUpdate` event on `meeting.self` when successful.
await meeting.self.enableScreenShare(); // Emits a `screenShareUpdate` event on `meeting.self` when successful.
await meeting.self.disableScreenShare(); // Emits a `screenShareUpdate` event on `meeting.self` when successful.
// Update Name
await meeting.self.setName("New Name"); // setName works only works before joining the meeting
// List Devices
await meeting.self.getAllDevices(); // Returns all available devices
await meeting.self.getAudioDevices(); // Returns all available audio devices
await meeting.self.getVideoDevices(); // Returns all available video devices
await meeting.self.getSpeakerDevices(); // Returns all available speaker devices
await meeting.self.getCurrentDevices(); // {audio: MediaDevice, video: MediaDevice, speaker: MediaDevice} Returns the current device configuration
// Change a device
await meeting.self.setDevice((await meeting.self.getAllDevices())[0]);meeting.self ↗ は、ミーティング内のローカルユーザー(自分)を表します。自分の音声、動画、画面共有を操作するためのプロパティとメソッドを提供します。
主なプロパティ:
// Participant identifiers
meeting.self.id; // Peer ID (unique per session)
meeting.self.userId; // Participant ID (persistent across sessions)
meeting.self.name; // Participant display name
// Media state
meeting.self.audioEnabled; // Boolean: Is audio enabled?
meeting.self.videoEnabled; // Boolean: Is video enabled?
meeting.self.screenShareEnabled; // Boolean: Is screen share active?
// Media tracks
meeting.self.audioTrack; // Audio MediaStreamTrack, if audio is enabled
meeting.self.videoTrack; // Video MediaStreamTrack, if video is enabled
meeting.self.screenShareTracks; // Structure: { audio: MediaStreamTrack, video: MediaStreamTrack }, if screen share is enabled
// Room state
meeting.self.roomJoined; // Boolean: Has joined the meeting?
meeting.self.roomState; // Current room stateよく使うメソッド:
// Media controls
await meeting.self.enableAudio(); // Emits a `audioUpdate` event on `meeting.self` when successful.
await meeting.self.disableAudio(); // Emits a `audioUpdate` event on `meeting.self` when successful.
await meeting.self.enableVideo(); // Emits a `videoUpdate` event on `meeting.self` when successful.
await meeting.self.disableVideo(); // Emits a `videoUpdate` event on `meeting.self` when successful.
await meeting.self.enableScreenShare(); // Emits a `screenShareUpdate` event on `meeting.self` when successful.
await meeting.self.disableScreenShare(); // Emits a `screenShareUpdate` event on `meeting.self` when successful.
// Update Name
await meeting.self.setName("New Name"); // setName works only works before joining the meeting
// List Devices
await meeting.self.getAllDevices(); // Returns all available devices
await meeting.self.getAudioDevices(); // Returns all available audio devices
await meeting.self.getVideoDevices(); // Returns all available video devices
await meeting.self.getSpeakerDevices(); // Returns all available speaker devices
await meeting.self.getCurrentDevices(); // {audio: MediaDevice, video: MediaDevice, speaker: MediaDevice} Returns the current device configuration
// Change a device
await meeting.self.setDevice((await meeting.self.getAllDevices())[0]);meeting.self ↗ は、ミーティング内のローカルユーザー(自分)を表します。自分の音声、動画、画面共有を操作するためのプロパティとメソッドを提供します。
主なプロパティ:
// Participant identifiers
meeting.self.id; // Peer ID (unique per session)
meeting.self.userId; // Participant ID (persistent across sessions)
meeting.self.name; // Participant display name
// Media state
meeting.self.audioEnabled; // Boolean: Is audio enabled?
meeting.self.videoEnabled; // Boolean: Is video enabled?
meeting.self.screenShareEnabled; // Boolean: Is screen share active?
// Media tracks
meeting.self.audioTrack; // Audio MediaStreamTrack, if audio is enabled
meeting.self.videoTrack; // Video MediaStreamTrack, if video is enabled
meeting.self.screenShareTracks; // Structure: { audio: MediaStreamTrack, video: MediaStreamTrack }, if screen share is enabled
// Room state
meeting.self.roomJoined; // Boolean: Has joined the meeting?
meeting.self.roomState; // Current room stateよく使うメソッド:
// Media controls
await meeting.self.enableAudio(); // Emits a `audioUpdate` event on `meeting.self` when successful.
await meeting.self.disableAudio(); // Emits a `audioUpdate` event on `meeting.self` when successful.
await meeting.self.enableVideo(); // Emits a `videoUpdate` event on `meeting.self` when successful.
await meeting.self.disableVideo(); // Emits a `videoUpdate` event on `meeting.self` when successful.
await meeting.self.enableScreenShare(); // Emits a `screenShareUpdate` event on `meeting.self` when successful.
await meeting.self.disableScreenShare(); // Emits a `screenShareUpdate` event on `meeting.self` when successful.
// Update Name
await meeting.self.setName("New Name"); // setName works only works before joining the meeting
// List Devices
await meeting.self.getAllDevices(); // Returns all available devices
await meeting.self.getAudioDevices(); // Returns all available audio devices
await meeting.self.getVideoDevices(); // Returns all available video devices
await meeting.self.getSpeakerDevices(); // Returns all available speaker devices
await meeting.self.getCurrentDevices(); // {audio: MediaDevice, video: MediaDevice, speaker: MediaDevice} Returns the current device configuration
// Change a device
await meeting.self.setDevice((await meeting.self.getAllDevices())[0]);meeting.localUser は、ミーティング内のローカルユーザー(自分)を表します。自分の音声、動画、画面共有を操作するためのプロパティとメソッドを提供します。
主なプロパティ:
// Participant identifiers
meeting.localUser.id // ID of the local user participant
meeting.localUser.userId // Persistent user ID across sessions
meeting.localUser.name // Name of the local user
meeting.localUser.picture // URL to the picture of the local user (optional)
meeting.localUser.customParticipantId // User provided participant ID (optional)
meeting.localUser.permissions // Permissions related to various capabilities within a meeting context for the local user
// Media state
meeting.localUser.audioEnabled // Boolean: Is audio currently enabled for the local user
meeting.localUser.videoEnabled // Boolean: Is video currently enabled for the local user
meeting.localUser.screenShareEnabled // Boolean: Is screenshare currently enabled for the local user
meeting.localUser.isCameraPermissionGranted // Boolean: Does local user have access to device Camera permission
meeting.localUser.isMicrophonePermissionGranted // Boolean: Does local user have access to device Microphone permission
// Participant metadata
meeting.localUser.isHost // Boolean: Is the local user the host
meeting.localUser.isPinned // Boolean: Is the local user pinned
meeting.localUser.flags // Participant flags (recorder, hiddenParticipant, webinarHiddenParticipant)
// Preset Info
meeting.localUser.presetName // String value representing name of preset for local user
meeting.localUser.presetInfo // Typed object representing the preset information for local user
meeting.localUser.designToken // Design token for UI customization
// Stage and room state
meeting.localUser.stageStatus // Stage status of the local user
meeting.localUser.roomJoined // Boolean: Has local user joined the room
meeting.localUser.waitListStatus // Waitlist status of the local user (NONE, WAITING, ACCEPTED, or REJECTED)よく使うメソッド:
// Get local user video view
meeting.localUser.getSelfPreview() // Returns a VideoView that can be added to any ViewGroup in Android
// Update Name
meeting.localUser.setDisplayName("New Name") // Name change is visible only if it occurs before joinRoom() and after init()
// Mute/Unmute Audio
meeting.localUser.disableAudio { error: AudioError? -> }
meeting.localUser.enableAudio { error: AudioError? -> }
// Enable/Disable Video
meeting.localUser.disableVideo { error: VideoError? -> }
meeting.localUser.enableVideo { error: VideoError? -> }
// Enable/Disable Screenshare
meeting.localUser.canEnableScreenShare() // Check if screenshare can be enabled
val error: ScreenShareError? = meeting.localUser.enableScreenShare() // Returns error if fails, null if successful
meeting.localUser.disableScreenShare()
// Device management
val audioDevices = meeting.localUser.getAudioDevices() // Get all available audio devices
val videoDevices = meeting.localUser.getVideoDevices() // Get all available video devices
meeting.localUser.setAudioDevice(audioDevices[0]) // Switch audio device
meeting.localUser.setVideoDevice(videoDevices[0]) // Switch video device
val selectedAudio = meeting.localUser.getSelectedAudioDevice() // Get currently selected audio device
val selectedVideo = meeting.localUser.getSelectedVideoDevice() // Get currently selected video device
meeting.localUser.switchCamera() // Switch between front and back camera
// Stage permissions
meeting.localUser.canJoinStage() // Check if local user can join stage
meeting.localUser.canRequestToJoinStage() // Check if local user can request to join stage
// Host controls
meeting.localUser.canDoParticipantHostControls() // Check if local user can perform host controls
// Setup screen
meeting.localUser.shouldShowSetupScreen() // Check if setup screen should be shown
meeting.localUser.shouldJoinMediaRoom() // Check if local user should join media roommeeting.localUser は、ミーティング内のローカルユーザー(自分)を表します。自分の音声、動画、画面共有を操作するためのプロパティとメソッドを提供します。
主なプロパティ:
// Participant identifiers
meeting.localUser.id // ID of the local user participant
meeting.localUser.userId // Persistent user ID across sessions
meeting.localUser.name // Name of the local user
meeting.localUser.picture // URL to the picture of the local user (optional)
meeting.localUser.customParticipantId // User provided participant ID (optional)
meeting.localUser.permissions // Permissions related to various capabilities within a meeting context for the local user
// Media state
meeting.localUser.audioEnabled // Boolean: Is audio currently enabled for the local user
meeting.localUser.videoEnabled // Boolean: Is video currently enabled for the local user
meeting.localUser.screenShareEnabled // Boolean: Is screenshare currently enabled for the local user
meeting.localUser.isCameraPermissionGranted // Boolean: Does local user have access to device Camera permission
meeting.localUser.isMicrophonePermissionGranted // Boolean: Does local user have access to device Microphone permission
// Participant metadata
meeting.localUser.isHost // Boolean: Is the local user the host
meeting.localUser.isPinned // Boolean: Is the local user pinned
meeting.localUser.flags // Participant flags (recorder, hiddenParticipant, webinarHiddenParticipant)
// Preset Info
meeting.localUser.presetName // String value representing name of preset for local user
meeting.localUser.presetInfo // Typed object representing the preset information for local user
meeting.localUser.designToken // Design token for UI customization
// Stage and room state
meeting.localUser.stageStatus // Stage status of the local user
meeting.localUser.roomJoined // Boolean: Has local user joined the room
meeting.localUser.waitListStatus // Waitlist status of the local user (.none, .waiting, .accepted, or .rejected)よく使うメソッド:
// Get local user video view
meeting.localUser.getSelfPreview() // Returns a VideoView (UIView) for iOS
// Update Name
meeting.localUser.setDisplayName("New Name") // Name change is visible only if it occurs before joinRoom() and after init()
// Mute/Unmute Audio
meeting.localUser.disableAudio { error in }
meeting.localUser.enableAudio { error in }
// Enable/Disable Video
meeting.localUser.disableVideo { error in }
meeting.localUser.enableVideo { error in }
// Enable/Disable Screenshare
meeting.localUser.canEnableScreenShare() // Check if screenshare can be enabled
let error: ScreenShareError? = meeting.localUser.enableScreenShare() // Returns error if fails, nil if successful
meeting.localUser.disableScreenShare()
// Device management
let audioDevices = meeting.localUser.getAudioDevices() // Get all available audio devices
let videoDevices = meeting.localUser.getVideoDevices() // Get all available video devices
meeting.localUser.setAudioDevice(audioDevices[0]) // Switch audio device
meeting.localUser.setVideoDevice(videoDevices[0]) // Switch video device
let selectedAudio = meeting.localUser.getSelectedAudioDevice() // Get currently selected audio device
let selectedVideo = meeting.localUser.getSelectedVideoDevice() // Get currently selected video device
meeting.localUser.switchCamera() // Switch between front and back camera
// Stage permissions
meeting.localUser.canJoinStage() // Check if local user can join stage
meeting.localUser.canRequestToJoinStage() // Check if local user can request to join stage
// Host controls
meeting.localUser.canDoParticipantHostControls() // Check if local user can perform host controls
// Setup screen
meeting.localUser.shouldShowSetupScreen() // Check if setup screen should be shown
meeting.localUser.shouldJoinMediaRoom() // Check if local user should join media roommeeting.self ↗ は、ミーティング内のローカルユーザー(自分)を表します。自分の音声、動画、画面共有を操作するためのプロパティとメソッドを提供します。
主なプロパティ:
// Participant identifiers
meeting.self.id; // Peer ID (unique per session)
meeting.self.userId; // Participant ID (persistent across sessions)
meeting.self.name; // Participant display name
// Media state
meeting.self.audioEnabled; // Boolean: Is audio enabled?
meeting.self.videoEnabled; // Boolean: Is video enabled?
meeting.self.screenShareEnabled; // Boolean: Is screen share active?
// Media tracks
meeting.self.audioTrack; // Audio MediaStreamTrack, if audio is enabled
meeting.self.videoTrack; // Video MediaStreamTrack, if video is enabled
meeting.self.screenShareTracks; // Structure: { audio: MediaStreamTrack, video: MediaStreamTrack }, if screen share is enabled
// Room state
meeting.self.roomJoined; // Boolean: Has joined the meeting?
meeting.self.roomState; // Current room stateよく使うメソッド:
// Media controls
await meeting.self.enableAudio(); // Emits a `audioUpdate` event on `meeting.self` when successful.
await meeting.self.disableAudio(); // Emits a `audioUpdate` event on `meeting.self` when successful.
await meeting.self.enableVideo(); // Emits a `videoUpdate` event on `meeting.self` when successful.
await meeting.self.disableVideo(); // Emits a `videoUpdate` event on `meeting.self` when successful.
await meeting.self.enableScreenShare(); // Emits a `screenShareUpdate` event on `meeting.self` when successful.
await meeting.self.disableScreenShare(); // Emits a `screenShareUpdate` event on `meeting.self` when successful.
// Update Name
await meeting.self.setName("New Name"); // setName works only works before joining the meeting
// List Devices
await meeting.self.getAllDevices(); // Returns all available devices
await meeting.self.getAudioDevices(); // Returns all available audio devices
await meeting.self.getVideoDevices(); // Returns all available video devices
await meeting.self.getSpeakerDevices(); // Returns all available speaker devices
await meeting.self.getCurrentDevices(); // {audio: MediaDevice, video: MediaDevice, speaker: MediaDevice} Returns the current device configuration
// Change a device
await meeting.self.setDevice((await meeting.self.getAllDevices())[0]);meeting.participants ↗ には、ミーティング内のすべてのリモート参加者が、状態ごとに整理されたマップとして含まれます。
参加者のマップ:
// All participants who have joined
meeting.participants.joined; // Map of joined participants
meeting.participants.joined.toArray(); // Array of joined participants
// Participants with active media
meeting.participants.active; // Map of participants with active audio/video
meeting.participants.active.toArray(); // Array of participants with active audio/video
// Participants in waiting room
meeting.participants.waitlisted; // Map of waitlisted participants
meeting.participants.waitlisted.toArray(); // Array of waitlisted participants
// Pinned participants
meeting.participants.pinned; // Map of pinned participants
meeting.participants.pinned.toArray(); // Array of pinned participants参加者データへのアクセス:
// Get all joined participants as an array
const joinedParticipants = meeting.participants.joined.toArray();
// Access first participant's IDs
const firstParticipant = joinedParticipants[0];
console.log("First Participant Peer ID:", firstParticipant?.id); // Peer ID (unique per session)
console.log("First Participant User ID:", firstParticipant?.userId); // Participant ID (persistent)
console.log("First Participant Name:", firstParticipant?.name); // Display name
console.log("First Participant Audio Enabled:", firstParticipant?.audioEnabled); // Audio state
console.log("First Participant Video Enabled:", firstParticipant?.videoEnabled); // Video state
console.log(
"First Participant Screen Share Enabled:",
firstParticipant?.screenShareEnabled,
); // Screen share state
console.log("First Participant Audio Track:", firstParticipant?.audioTrack); // Audio MediaStreamTrack
console.log("First Participant Video Track:", firstParticipant?.videoTrack); // Video MediaStreamTrack
console.log(
"First Participant Screen Share Track:",
firstParticipant?.screenShareTracks,
); // Screen share MediaStreamTrack
// Access participant by peer ID
const participant = meeting.participants.joined.get("peer-id");
// Get count of joined participants
const count = meeting.participants.joined.size();参加者のプロパティ:
各参加者オブジェクトは、meeting.self と同様のプロパティを持ちます。
participant.id; // Peer ID
participant.userId; // Participant ID
participant.name; // Display name
participant.audioEnabled; // Audio state
participant.videoEnabled; // Video state
participant.screenShareEnabled; // Screen share state
participant.audioTrack; // Audio MediaStreamTrack
participant.videoTrack; // Video MediaStreamTrack
participant.screenShareTrack; // Screen share MediaStreamTrackmeeting.participants には、ミーティング内のすべてのリモート参加者が、状態ごとに整理されたマップとして含まれます。
参加者のマップ:
// All participants who have joined
meeting.participants.joined; // Map of joined participants
meeting.participants.joined.toArray(); // Array of joined participants
// Participants with active media
meeting.participants.active; // Map of participants with active audio/video
meeting.participants.active.toArray(); // Array of participants with active audio/video
// Participants in waiting room
meeting.participants.waitlisted; // Map of waitlisted participants
meeting.participants.waitlisted.toArray(); // Array of waitlisted participants
// Pinned participants
meeting.participants.pinned; // Map of pinned participants
meeting.participants.pinned.toArray(); // Array of pinned participants参加者データへのアクセス:
// Get all joined participants as an array
const joinedParticipants = meeting.participants.joined.toArray();
// Access first participant's IDs
const firstParticipant = joinedParticipants[0];
console.log("First Participant Peer ID:", firstParticipant?.id); // Peer ID (unique per session)
console.log("First Participant User ID:", firstParticipant?.userId); // Participant ID (persistent)
console.log("First Participant Name:", firstParticipant?.name); // Display name
console.log("First Participant Audio Enabled:", firstParticipant?.audioEnabled); // Audio state
console.log("First Participant Video Enabled:", firstParticipant?.videoEnabled); // Video state
console.log(
"First Participant Screen Share Enabled:",
firstParticipant?.screenShareEnabled,
); // Screen share state
console.log("First Participant Audio Track:", firstParticipant?.audioTrack); // Audio MediaStreamTrack
console.log("First Participant Video Track:", firstParticipant?.videoTrack); // Video MediaStreamTrack
console.log(
"First Participant Screen Share Track:",
firstParticipant?.screenShareTracks,
); // Screen share MediaStreamTrack
// Access participant by peer ID
const participant = meeting.participants.joined.get("peer-id");
// Get count of joined participants
const count = meeting.participants.joined.size();参加者のプロパティ:
各参加者オブジェクトは、meeting.self と同様のプロパティを持ちます。
participant.id; // Peer ID
participant.userId; // Participant ID
participant.name; // Display name
participant.audioEnabled; // Audio state
participant.videoEnabled; // Video state
participant.screenShareEnabled; // Screen share state
participant.audioTrack; // Audio MediaStreamTrack
participant.videoTrack; // Video MediaStreamTrack
participant.screenShareTrack; // Screen share MediaStreamTrackmeeting.participants には、ミーティング内のすべてのリモート参加者が、状態ごとに整理されたマップとして含まれます。
参加者のマップ:
// All participants who have joined
meeting.participants.joined; // Map of joined participants
meeting.participants.joined.toArray(); // Array of joined participants
// Participants with active media
meeting.participants.active; // Map of participants with active audio/video
meeting.participants.active.toArray(); // Array of participants with active audio/video
// Participants in waiting room
meeting.participants.waitlisted; // Map of waitlisted participants
meeting.participants.waitlisted.toArray(); // Array of waitlisted participants
// Pinned participants
meeting.participants.pinned; // Map of pinned participants
meeting.participants.pinned.toArray(); // Array of pinned participants参加者データへのアクセス:
// Get all joined participants as an array
const joinedParticipants = meeting.participants.joined.toArray();
// Access first participant's IDs
const firstParticipant = joinedParticipants[0];
console.log("First Participant Peer ID:", firstParticipant?.id); // Peer ID (unique per session)
console.log("First Participant User ID:", firstParticipant?.userId); // Participant ID (persistent)
console.log("First Participant Name:", firstParticipant?.name); // Display name
console.log("First Participant Audio Enabled:", firstParticipant?.audioEnabled); // Audio state
console.log("First Participant Video Enabled:", firstParticipant?.videoEnabled); // Video state
console.log(
"First Participant Screen Share Enabled:",
firstParticipant?.screenShareEnabled,
); // Screen share state
console.log("First Participant Audio Track:", firstParticipant?.audioTrack); // Audio MediaStreamTrack
console.log("First Participant Video Track:", firstParticipant?.videoTrack); // Video MediaStreamTrack
console.log(
"First Participant Screen Share Track:",
firstParticipant?.screenShareTracks,
); // Screen share MediaStreamTrack
// Access participant by peer ID
const participant = meeting.participants.joined.get("peer-id");
// Get count of joined participants
const count = meeting.participants.joined.size();参加者のプロパティ:
各参加者オブジェクトは、meeting.self と同様のプロパティを持ちます。
participant.id; // Peer ID
participant.userId; // Participant ID
participant.name; // Display name
participant.audioEnabled; // Audio state
participant.videoEnabled; // Video state
participant.screenShareEnabled; // Screen share state
participant.audioTrack; // Audio MediaStreamTrack
participant.videoTrack; // Video MediaStreamTrack
participant.screenShareTrack; // Screen share MediaStreamTrackmeeting.participants には、ミーティング内のすべてのリモート参加者が、状態ごとに整理されたリストとして含まれます。
参加者のリスト:
// All participants who have joined
val joined: List<RtkRemoteParticipant> = meeting.participants.joined
// Participants with active media
val active: List<RtkRemoteParticipant> = meeting.participants.active
// Participants in waiting room
val waitlisted: List<RtkRemoteParticipant> = meeting.participants.waitlisted
// Pinned participant
val pinned: RtkRemoteParticipant? = meeting.participants.pinned
// Participants sharing screen
val screenShares: List<RtkRemoteParticipant> = meeting.participants.screenShares
// Active speaker
val activeSpeaker: RtkRemoteParticipant? = meeting.participants.activeSpeaker
// Total count of participants (including local user if joined)
val totalCount: Int = meeting.participants.totalCount参加者データへのアクセス:
// Get all joined participants
val joinedParticipants = meeting.participants.joined
// Access first participant
val firstParticipant = joinedParticipants.firstOrNull()
firstParticipant?.id // Participant ID (aka peerId)
firstParticipant?.userId // User ID
firstParticipant?.name // Display name
firstParticipant?.picture // Participant picture (if any)
firstParticipant?.customParticipantId // Custom participant ID
firstParticipant?.audioEnabled // Audio state
firstParticipant?.videoEnabled // Video state
firstParticipant?.screenShareEnabled // Screen share state
firstParticipant?.isPinned // Pin state
firstParticipant?.isHost // Host state
firstParticipant?.presetName // Preset name
firstParticipant?.stageStatus // Stage status
firstParticipant?.flags // Participant flags (recorder, hiddenParticipant, webinarHiddenParticipant)
// Get participant video view
firstParticipant?.getVideoView() // Returns a View that renders video stream
firstParticipant?.getScreenShareVideoView() // Returns a View that renders screenshare stream
// Access pagination
val maxNumberOnScreen = meeting.participants.maxNumberOnScreen // Max participants per page
val currentPageNumber = meeting.participants.currentPageNumber // Current page number
val pageCount = meeting.participants.pageCount // Total number of pages
val canGoNextPage = meeting.participants.canGoNextPage // Can navigate to next page
val canGoPreviousPage = meeting.participants.canGoPreviousPage // Can navigate to previous page
meeting.participants.setPage(1) // Switch to specific page参加者の制御メソッド:
// Individual participant controls (host only)
firstParticipant?.disableAudio { error -> } // Disable participant's audio
firstParticipant?.disableVideo { error -> } // Disable participant's video
firstParticipant?.kick { error -> } // Remove participant from meeting
// Pin/Unpin participants
val error: HostError? = firstParticipant?.pin() // Pin participant
val error: HostError? = firstParticipant?.unpin() // Unpin participant
// Waiting room management
meeting.participants.acceptWaitingRoomRequest(participantId) // Accept from waiting room
meeting.participants.rejectWaitingRoomRequest(participantId) // Reject from waiting room
meeting.participants.acceptAllWaitingRoomRequests() // Accept all waiting participants
// Bulk operations (host only)
val error: HostError? = meeting.participants.disableAllAudio() // Disable all participants' audio
val error: HostError? = meeting.participants.disableAllVideo() // Disable all participants' video
val error: HostError? = meeting.participants.kickAll() // Remove all participants
// Broadcast custom message
meeting.participants.broadcastMessage("custom-event", mapOf("key" to "value"))
// Cache management
meeting.participants.enableCache() // Enable participant caching
meeting.participants.disableCache() // Disable participant caching参加者のプロパティ:
participant.id // Participant ID (aka peerId, unique per session)
participant.userId // User ID (persistent across sessions)
participant.name // Display name
participant.picture // Participant picture URL
participant.customParticipantId // Custom participant ID
participant.audioEnabled // Audio state
participant.videoEnabled // Video state
participant.screenShareEnabled // Screen share state
participant.isPinned // Pin state
participant.isHost // Host state
participant.presetName // Preset name
participant.stageStatus // Stage status
participant.flags // Participant flags (recorder, hiddenParticipant, webinarHiddenParticipant)meeting.participants には、ミーティング内のすべてのリモート参加者が、状態ごとに整理されたリストとして含まれます。
参加者のリスト:
// All participants who have joined
let joined: [RtkRemoteParticipant] = meeting.participants.joined
// Participants with active media
let active: [RtkRemoteParticipant] = meeting.participants.active
// Participants in waiting room
let waitlisted: [RtkRemoteParticipant] = meeting.participants.waitlisted
// Pinned participant
let pinned: RtkRemoteParticipant? = meeting.participants.pinned
// Participants sharing screen
let screenShares: [RtkRemoteParticipant] = meeting.participants.screenShares
// Active speaker
let activeSpeaker: RtkRemoteParticipant? = meeting.participants.activeSpeaker
// Total count of participants (including local user if joined)
let totalCount: Int = meeting.participants.totalCount参加者データへのアクセス:
// Get all joined participants
let joinedParticipants = meeting.participants.joined
// Access first participant
let firstParticipant = joinedParticipants.first
firstParticipant?.id // Participant ID (aka peerId)
firstParticipant?.userId // User ID
firstParticipant?.name // Display name
firstParticipant?.picture // Participant picture (if any)
firstParticipant?.customParticipantId // Custom participant ID
firstParticipant?.audioEnabled // Audio state
firstParticipant?.videoEnabled // Video state
firstParticipant?.screenShareEnabled // Screen share state
firstParticipant?.isPinned // Pin state
firstParticipant?.isHost // Host state
firstParticipant?.presetName // Preset name
firstParticipant?.stageStatus // Stage status
firstParticipant?.flags // Participant flags (recorder, hiddenParticipant, webinarHiddenParticipant)
// Get participant video view
firstParticipant?.getVideoView() // Returns a UIView that renders video stream
firstParticipant?.getScreenShareVideoView() // Returns a UIView that renders screenshare stream
// Access pagination
let maxNumberOnScreen = meeting.participants.maxNumberOnScreen // Max participants per page
let currentPageNumber = meeting.participants.currentPageNumber // Current page number
let pageCount = meeting.participants.pageCount // Total number of pages
let canGoNextPage = meeting.participants.canGoNextPage // Can navigate to next page
let canGoPreviousPage = meeting.participants.canGoPreviousPage // Can navigate to previous page
meeting.participants.setPage(1) // Switch to specific page参加者の制御メソッド:
// Individual participant controls (host only)
firstParticipant?.disableAudio { error in } // Disable participant's audio
firstParticipant?.disableVideo { error in } // Disable participant's video
firstParticipant?.kick { error in } // Remove participant from meeting
// Pin/Unpin participants
let error: HostError? = firstParticipant?.pin() // Pin participant
let error: HostError? = firstParticipant?.unpin() // Unpin participant
// Waiting room management
meeting.participants.acceptWaitingRoomRequest(participantId) // Accept from waiting room
meeting.participants.rejectWaitingRoomRequest(participantId) // Reject from waiting room
meeting.participants.acceptAllWaitingRoomRequests() // Accept all waiting participants
// Bulk operations (host only)
let error: HostError? = meeting.participants.disableAllAudio() // Disable all participants' audio
let error: HostError? = meeting.participants.disableAllVideo() // Disable all participants' video
let error: HostError? = meeting.participants.kickAll() // Remove all participants
// Broadcast custom message
meeting.participants.broadcastMessage("custom-event", ["key": "value"])
// Cache management
meeting.participants.enableCache() // Enable participant caching
meeting.participants.disableCache() // Disable participant caching参加者のプロパティ:
participant.id // Participant ID (aka peerId, unique per session)
participant.userId // User ID (persistent across sessions)
participant.name // Display name
participant.picture // Participant picture URL
participant.customParticipantId // Custom participant ID
participant.audioEnabled // Audio state
participant.videoEnabled // Video state
participant.screenShareEnabled // Screen share state
participant.isPinned // Pin state
participant.isHost // Host state
participant.presetName // Preset name
participant.stageStatus // Stage status
participant.flags // Participant flags (recorder, hiddenParticipant, webinarHiddenParticipant)meeting.participants ↗ には、ミーティング内のすべてのリモート参加者が、状態ごとに整理されたマップとして含まれます。
参加者のマップ:
// All participants who have joined
meeting.participants.joined; // Map of joined participants
meeting.participants.joined.toArray(); // Array of joined participants
// Participants with active media
meeting.participants.active; // Map of participants with active audio/video
meeting.participants.active.toArray(); // Array of participants with active audio/video
// Participants in waiting room
meeting.participants.waitlisted; // Map of waitlisted participants
meeting.participants.waitlisted.toArray(); // Array of waitlisted participants
// Pinned participants
meeting.participants.pinned; // Map of pinned participants
meeting.participants.pinned.toArray(); // Array of pinned participants参加者データへのアクセス:
// Get all joined participants as an array
const joinedParticipants = meeting.participants.joined.toArray();
// Access first participant's IDs
const firstParticipant = joinedParticipants[0];
console.log("First Participant Peer ID:", firstParticipant?.id); // Peer ID (unique per session)
console.log("First Participant User ID:", firstParticipant?.userId); // Participant ID (persistent)
console.log("First Participant Name:", firstParticipant?.name); // Display name
console.log("First Participant Audio Enabled:", firstParticipant?.audioEnabled); // Audio state
console.log("First Participant Video Enabled:", firstParticipant?.videoEnabled); // Video state
console.log(
"First Participant Screen Share Enabled:",
firstParticipant?.screenShareEnabled,
); // Screen share state
console.log("First Participant Audio Track:", firstParticipant?.audioTrack); // Audio MediaStreamTrack
console.log("First Participant Video Track:", firstParticipant?.videoTrack); // Video MediaStreamTrack
console.log(
"First Participant Screen Share Track:",
firstParticipant?.screenShareTracks,
); // Screen share MediaStreamTrack
// Access participant by peer ID
const participant = meeting.participants.joined.get("peer-id");
// Get count of joined participants
const count = meeting.participants.joined.size();参加者のプロパティ:
各参加者オブジェクトは、meeting.self と同様のプロパティを持ちます。
participant.id; // Peer ID
participant.userId; // Participant ID
participant.name; // Display name
participant.audioEnabled; // Audio state
participant.videoEnabled; // Video state
participant.screenShareEnabled; // Screen share state
participant.audioTrack; // Audio MediaStreamTrack
participant.videoTrack; // Video MediaStreamTrack
participant.screenShareTrack; // Screen share MediaStreamTrackmeeting.meta ↗ には、ミーティングルーム自体の情報が含まれます。
meeting.meta.meetingId; // Meeting identifier
meeting.meta.meetingTitle; // Meeting Title
meeting.meta.meetingStartedTimestamp; // Meeting start timemeeting.meta ↗ には、ミーティングルーム自体の情報が含まれます。
meeting.meta.meetingId; // Meeting identifier
meeting.meta.meetingTitle; // Meeting Title
meeting.meta.meetingStartedTimestamp; // Meeting start timemeeting.meta ↗ には、ミーティングルーム自体の情報が含まれます。
meeting.meta.meetingId; // Meeting identifier
meeting.meta.meetingTitle; // Meeting Title
meeting.meta.meetingStartedTimestamp; // Meeting start timemeeting.meta には、ミーティングルーム自体の情報が含まれます。
プロパティ:
meeting.meta.meetingId // Meeting identifier
meeting.meta.meetingTitle // Meeting title
meeting.meta.meetingStartedTimestamp // Meeting start time
meeting.meta.meetingType // Meeting type (GROUP_CALL, WEBINAR, or LIVESTREAM)
meeting.meta.meetingConfig // Meeting configuration containing audio and video settings
meeting.meta.meetingState // State of the meeting (RtkMeetingState)
meeting.meta.authToken // User's authentication token for the meeting
meeting.meta.selfActiveTab // Currently active tab for the local participant (ActiveTab?)
meeting.meta.mediaConnectionState // Current state of the media connection (MediaConnectionState)
meeting.meta.socketConnectionState // Current state of the socket connection (SocketConnectionState)メソッド:
// Sync active tab (for plugins or screen share)
meeting.meta.syncTab(
id = "plugin-id-or-screenshare-id", // Identifier for unique plugin/screen share
tabType = ActiveTabType.PLUGIN // or ActiveTabType.SCREENSHARE
)meeting.meta には、ミーティングルーム自体の情報が含まれます。
プロパティ:
meeting.meta.meetingId // Meeting identifier
meeting.meta.meetingTitle // Meeting title
meeting.meta.meetingStartedTimestamp // Meeting start time
meeting.meta.meetingType // Meeting type (.groupCall, .webinar, or .livestream)
meeting.meta.meetingConfig // Meeting configuration containing audio and video settings
meeting.meta.meetingState // State of the meeting (RtkMeetingState)
meeting.meta.authToken // User's authentication token for the meeting
meeting.meta.selfActiveTab // Currently active tab for the local participant (ActiveTab?)
meeting.meta.mediaConnectionState // Current state of the media connection (MediaConnectionState)
meeting.meta.socketConnectionState // Current state of the socket connection (SocketConnectionState)メソッド:
// Sync active tab (for plugins or screen share)
meeting.meta.syncTab(
id: "plugin-id-or-screenshare-id", // Identifier for unique plugin/screen share
tabType: .plugin // or .screenshare
)meeting.meta ↗ には、ミーティングルーム自体の情報が含まれます。
meeting.meta.meetingId; // Meeting identifier
meeting.meta.meetingTitle; // Meeting Title
meeting.meta.meetingStartedTimestamp; // Meeting start timemeeting.chat ↗ は、ミーティング内で共有されるテキスト、画像、ファイルを管理します。
// Get all chat messages
const messages = meeting.chat.messages;
// Send a text message
await meeting.chat.sendTextMessage("Hello everyone!");
// Send an image
await meeting.chat.sendImageMessage(imageFile);
// Listen to chat messages
console.log("First message:", meeting.chat.messages[0]);
meeting.chat.on("chatUpdate", ({ message, messages }) => {
console.log(`Received message ${message}`);
console.log(`All messages in chat: ${messages.join(", ")}`);
});meeting.chat ↗ は、ミーティング内で共有されるテキスト、画像、ファイルを管理します。
// Get all chat messages
const messages = meeting.chat.messages;
// Send a text message
await meeting.chat.sendTextMessage("Hello everyone!");
// Send an image
await meeting.chat.sendImageMessage(imageFile);
// Listen to chat messages
console.log("First message:", meeting.chat.messages[0]);
meeting.chat.on("chatUpdate", ({ message, messages }) => {
console.log(`Received message ${message}`);
console.log(`All messages in chat: ${messages.join(", ")}`);
});meeting.chat ↗ は、ミーティング内で共有されるテキスト、画像、ファイルを管理します。
// Get all chat messages
const messages = meeting.chat.messages;
// Send a text message
await meeting.chat.sendTextMessage("Hello everyone!");
// Send an image
await meeting.chat.sendImageMessage(imageFile);
// Listen to chat messages
console.log("First message:", meeting.chat.messages[0]);
meeting.chat.on("chatUpdate", ({ message, messages }) => {
console.log(`Received message ${message}`);
console.log(`All messages in chat: ${messages.join(", ")}`);
});meeting.chat は、ミーティング内で共有されるテキスト、画像、ファイルを管理します。
// Get all chat messages
val messages = meeting.chat.messages
// Send a text message
val message = "Hello everyone!"
meeting.chat.sendTextMessage(message) // Returns ChatTextError if fails, null if successful
// Send an image
meeting.chat.sendImageMessage(imageUri) { err ->
// Handle ChatFileError if any
}
// Send a file
meeting.chat.sendFileMessage(fileUri) { err ->
// Handle ChatFileError if any
}
// Listen to chat messages
meeting.addChatEventListener(object : RtkChatEventListener {
override fun onChatUpdates(messages: List<ChatMessage>) {
// Called whenever there is a change in chat messages
}
override fun onNewChatMessage(message: ChatMessage) {
// Called when a new chat message is shared
}
override fun onMessageRateLimitReset() {
// Called when rate limit for sending messages is reset
}
})
// Handle errors
when (err) {
is ChatFileError.FileFormatNotAllowed -> {} // File format not allowed
is ChatFileError.PermissionDenied -> {} // No permission to send file
is ChatFileError.RateLimitBreached -> {} // Rate limit breached
is ChatFileError.ReadFailed -> {} // File could not be read
is ChatFileError.UploadFailed -> {} // File could not be uploaded
else -> {}
}meeting.chat は、ミーティング内で共有されるテキスト、画像、ファイルを管理します。
// Get all chat messages
let messages = meeting.chat.messages
// Send a text message
let message = "Hello everyone!"
meeting.chat.sendTextMessage(message) // Returns ChatTextError if fails, nil if successful
// Send an image
meeting.chat.sendImageMessage(imageUri) { err in
// Handle ChatFileError if any
}
// Send a file
meeting.chat.sendFileMessage(fileUri) { err in
// Handle ChatFileError if any
}
// Listen to chat messages
extension MeetingViewModel: RtkChatEventListener {
func onChatUpdates(messages: [ChatMessage]) {
// Called whenever there is a change in chat messages
}
func onNewChatMessage(message: ChatMessage) {
// Called when a new chat message is shared
}
func onMessageRateLimitReset() {
// Called when rate limit for sending messages is reset
}
}
// Add listener
meeting.addChatEventListener(self)
// Handle errors
switch err {
case .fileFormatNotAllowed:
// File format not allowed
case .permissionDenied:
// No permission to send file
case .rateLimitBreached:
// Rate limit breached
case .readFailed:
// File could not be read
case .uploadFailed:
// File could not be uploaded
default:
break
}meeting.chat ↗ は、ミーティング内で共有されるテキスト、画像、ファイルを管理します。
// Get all chat messages
const messages = meeting.chat.messages;
// Send a text message
await meeting.chat.sendTextMessage("Hello everyone!");
// Send an image
await meeting.chat.sendImageMessage(imageFile);
// Listen to chat messages
console.log("First message:", meeting.chat.messages[0]);
meeting.chat.on("chatUpdate", ({ message, messages }) => {
console.log(`Received message ${message}`);
console.log(`All messages in chat: ${messages.join(", ")}`);
});meeting.polls ↗ は、ミーティング内の投票を管理します。
// Get all polls
const polls = meeting.polls.items;
// Create a poll
await meeting.polls.create(
"What time works best?", //question
["9 AM", "2 PM", "5 PM"], // options
false, // anonymous
false, // hideVotes
);
// Vote on a poll
await meeting.polls.vote(pollId, optionIndex); // Retrieve pollId from meeting.polls.itemsmeeting.polls ↗ は、ミーティング内の投票を管理します。
// Get all polls
const polls = meeting.polls.items;
// Create a poll
await meeting.polls.create(
"What time works best?", //question
["9 AM", "2 PM", "5 PM"], // options
false, // anonymous
false, // hideVotes
);
// Vote on a poll
await meeting.polls.vote(pollId, optionIndex); // Retrieve pollId from meeting.polls.itemsmeeting.polls ↗ は、ミーティング内の投票を管理します。
// Get all polls
const polls = meeting.polls.items;
// Create a poll
await meeting.polls.create(
"What time works best?", //question
["9 AM", "2 PM", "5 PM"], // options
false, // anonymous
false, // hideVotes
);
// Vote on a poll
await meeting.polls.vote(pollId, optionIndex); // Retrieve pollId from meeting.polls.itemsmeeting.polls は、ミーティング内の投票を管理します。
// Get all polls
val polls = meeting.polls.items
// Create a poll
val pollsCreateError: PollsError? = meeting.polls.create(
question = "What time works best?",
options = listOf("9 AM", "2 PM", "5 PM"),
anonymous = false,
hideVotes = false
)
// Vote on a poll
val poll: Poll = meeting.polls.items.first()
val selectedPollOption: PollOption = poll.options.first()
val pollsError: PollsError? = meeting.polls.vote(poll.id, selectedPollOption)
// Listen to poll updates
meeting.addPollsEventListener(object : RtkPollsEventListener {
override fun onNewPoll(poll: Poll) {
// Called when a new poll is created
}
override fun onPollUpdate(poll: Poll) {
// Called when a poll is updated (votes, details changed)
}
override fun onPollUpdates(pollItems: List<Poll>) {
// Called when there are updates to the list of polls
}
})meeting.polls は、ミーティング内の投票を管理します。
// Get all polls
let polls = meeting.polls.items
// Create a poll
let pollsCreateError: PollsError? = meeting.polls.create(
question: "What time works best?",
options: ["9 AM", "2 PM", "5 PM"],
anonymous: false,
hideVotes: false
)
// Vote on a poll
let poll: Poll = meeting.polls.items.first
let selectedPollOption: PollOption = poll.options.first
let pollsError: PollsError? = meeting.polls.vote(poll.id, selectedPollOption)
// Listen to poll updates
extension MeetingViewModel: RtkPollsEventListener {
func onNewPoll(poll: Poll) {
// Called when a new poll is created
}
func onPollUpdate(poll: Poll) {
// Called when a poll is updated (votes, details changed)
}
func onPollUpdates(pollItems: [Poll]) {
// Called when there are updates to the list of polls
}
}
// Add listener
meeting.addPollsEventListener(self)meeting.polls ↗ は、ミーティング内の投票を管理します。
// Get all polls
const polls = meeting.polls.items;
// Create a poll
await meeting.polls.create(
"What time works best?", //question
["9 AM", "2 PM", "5 PM"], // options
false, // anonymous
false, // hideVotes
);
// Vote on a poll
await meeting.polls.vote(pollId, optionIndex); // Retrieve pollId from meeting.polls.itemsmeeting.plugins は、ミーティングのプラグイン(共同作業アプリ)を管理します。有効化は Plugin オブジェクト上で行います。
// Get all available plugins
const allPlugins = meeting.plugins.all.toArray();
// Get active plugins
const activePlugins = meeting.plugins.active.toArray();
// Activate a plugin for all participants
await meeting.plugins.all.get(pluginId).activate();
// Deactivate a plugin for all participants
await meeting.plugins.all.get(pluginId).deactivate();meeting.plugins は、ミーティングのプラグイン(共同作業アプリ)を管理します。有効化は Plugin オブジェクト上で行います。
// Get all available plugins
const allPlugins = meeting.plugins.all.toArray();
// Get active plugins
const activePlugins = meeting.plugins.active.toArray();
// Activate a plugin for all participants
await meeting.plugins.all.get(pluginId).activate();
// Deactivate a plugin for all participants
await meeting.plugins.all.get(pluginId).deactivate();meeting.plugins は、ミーティングのプラグイン(共同作業アプリ)を管理します。有効化は Plugin オブジェクト上で行います。
// Get all available plugins
const allPlugins = meeting.plugins.all.toArray();
// Get active plugins
const activePlugins = meeting.plugins.active.toArray();
// Activate a plugin for all participants
await meeting.plugins.all.get(pluginId).activate();
// Deactivate a plugin for all participants
await meeting.plugins.all.get(pluginId).deactivate();meeting.plugins は、ミーティングのプラグイン(共同作業アプリ)を管理します。
// Get all available plugins
val plugins = meeting.plugins.all
// Get active plugins
val activePlugins = meeting.plugins.active
// Activate a plugin
meeting.plugins.all.first().activate()
// Deactivate a plugin
meeting.plugins.active.first().deactivate()
// Get plugin view
val pluginView = meeting.plugins.active.first().getPluginView() // Returns a WebView
// Send data to a plugin
val pluginId = ""
val plugin = meeting.plugins.active.firstOrNull { it.id == pluginId }
plugin?.sendData(
eventName = "my-custom-event",
data = "Hello world"
)
// Upload file to a plugin
plugin?.uploadFile(
RtkPluginFile(
resultCode = <activity-resultCode>,
data = Intent() // Intent with the file data
)
)
// Listen to plugin events
val pluginsEventListener = object : RtkPluginsEventListener {
override fun onPluginActivated(plugin: RtkPlugin) {
// Called when a plugin is activated
}
override fun onPluginDeactivated(plugin: RtkPlugin) {
// Called when a plugin is deactivated
}
override fun onPluginMessage(plugin: RtkPlugin, eventName: String, data: Any?) {
// Called when a plugin sends a message
}
override fun onPluginFileRequest(plugin: RtkPlugin) {
// Called when a plugin requests a file
}
}
meeting.addPluginsEventListener(pluginsEventListener)meeting.plugins は、ミーティングのプラグイン(共同作業アプリ)を管理します。
// Get all available plugins
let plugins = meeting.plugins.all
// Get active plugins
let activePlugins = meeting.plugins.active
// Activate a plugin
meeting.plugins.all.first?.activate()
// Deactivate a plugin
meeting.plugins.active.first?.deactivate()
// Get plugin view
let pluginView = meeting.plugins.active.first?.getPluginView() // Returns a WKWebView
// Send data to a plugin
let pluginId = ""
let plugin = meeting.plugins.active.first { $0.id == pluginId }
plugin?.sendData(
eventName: "my-custom-event",
data: "Hello world"
)
// Listen to plugin events
extension MeetingViewModel: RtkPluginsEventListener {
func onPluginActivated(plugin: RtkPlugin) {
// Called when a plugin is activated
}
func onPluginDeactivated(plugin: RtkPlugin) {
// Called when a plugin is deactivated
}
func onPluginMessage(plugin: RtkPlugin, eventName: String, data: Any?) {
// Called when a plugin sends a message
}
func onPluginFileRequest(plugin: RtkPlugin) {
// Called when a plugin requests a file
}
}
// Add listener
meeting.addPluginsEventListener(self)meeting.plugins ↗ は、ミーティングのプラグイン(共同作業アプリ)を管理します。
// Get all available plugins
const plugins = meeting.plugins.all;
// Activate a plugin
await meeting.plugins.activate(pluginId);
// Deactivate a plugin
await meeting.plugins.deactivate();meeting.ai では、ライブ文字起こしなどの AI 機能にアクセスできます。
// Access live transcriptions
meeting.ai.transcripts; // Shows only when transcription is enabled in Presetmeeting.ai では、ライブ文字起こしなどの AI 機能にアクセスできます。
// Access live transcriptions
meeting.ai.transcripts; // Shows only when transcription is enabled in Presetmeeting.ai では、ライブ文字起こしなどの AI 機能にアクセスできます。
// Access live transcriptions
meeting.ai.transcripts; // Shows only when transcription is enabled in Presetmeeting.ai では、ライブ文字起こしなどの AI 機能にアクセスできます。
// Access live transcriptions
meeting.ai.transcripts; // Shows only when transcription is enabled in Presetmeeting.ai はこのモバイルプラットフォームではサポートされていません。
meeting.ai はこのモバイルプラットフォームではサポートされていません。
ミーティングルームへの参加と退出:
// Join the meeting room
await meeting.join(); // Emits a `roomJoined` event on `meeting.self` when successful
// Leave the meeting room
await meeting.leave();// Join the meeting room
await meeting.join(); // Emits a `roomJoined` event on `meeting.self` when successful
// Leave the meeting room
await meeting.leave();// Join the meeting room
await meeting.join(); // Emits a `roomJoined` event on `meeting.self` when successful
// Leave the meeting room
await meeting.leave();// Join the meeting room
meeting.joinRoom(
onSuccess = {
// Room Joined
},
onFailure = { err ->
// Handle error
}
)
// Leave the meeting room
meeting.leave(
onSuccess = {
// Room Left
},
onFailure = { err ->
// Handle error
}
)// Join the meeting room
meeting.joinRoom(
onSuccess: {
// Room Joined
},
onFailure: { err in
// Handle error
}
)
// Leave the meeting room
meeting.leave(
onSuccess: {
// Room Left
},
onFailure: { err in
// Handle error
}
)// Join the meeting room
await meeting.join(); // Emits a `roomJoined` event on `meeting.self` when successful
// Leave the meeting room
await meeting.leave();RealtimeKit は、参加者に対して 2 種類の識別子を使います。
-
セッション ID(
id): ミーティングへの各接続に一意な識別子です。参加者が新しいセッションに参加するたびに変わります。Web では「Peer ID」と呼ばれ、meeting.self.idまたはparticipant.idに格納されます。モバイルでは「Participant ID」と呼ばれ、meeting.localUser.idまたはparticipant.idに格納されます。 -
ユーザー ID(
userId): 複数セッションにわたって同じ参加者を表す永続的な識別子です。再接続しても変わりません。Web ではmeeting.self.userId、モバイルではmeeting.localUser.userId、リモート参加者ではparticipant.userIdに格納されます。
使い分け:
- 再接続や別セッションでも同じユーザーを追跡する場合は
userIdを使います(ユーザー設定や権限の保存など) - 現在のセッションの接続を扱う場合は
idを使います(アクティブな動画ストリームやリアルタイムの参加者状態の管理など)
-
ポーリングではなくイベントを購読する: meeting オブジェクトは状態が変わるとイベントを発行します。プロパティ値を繰り返し確認するのではなく、これらのイベントを購読してください。
-
参加者コレクションを活用する: Web では
toArray()で参加者マップを配列に変換します。モバイルでは参加者コレクションはすでにリストなので、そのまま反復処理できます。 -
接続状態を確認する: アクティブなセッションが必要なプロパティやメソッドにアクセスする前に、必ず
roomJoined(モバイルではmeeting.localUser.roomJoined)を確認してください。 -
エラーを適切に処理する: 多くのメソッドはエラーコールバックを受け取ります。よいユーザー体験のため、必ず適切なエラー処理を実装してください。
meeting オブジェクトの構成を理解したら、カスタムのミーティング体験を構築できます。UI Kit のコンポーネントは、内部で同じ meeting オブジェクトを使い、すぐに使えるインターフェイスを提供します。次のガイドでは、UI Kit コンポーネントと meeting オブジェクトへの直接アクセスを組み合わせて、独自のカスタム UI を作る方法を説明します。