From 68c2bc10e5a83d059146bf9fb0fc81b0c9e72cf7 Mon Sep 17 00:00:00 2001 From: voluntas Date: Wed, 2 Oct 2024 19:06:03 +0900 Subject: [PATCH] =?UTF-8?q?SignalingMessageEvent=20=E3=81=AE=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=82=BF=E3=83=BC=E3=83=95=E3=82=A7=E3=83=BC=E3=82=B9?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/sdk/src/types.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/sdk/src/types.ts b/packages/sdk/src/types.ts index 52c41eac..7966f6c1 100644 --- a/packages/sdk/src/types.ts +++ b/packages/sdk/src/types.ts @@ -1,8 +1,4 @@ import type { - DATA_CHANNEL_LABEL_NOTIFY, - DATA_CHANNEL_LABEL_PUSH, - DATA_CHANNEL_LABEL_SIGNALING, - DATA_CHANNEL_LABEL_STATS, SIGNALING_MESSAGE_TYPE_CLOSE, SIGNALING_MESSAGE_TYPE_CONNECT, SIGNALING_MESSAGE_TYPE_NOTIFY, @@ -10,6 +6,7 @@ import type { SIGNALING_MESSAGE_TYPE_PING, SIGNALING_MESSAGE_TYPE_PUSH, SIGNALING_MESSAGE_TYPE_REDIRECT, + SIGNALING_MESSAGE_TYPE_REQ_STATS, SIGNALING_MESSAGE_TYPE_RE_OFFER, SIGNALING_MESSAGE_TYPE_SWITCHED, SIGNALING_MESSAGE_TYPE_UPDATE, @@ -178,7 +175,7 @@ export type SignalingPushMessage = { } export type SignalingReqStatsMessage = { - type: 'req-stats' + type: typeof SIGNALING_MESSAGE_TYPE_REQ_STATS } export type SignalingSwitchedMessage = { @@ -382,6 +379,13 @@ export type SignalingMessageDirection = 'sent' | 'received' export type TimelineEventLogType = TransportType | 'peerconnection' | 'sora' +// @todo 未実装 +export interface SignalingMessageEvent extends Event { + type: TransportType + direction: SignalingMessageDirection + message: WebSocketSignalingMessage | DataChannelSignalingMessage +} + export interface SignalingEvent extends Event { transportType: TransportType data?: unknown