mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
implement signal offer.
This commit is contained in:
parent
40d79e69b0
commit
ed600e5588
@ -82,9 +82,8 @@ export class NekoMessages extends EventEmitter<NekoEvents> {
|
|||||||
|
|
||||||
if (type == 'answer') {
|
if (type == 'answer') {
|
||||||
this._connection.websocket.send(EVENT.SIGNAL_ANSWER, { sdp })
|
this._connection.websocket.send(EVENT.SIGNAL_ANSWER, { sdp })
|
||||||
//} else if (type == 'offer') {
|
} else if (type == 'offer') {
|
||||||
// // Todo: Implement
|
this._connection.websocket.send(EVENT.SIGNAL_OFFER, { sdp })
|
||||||
// this._connection.websocket.send(EVENT.SIGNAL_OFFER, { sdp })
|
|
||||||
} else {
|
} else {
|
||||||
this._remoteLog.warn(`unsupported negotiation type`, { type })
|
this._remoteLog.warn(`unsupported negotiation type`, { type })
|
||||||
}
|
}
|
||||||
@ -149,7 +148,7 @@ export class NekoMessages extends EventEmitter<NekoEvents> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Todo: Use on-offer event intead.
|
// Todo: Use on-offer event intead.
|
||||||
protected async [EVENT.SIGNAL_RESTART]({ sdp }: message.SignalAnswer) {
|
protected async [EVENT.SIGNAL_RESTART]({ sdp }: message.SignalDescription) {
|
||||||
this._localLog.debug(`EVENT.SIGNAL_RESTART`)
|
this._localLog.debug(`EVENT.SIGNAL_RESTART`)
|
||||||
this.emit('connection.webrtc.sdp', 'remote', sdp)
|
this.emit('connection.webrtc.sdp', 'remote', sdp)
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ export const SYSTEM_DISCONNECT = 'system/disconnect'
|
|||||||
|
|
||||||
export const SIGNAL_REQUEST = 'signal/request'
|
export const SIGNAL_REQUEST = 'signal/request'
|
||||||
export const SIGNAL_RESTART = 'signal/restart'
|
export const SIGNAL_RESTART = 'signal/restart'
|
||||||
|
export const SIGNAL_OFFER = 'signal/offer'
|
||||||
export const SIGNAL_ANSWER = 'signal/answer'
|
export const SIGNAL_ANSWER = 'signal/answer'
|
||||||
export const SIGNAL_PROVIDE = 'signal/provide'
|
export const SIGNAL_PROVIDE = 'signal/provide'
|
||||||
export const SIGNAL_CANDIDATE = 'signal/candidate'
|
export const SIGNAL_CANDIDATE = 'signal/candidate'
|
||||||
|
@ -48,7 +48,7 @@ export interface SignalProvide {
|
|||||||
|
|
||||||
export type SignalCandidate = RTCIceCandidateInit
|
export type SignalCandidate = RTCIceCandidateInit
|
||||||
|
|
||||||
export interface SignalAnswer {
|
export interface SignalDescription {
|
||||||
sdp: string
|
sdp: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user