-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #567 from shiguredo/feature/improve-types
Feature/improve types
- Loading branch information
Showing
3 changed files
with
167 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// シグナリングトランスポートタイプ | ||
export const TRANSPORT_TYPE_WEBSOCKET = 'websocket' as const | ||
export const TRANSPORT_TYPE_DATACHANNEL = 'datachannel' as const | ||
|
||
// シグナリング ROLE | ||
export const SIGNALING_ROLE_SENDRECV = 'sendrecv' as const | ||
export const SIGNALING_ROLE_SENDONLY = 'sendonly' as const | ||
export const SIGNALING_ROLE_RECVONLY = 'recvonly' as const | ||
|
||
// WebSocket シグナリングでのみ利用する | ||
export const SIGNALING_MESSAGE_TYPE_CONNECT = 'connect' as const | ||
export const SIGNALING_MESSAGE_TYPE_REDIRECT = 'redirect' as const | ||
export const SIGNALING_MESSAGE_TYPE_OFFER = 'offer' as const | ||
export const SIGNALING_MESSAGE_TYPE_ANSWER = 'answer' as const | ||
export const SIGNALING_MESSAGE_TYPE_CANDIDATE = 'candidate' as const | ||
export const SIGNALING_MESSAGE_TYPE_SWITCHED = 'switched' as const | ||
export const SIGNALING_MESSAGE_TYPE_PING = 'ping' as const | ||
export const SIGNALING_MESSAGE_TYPE_PONG = 'pong' as const | ||
|
||
// DataChannel シグナリングでのみ利用する | ||
export const SIGNALING_MESSAGE_TYPE_REQ_STATS = 'req-stats' as const | ||
export const SIGNALING_MESSAGE_TYPE_STATS = 'stats' as const | ||
export const SIGNALING_MESSAGE_TYPE_CLOSE = 'close' as const | ||
|
||
// WebSocket と DataChannel シグナリング両方で了する | ||
export const SIGNALING_MESSAGE_TYPE_RE_OFFER = 're-offer' as const | ||
export const SIGNALING_MESSAGE_TYPE_RE_ANSWER = 're-answer' as const | ||
export const SIGNALING_MESSAGE_TYPE_DISCONNECT = 'disconnect' as const | ||
export const SIGNALING_MESSAGE_TYPE_NOTIFY = 'notify' as const | ||
export const SIGNALING_MESSAGE_TYPE_PUSH = 'push' as const | ||
|
||
// @deprecated この定数は将来的に削除される予定です | ||
export const SIGNALING_MESSAGE_TYPE_UPDATE = 'update' as const | ||
|
||
// データチャネル必須ラベル | ||
export const DATA_CHANNEL_LABEL_SIGNALING = 'signaling' as const | ||
export const DATA_CHANNEL_LABEL_PUSH = 'push' as const | ||
export const DATA_CHANNEL_LABEL_NOTIFY = 'notify' as const | ||
export const DATA_CHANNEL_LABEL_STATS = 'stats' as const |
Oops, something went wrong.