diff --git a/packages/roomkit-react/src/Prebuilt/layouts/EmbedView.jsx b/packages/roomkit-react/src/Prebuilt/layouts/EmbedView.jsx index fb0721493b..044f0f34af 100644 --- a/packages/roomkit-react/src/Prebuilt/layouts/EmbedView.jsx +++ b/packages/roomkit-react/src/Prebuilt/layouts/EmbedView.jsx @@ -92,64 +92,3 @@ const EmbedComponent = () => { ); }; - -// const EmbedComponent = () => { -// const { amIScreenSharing, toggleScreenShare } = useScreenShare(throwErrorHandler); -// const [embedConfig, setEmbedConfig] = useSetAppDataByKey(APP_DATA.embedConfig); -// const [wasScreenShared, setWasScreenShared] = useState(false); -// // to handle - https://github.com/facebook/react/issues/24502 -// const screenShareAttemptInProgress = useRef(false); -// const src = embedConfig.url; -// const iframeRef = useRef(); - -// const resetEmbedConfig = useCallback(() => { -// if (src) { -// setEmbedConfig({ url: '' }); -// } -// }, [src, setEmbedConfig]); - -// useEffect(() => { -// if (embedConfig.shareScreen && !amIScreenSharing && !wasScreenShared && !screenShareAttemptInProgress.current) { -// screenShareAttemptInProgress.current = true; -// // start screenshare on load for others in the room to see -// toggleScreenShare({ -// forceCurrentTab: true, -// cropElement: iframeRef.current, -// }) -// .then(() => { -// setWasScreenShared(true); -// }) -// .catch(resetEmbedConfig) -// .finally(() => { -// screenShareAttemptInProgress.current = false; -// }); -// } -// // eslint-disable-next-line react-hooks/exhaustive-deps -// }, []); - -// useEffect(() => { -// // reset embed when screenshare is closed from anywhere -// if (wasScreenShared && !amIScreenSharing) { -// resetEmbedConfig(); -// } -// return () => { -// // close screenshare when this component is being unmounted -// if (wasScreenShared && amIScreenSharing) { -// resetEmbedConfig(); -// toggleScreenShare(); // stop -// } -// }; -// }, [wasScreenShared, amIScreenSharing, resetEmbedConfig, toggleScreenShare]); - -// return ( -// -//