Pause stream when exiting sketch or extruding (#2900)

* Pause when exiting sketch or extruding

* tsc
This commit is contained in:
49fl
2024-07-04 01:55:06 -04:00
committed by GitHub
parent fb3e922180
commit 6370d45f94
3 changed files with 16 additions and 3 deletions

View File

@ -68,6 +68,13 @@ export const Stream = () => {
if (!videoRef.current) return
if (!context.store?.mediaStream) return
videoRef.current.srcObject = context.store.mediaStream
send({
type: 'Set context',
data: {
videoElement: videoRef.current,
},
})
}, [context.store?.mediaStream])
const handleMouseDown: MouseEventHandler<HTMLDivElement> = (e) => {