@ -185,6 +185,18 @@ export const Stream = () => {
|
|||||||
}
|
}
|
||||||
}, [IDLE, streamState])
|
}, [IDLE, streamState])
|
||||||
|
|
||||||
|
// HOT FIX: for https://github.com/KittyCAD/modeling-app/pull/3250
|
||||||
|
// TODO review if there's a better way to play the stream again.
|
||||||
|
useEffect(() => {
|
||||||
|
if (!kclManager.isFirstRender)
|
||||||
|
setTimeout(() =>
|
||||||
|
// execute in the next event loop
|
||||||
|
videoRef.current?.play().catch((e) => {
|
||||||
|
console.warn('Video playing was prevented', e, videoRef.current)
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}, [kclManager.isFirstRender])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (
|
if (
|
||||||
typeof window === 'undefined' ||
|
typeof window === 'undefined' ||
|
||||||
|
Reference in New Issue
Block a user