Skip to content
Snippets Groups Projects
Commit 9b450ae1 authored by Pedro Beschorner Marin's avatar Pedro Beschorner Marin
Browse files

Check Safari before listening for ondevicechange

parent 78b0d027
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment