PutSignalingNotifyMetadataItem
public enum PutSignalingNotifyMetadataItem<Metadata: Decodable, Value: Encodable>:
RPCMethodProtocol
シグナリング通知メタデータのアイテムを設定する RPC メソッド
シグナリング通知メタデータの特定キーに値を設定する RPC メソッドです。 ジェネリック型パラメータで値の型とレスポンスの型を指定できます。
使用例
struct NotifyResponse: Decodable {
let key: String
let value: String
}
do {
let result = try await mediaChannel.rpc(
method: PutSignalingNotifyMetadataItem<NotifyResponse, String>.self,
params: PutSignalingNotifyMetadataItemParams(
key: "status",
value: "ready"
)
)
if let response = result?.result {
print("Set metadata item - key: \(response.key), value: \(response.value)")
}
} catch {
print("Failed to set metadata item: \(error)")
}
-
Declaration
Swift
public typealias Params = PutSignalingNotifyMetadataItemParams<Value> -
Declaration
Swift
public typealias Result = Metadata -
Declaration
Swift
public static var name: String { get }
View on GitHub
Install in Dash