mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-06 19:25:22 +03:00
lint
This commit is contained in:
parent
fe54b654d7
commit
cafdacf46a
@ -364,24 +364,24 @@ class VideoRTC extends HTMLElement {
|
|||||||
let ms;
|
let ms;
|
||||||
|
|
||||||
if ('ManagedMediaSource' in window) {
|
if ('ManagedMediaSource' in window) {
|
||||||
const MediaSource = window.ManagedMediaSource;
|
const MediaSource = window.ManagedMediaSource;
|
||||||
|
|
||||||
ms = new MediaSource();
|
ms = new MediaSource();
|
||||||
ms.addEventListener('sourceopen', () => {
|
ms.addEventListener('sourceopen', () => {
|
||||||
this.send({type: 'mse', value: this.codecs(MediaSource.isTypeSupported)});
|
this.send({type: 'mse', value: this.codecs(MediaSource.isTypeSupported)});
|
||||||
}, {once: true});
|
}, {once: true});
|
||||||
|
|
||||||
this.video.disableRemotePlayback = true;
|
this.video.disableRemotePlayback = true;
|
||||||
this.video.srcObject = ms;
|
this.video.srcObject = ms;
|
||||||
} else {
|
} else {
|
||||||
ms = new MediaSource();
|
ms = new MediaSource();
|
||||||
ms.addEventListener('sourceopen', () => {
|
ms.addEventListener('sourceopen', () => {
|
||||||
URL.revokeObjectURL(this.video.src);
|
URL.revokeObjectURL(this.video.src);
|
||||||
this.send({type: 'mse', value: this.codecs(MediaSource.isTypeSupported)});
|
this.send({type: 'mse', value: this.codecs(MediaSource.isTypeSupported)});
|
||||||
}, {once: true});
|
}, {once: true});
|
||||||
|
|
||||||
this.video.src = URL.createObjectURL(ms);
|
this.video.src = URL.createObjectURL(ms);
|
||||||
this.video.srcObject = null;
|
this.video.srcObject = null;
|
||||||
}
|
}
|
||||||
this.play();
|
this.play();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user