Skip to content

Commit

Permalink
fix(Webcam): add ICE Candidates check to support older camera-streame…
Browse files Browse the repository at this point in the history
…r versions (#2069)

Signed-off-by: Stefan Dej <[email protected]>
  • Loading branch information
meteyou authored Dec 7, 2024
1 parent 4a68186 commit 7c23d9e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/webcams/streamers/WebrtcCameraStreamer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,12 @@ export default class WebrtcCameraStreamer extends Mixins(BaseMixin, WebcamMixin)
this.pc.addTransceiver('video', { direction: 'recvonly' })
this.pc.onicecandidate = (e: RTCPeerConnectionIceEvent) => this.onIceCandidate(e, iceResponse.id)
if ('iceServers' in iceResponse) {
this.pc.onicecandidate = (e: RTCPeerConnectionIceEvent) => this.onIceCandidate(e, iceResponse.id)
} else {
this.log('No ICE servers returned, so the current camera-streamer version may not support them')
}
this.pc.onconnectionstatechange = () => this.onConnectionStateChange()
this.pc.ontrack = (e) => this.onTrack(e)
Expand Down

0 comments on commit 7c23d9e

Please sign in to comment.