Properties
audio
audio: HTMLAudioElement
avatarFaceScale
avatarFaceScale: number
Readonly canTrickleIceCandidates
canTrickleIceCandidates: null | boolean
Readonly connectedClientSocketID
connectedClientSocketID: string
Readonly connectionState
connectionState: RTCPeerConnectionState
Readonly currentLocalDescription
currentLocalDescription: null | RTCSessionDescription
Readonly currentRemoteDescription
currentRemoteDescription: null | RTCSessionDescription
dataChannelEventHandlers
data
ChannelEventHandlers: Map<DataDtoType, (data: any, peer: Peer) => void>
Private Readonly dc
dc: RTCDataChannel
Readonly iceConnectionState
iceConnectionState: RTCIceConnectionState
Readonly iceGatheringState
iceGatheringState: RTCIceGatheringState
Readonly localDescription
localDescription: null | RTCSessionDescription
lookLeft
lookLeft: boolean
maxSoundDistance
maxSoundDistance: number
nickname
nickname: string
nicknameDiv
nicknameDiv: HTMLDivElement
onconnectionstatechange
onconnectionstatechange: null | ((ev: Event) => any)
ondatachannel
ondatachannel: null | ((ev: RTCDataChannelEvent) => any)
onicecandidate
onicecandidate: null | ((ev: RTCPeerConnectionIceEvent) => any)
onicecandidateerror
onicecandidateerror: null | ((ev: Event) => any)
oniceconnectionstatechange
oniceconnectionstatechange: null | ((ev: Event) => any)
onicegatheringstatechange
onicegatheringstatechange: null | ((ev: Event) => any)
onnegotiationneeded
onnegotiationneeded: null | ((ev: Event) => any)
onsignalingstatechange
onsignalingstatechange: null | ((ev: Event) => any)
ontrack
ontrack: null | ((ev: RTCTrackEvent) => any)
partRotatedegree
partRotatedegree: number[]
Readonly pendingLocalDescription
pendingLocalDescription: null | RTCSessionDescription
Readonly pendingRemoteDescription
pendingRemoteDescription: null | RTCSessionDescription
Readonly remoteDescription
remoteDescription: null | RTCSessionDescription
rotateCounterclockwise
rotateCounterclockwise: boolean
Readonly signalingState
signalingState: RTCSignalingState
Readonly socketID
socketID: string
textMessage
textMessage: string
textMessageDiv
textMessageDiv: HTMLDivElement
trackEventHandler
trackEventHandler: (peerId: string, event: RTCTrackEvent) => void
Type declaration
-
- (peerId: string, event: RTCTrackEvent): void
-
Parameters
-
peerId: string
-
event: RTCTrackEvent
Returns void
volumnMultiplyValue
volumnMultiplyValue: number
책임 : Peer 간 연결을 수립하여 localStream 전송한다. Peer 간 연결을 통해 remoteStream 이 도착하면 AudioElement 에 업데이트한다. dataChannel 을 통해 playerDto 를 받아서 자신의 상태를 계속하여 업데이트한다. dataChannel 을 통해 연결된 peer 에게 me 의 상태를 전송한다.