Skip to content

非公式本サイトは非公式の日本語ドキュメントであり、Cloudflare 公式サイトではありません。最新情報はdevelopers.cloudflare.comをご確認ください。

RtkPluginsView

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

プラグインと画面共有コンテンツを表示する複合ビューです。 タブセレクター、プラグインコンテンツ領域、フローティングのアクティブスピーカービューを含みます。

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

パラメーター 必須 デフォルト 説明
videoPeerViewModel VideoPeerViewModel - アクティブスピーカー映像のビューモデル

プロパティ

プロパティ 必須 デフォルト 説明
activeListView RtkActiveTabSelectorView - - プラグインと画面共有を切り替えるタブセレクター
pluginVideoView UIView - - プラグインコンテンツのコンテナビュー
syncButton UIButton - - プラグインビューを発表者と同期するボタン

メソッド

メソッド 戻り値の型 説明
setButtons(buttons:selectedIndex:clickAction:) Void 選択ハンドラー付きでタブセレクターのボタンを設定します
show(pluginView:) Void コンテンツ領域にプラグインビューを表示します
showVideoView(participant:) Void コンテンツ領域に参加者の映像を表示します
showPinnedView(participant:) Void ピン留めした参加者の映像を表示します
showActiveSpeakerView(participant:) Void フローティングのアクティブスピーカーオーバーレイを表示します
hideActiveSpeaker() Void フローティングのアクティブスピーカーオーバーレイを非表示にします

使用例

基本的な使い方

import RealtimeKitUI

let viewModel = VideoPeerViewModel(
    meeting: rtkClient,
    participant: participant,
    showSelfPreviewVideo: false
)
let pluginsView = RtkPluginsView(videoPeerViewModel: viewModel)
view.addSubview(pluginsView)

タブボタンを指定する場合

import RealtimeKitUI

let viewModel = VideoPeerViewModel(
    meeting: rtkClient,
    participant: participant,
    showSelfPreviewVideo: false
)
let pluginsView = RtkPluginsView(videoPeerViewModel: viewModel)

let buttons = [
    RtkPluginScreenShareTabButton(image: nil, title: "Screen Share"),
    RtkPluginScreenShareTabButton(image: nil, title: "Whiteboard")
]
pluginsView.setButtons(
    buttons: buttons,
    selectedIndex: 0,
    clickAction: { index in
        print("Selected tab: \(index)")
    }
)
view.addSubview(pluginsView)

役に立ちましたか?