Compare commits

...

1 Commits

Author SHA1 Message Date
73129b9f1c Use HTMLMediaElement.play() on video assignment
This is a bit of a long-shot debugging attempt; but when I've inspected
the state of a frozen KCMA app, the stream had never been told to play.
I don't know that I've been able to interpret the debug messages.

There's an autoPlay set, but I'm not clear enough about the ordering of
how the events fire; so I'm going to add this to avoid doubt; and the
ancidata of smashing f5 has been helpful in seeing the play message get
to the stream now.

Signed-off-by: Paul R. Tagliamonte <paul@kittycad.io>
2023-08-22 14:12:32 -04:00

View File

@ -41,7 +41,9 @@ export const Stream = ({ className = '' }) => {
return
if (!videoRef.current) return
if (!mediaStream) return
console.log('setting video ref')
videoRef.current.srcObject = mediaStream
videoRef.current.play()
}, [mediaStream, engineCommandManager])
const handleMouseDown: MouseEventHandler<HTMLVideoElement> = ({