Skip to content

非公式 / UnofficialCloudflare, Inc. 非提携。アカウント情報は入力しないでください。Not affiliated with Cloudflare, Inc. Do not enter Cloudflare credentials here.Official docsこのサイトについてプライバシー

RtkAudioButtonControlBar

最終更新 Markdown で表示Agent セットアップ

ローカルのマイクのオン/オフを切り替えるコントロールバーボタンです。 切り替える前にマイクの権限を確認します。

イニシャライザーのパラメーター

パラメーター 型 必須 デフォルト 説明
meeting RealtimeKitClient ✅ - RealtimeKit クライアントのインスタンス
onClick ((RtkAudioButtonControlBar) -> Void)? ❌ nil ボタンがタップされたときに呼ばれるクロージャ
appearance RtkControlBarButtonAppearance ❌ - ボタンの外観設定

使用例

基本的な使い方

import RealtimeKitUI

let audioButton = RtkAudioButtonControlBar(meeting: rtkClient)
view.addSubview(audioButton)

タップハンドラーを指定する場合

import RealtimeKitUI

let audioButton = RtkAudioButtonControlBar(
    meeting: rtkClient,
    onClick: { button in
        print("Audio toggled")
    }
)
view.addSubview(audioButton)

役に立ちましたか?