Don't try to load nonexisting cameras. Fix #103
This commit is contained in:
parent
6b61bf18cd
commit
415eb75e87
File diff suppressed because one or more lines are too long
@ -381,6 +381,9 @@ class BrowserMod {
|
||||
`;
|
||||
document.body.appendChild(this._canvas);
|
||||
document.body.appendChild(this._video);
|
||||
if(!navigator.mediaDevices) {
|
||||
return;
|
||||
}
|
||||
navigator.mediaDevices.getUserMedia({video: true, audio: false}).then((stream) => {
|
||||
this._video.srcObject = stream;
|
||||
this._video.play();
|
||||
|
@ -3,6 +3,9 @@ default_config:
|
||||
demo:
|
||||
|
||||
browser_mod:
|
||||
devices:
|
||||
camdevice:
|
||||
camera: true
|
||||
|
||||
lovelace:
|
||||
mode: yaml
|
||||
|
Loading…
x
Reference in New Issue
Block a user