mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
add fullscreen to jsmpeg player
This commit is contained in:
parent
b3ee2de079
commit
f94a946418
@ -15,6 +15,19 @@ export default function JSMpegPlayer({ camera }) {
|
|||||||
{protocols: [], audio: false}
|
{protocols: [], audio: false}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const fullscreen = () => {
|
||||||
|
console.log("fullscreen");
|
||||||
|
|
||||||
|
if(video.els.canvas.webkitRequestFullScreen) {
|
||||||
|
video.els.canvas.webkitRequestFullScreen();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
video.els.canvas.mozRequestFullScreen();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
video.els.canvas.addEventListener("click",fullscreen)
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
video.destroy();
|
video.destroy();
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user