Skip to content

Commit

Permalink
SignalingMessageEvent のインターフェース追加
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Oct 2, 2024
1 parent cd65c17 commit 68c2bc1
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions packages/sdk/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
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,
SIGNALING_MESSAGE_TYPE_OFFER,
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,
Expand Down Expand Up @@ -178,7 +175,7 @@ export type SignalingPushMessage = {
}

export type SignalingReqStatsMessage = {
type: 'req-stats'
type: typeof SIGNALING_MESSAGE_TYPE_REQ_STATS
}

export type SignalingSwitchedMessage = {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 68c2bc1

Please sign in to comment.