Skip to content

Commit

Permalink
Fix WebRTC IPs on allowed list not being considered on boot
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaellehmkuhl committed Nov 17, 2023
1 parent 09510e2 commit 7715401
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/composables/webRTC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class WebRTCManager {
private streamName: string | undefined
private session: Session | undefined
private rtcConfiguration: RTCConfiguration
private selectedICEIPs: string[] | undefined
private selectedICEIPs: string[] = []

private hasEnded = false
private signaller: Signaller
Expand Down Expand Up @@ -87,10 +87,9 @@ export class WebRTCManager {
* @param { Ref<string[]> } selectedICEIPs
* @returns { startStreamReturn }
*/
public startStream(
selectedStream: Ref<Stream | undefined>,
selectedICEIPs: Ref<string[] | undefined>
): startStreamReturn {
public startStream(selectedStream: Ref<Stream | undefined>, selectedICEIPs: Ref<string[]>): startStreamReturn {
this.selectedICEIPs = selectedICEIPs.value

watch(selectedStream, (newStream, oldStream) => {
if (newStream?.id === oldStream?.id) {
return
Expand Down Expand Up @@ -126,9 +125,6 @@ export class WebRTCManager {
}
})

// FIXME: I want to assign this.selectedICEIPs when startStream is first called
// this.selectedICEIPs = selectedICEIPs.value

return {
availableStreams: this.availableStreams,
availableICEIPs: this.availableICEIPs,
Expand Down

0 comments on commit 7715401

Please sign in to comment.