diff --git a/web/src/components/JSMpegPlayer.jsx b/web/src/components/JSMpegPlayer.jsx index 7543091ff..063c0be3c 100644 --- a/web/src/components/JSMpegPlayer.jsx +++ b/web/src/components/JSMpegPlayer.jsx @@ -15,6 +15,19 @@ export default function JSMpegPlayer({ camera }) { {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 () => { video.destroy(); };