Skip to content

Commit

Permalink
fix: added default events in signaling service (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsong authored Oct 22, 2024
1 parent e16c278 commit 6a44590
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/millicast-sdk/src/Signaling.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ export default class Signaling extends EventEmitter {
// Signaling server only recognizes 'AV1' and not 'AV1X'
sdp = SdpParser.adaptCodecName(sdp, 'AV1X', VideoCodec.AV1)

const data = { sdp, streamId: this.streamName, pinnedSourceId: optionsParsed.pinnedSourceId, excludedSourceIds: optionsParsed.excludedSourceIds }
// default events
const events = ['active', 'inative', 'layers', 'viewercount', 'vad', 'updated', 'migrate', 'stopped']
const data = { sdp, streamId: this.streamName, pinnedSourceId: optionsParsed.pinnedSourceId, excludedSourceIds: optionsParsed.excludedSourceIds, events }

if (optionsParsed.vad) { data.vad = true }
if (Array.isArray(optionsParsed.events)) { data.events = optionsParsed.events }
Expand Down
2 changes: 1 addition & 1 deletion packages/millicast-sdk/src/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ export default class View extends BaseWebRTC {
default:
break
}
this.emit(signalingEvents.broadcastEvent, event)
}
this.emit(signalingEvents.broadcastEvent, event)
})

const getLocalSDPPromise = webRTCPeerInstance.getRTCLocalSDP({ ...this.options, stereo: true })
Expand Down

0 comments on commit 6a44590

Please sign in to comment.