Skip to content

Commit

Permalink
fix: remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
amar-1995 committed Oct 4, 2023
1 parent 30df703 commit 4f54146
Showing 1 changed file with 0 additions and 61 deletions.
61 changes: 0 additions & 61 deletions packages/roomkit-react/src/Prebuilt/layouts/EmbedView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,64 +92,3 @@ const EmbedComponent = () => {
</Box>
);
};

// 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 (
// <Box ref={iframeRef} css={{ size: '100%' }}>
// <iframe
// src={src}
// title={src}
// style={{ width: '100%', height: '100%', border: 0 }}
// allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture fullscreen"
// referrerPolicy="no-referrer"
// />
// </Box>
// );
// };

0 comments on commit 4f54146

Please sign in to comment.