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>
This commit is contained in:
@ -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> = ({
|
||||
|
||||
Reference in New Issue
Block a user