Skip to content

Commit

Permalink
fix(homebridge): correct audio params if audio isn't supported
Browse files Browse the repository at this point in the history
  • Loading branch information
dgreif committed Oct 23, 2020
1 parent b8b89cf commit c7d4a14
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions homebridge/camera-source.ts
Expand Up @@ -409,14 +409,13 @@ export class CameraSource implements CameraStreamingDelegate {
callback(undefined, {
// SOMEDAY: remove address as it is not needed after homebridge 1.1.3
address: await getDefaultIpAddress(request.addressVersion === 'ipv6'),
audio: returnAudioPort
? {
port: returnAudioPort,
ssrc: audioSsrc,
srtp_key: audioSrtpKey,
srtp_salt: audioSrtpSalt,
}
: undefined,
audio: {
// if audio isn't supported, pipe rtcp to incomingAudioRtcpPort which will not actually be bound
port: returnAudioPort || incomingAudioRtcpPort,
ssrc: audioSsrc,
srtp_key: audioSrtpKey,
srtp_salt: audioSrtpSalt,
},
video: {
port: await sipSession.videoSplitter.portPromise,
ssrc: videoSsrc,
Expand Down

0 comments on commit c7d4a14

Please sign in to comment.