diff --git a/src/component/internal/messages.ts b/src/component/internal/messages.ts index b911eb0d..d4ab2de6 100644 --- a/src/component/internal/messages.ts +++ b/src/component/internal/messages.ts @@ -147,14 +147,18 @@ export class NekoMessages extends EventEmitter { Vue.set(this._state.connection.webrtc, 'video', video) } - // Todo: Use on-offer event intead. - protected async [EVENT.SIGNAL_RESTART]({ sdp }: message.SignalDescription) { - this._localLog.debug(`EVENT.SIGNAL_RESTART`) + protected async [EVENT.SIGNAL_OFFER]({ sdp }: message.SignalDescription) { + this._localLog.debug(`EVENT.SIGNAL_OFFER`) this.emit('connection.webrtc.sdp', 'remote', sdp) await this._connection.webrtc.setOffer(sdp) } + // Todo: Use offer event intead. + protected async [EVENT.SIGNAL_RESTART]({ sdp }: message.SignalDescription) { + this[EVENT.SIGNAL_OFFER]({ sdp }) + } + protected [EVENT.SIGNAL_CANDIDATE](candidate: message.SignalCandidate) { this._localLog.debug(`EVENT.SIGNAL_CANDIDATE`) this._connection.webrtc.setCandidate(candidate)