mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
accept offer from server.
This commit is contained in:
parent
ed600e5588
commit
4479096a48
@ -147,14 +147,18 @@ export class NekoMessages extends EventEmitter<NekoEvents> {
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user