Improve codec availability detection in SFU

This commit is contained in:
prlanzarin 2018-09-18 18:52:15 +00:00
parent 5cb222c7de
commit 8150db9fb6

View File

@ -93,7 +93,7 @@ module.exports = class SdpSession extends MediaSession {
}
_hasAvailableCodec () {
return (this._offer.hasAvailableVideoCodec() === this._answer.hasAvailableVideoCodec()) &&
(this._offer.hasAvailableAudioCodec() === this._answer.hasAvailableAudioCodec());
return (this._offer.hasAvailableVideoCodec() && this._answer.hasAvailableVideoCodec()) ||
(this._offer.hasAvailableAudioCodec() && this._answer.hasAvailableAudioCodec());
}
}