Skip to content

Commit 0cf40de

Browse files
committed
Fix creating offers again in Firefox with disabled media and simulcast
When a media track is disabled the track is nullified in the sender, so this needs to be taken into account when creating a new offer on an existing connection with disabled media (for example, to add a video track to a connection with an active but disabled audio track). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
1 parent 0115b6d commit 0cf40de

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/utils/webrtc/simplewebrtc

src/utils/webrtc/simplewebrtc/peer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ Peer.prototype.offer = function(options) {
356356
if (sendVideo && this.enableSimulcast && adapter.browserDetails.browser === 'firefox') {
357357
console.debug('Enabling Simulcasting for Firefox (RID)')
358358
const sender = this.pc.getSenders().find(function(s) {
359-
return s.track.kind === 'video'
359+
return s.track && s.track.kind === 'video'
360360
})
361361
if (sender) {
362362
let parameters = sender.getParameters()

0 commit comments

Comments
 (0)