Check Safari before listening for ondevicechange
This commit is contained in:
parent
78b0d0276a
commit
9b450ae1d9
@ -41,7 +41,10 @@ class VideoService {
|
||||
this.numberOfDevices = 0;
|
||||
|
||||
this.updateNumberOfDevices = this.updateNumberOfDevices.bind(this);
|
||||
navigator.mediaDevices.ondevicechange = (event) => this.updateNumberOfDevices();
|
||||
// Safari doesn't support ondevicechange
|
||||
if (!this.isSafari) {
|
||||
navigator.mediaDevices.ondevicechange = (event) => this.updateNumberOfDevices();
|
||||
}
|
||||
this.updateNumberOfDevices();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user