From eecb15041012878988da93f5636845d8f1ec1622 Mon Sep 17 00:00:00 2001 From: Amar Bathwal <110378139+amar-1995@users.noreply.github.com> Date: Thu, 28 Dec 2023 10:53:04 +0530 Subject: [PATCH] fix: pdf share inside iframe --- apps/100ms-custom-app/package.json | 4 ++-- apps/100ms-web/package.json | 10 +++++----- packages/hls-player/package.json | 4 ++-- packages/hls-stats/package.json | 2 +- packages/hms-noise-suppression/package.json | 4 ++-- packages/hms-video-store/package.json | 4 ++-- packages/hms-video-web/package.json | 2 +- packages/hms-virtual-background/package.json | 6 +++--- packages/react-icons/package.json | 2 +- packages/react-sdk/package.json | 4 ++-- packages/react-sdk/src/hooks/usePDFShare.ts | 5 +++-- packages/roomkit-react/package.json | 10 +++++----- packages/roomkit-web/package.json | 4 ++-- 13 files changed, 31 insertions(+), 30 deletions(-) diff --git a/apps/100ms-custom-app/package.json b/apps/100ms-custom-app/package.json index 0d645b2537..29c87cfaa7 100644 --- a/apps/100ms-custom-app/package.json +++ b/apps/100ms-custom-app/package.json @@ -3,8 +3,8 @@ "version": "0.1.0", "private": true, "dependencies": { - "@100mslive/react-icons": "0.8.27-alpha.0", - "@100mslive/roomkit-react": "0.1.18-alpha.0", + "@100mslive/react-icons": "0.8.27-alpha.1", + "@100mslive/roomkit-react": "0.1.18-alpha.1", "axios": "^0.21.1", "js-cookies": "^1.0.4", "lodash.merge": "^4.6.2", diff --git a/apps/100ms-web/package.json b/apps/100ms-web/package.json index ccaec47c4a..74cf507465 100644 --- a/apps/100ms-web/package.json +++ b/apps/100ms-web/package.json @@ -9,11 +9,11 @@ "src" ], "dependencies": { - "@100mslive/hls-player": "0.1.27-alpha.0", - "@100mslive/hms-virtual-background": "1.11.27-alpha.0", - "@100mslive/react-icons": "0.8.27-alpha.0", - "@100mslive/react-sdk": "0.8.27-alpha.0", - "@100mslive/roomkit-react": "0.1.18-alpha.0", + "@100mslive/hls-player": "0.1.27-alpha.1", + "@100mslive/hms-virtual-background": "1.11.27-alpha.1", + "@100mslive/react-icons": "0.8.27-alpha.1", + "@100mslive/react-sdk": "0.8.27-alpha.1", + "@100mslive/roomkit-react": "0.1.18-alpha.1", "@emoji-mart/data": "^1.0.6", "@emoji-mart/react": "^1.0.1", "@tldraw/tldraw": "^1.18.4", diff --git a/packages/hls-player/package.json b/packages/hls-player/package.json index 6ba7b53a5d..1571cece7a 100644 --- a/packages/hls-player/package.json +++ b/packages/hls-player/package.json @@ -1,6 +1,6 @@ { "name": "@100mslive/hls-player", - "version": "0.1.27-alpha.0", + "version": "0.1.27-alpha.1", "description": "HLS client library which uses HTML5 Video element and Media Source Extension for playback", "main": "dist/index.cjs.js", "module": "dist/index.js", @@ -31,7 +31,7 @@ "author": "100ms", "license": "MIT", "dependencies": { - "@100mslive/hls-stats": "0.2.27-alpha.0", + "@100mslive/hls-stats": "0.2.27-alpha.1", "eventemitter2": "^6.4.7", "hls.js": "1.4.12" } diff --git a/packages/hls-stats/package.json b/packages/hls-stats/package.json index fbb7bc02ed..1fa62b48b2 100644 --- a/packages/hls-stats/package.json +++ b/packages/hls-stats/package.json @@ -1,6 +1,6 @@ { "name": "@100mslive/hls-stats", - "version": "0.2.27-alpha.0", + "version": "0.2.27-alpha.1", "description": "A simple library that provides stats for your hls stream", "main": "dist/index.cjs.js", "module": "dist/index.js", diff --git a/packages/hms-noise-suppression/package.json b/packages/hms-noise-suppression/package.json index b40ba6d89d..cc56c37fb3 100644 --- a/packages/hms-noise-suppression/package.json +++ b/packages/hms-noise-suppression/package.json @@ -1,5 +1,5 @@ { - "version": "0.9.27-alpha.0", + "version": "0.9.27-alpha.1", "license": "MIT", "main": "dist/index.cjs.js", "typings": "dist/index.d.ts", @@ -37,6 +37,6 @@ "author": "vishaldhull09", "module": "dist/index.js", "devDependencies": { - "@100mslive/hms-video": "0.9.27-alpha.0" + "@100mslive/hms-video": "0.9.27-alpha.1" } } diff --git a/packages/hms-video-store/package.json b/packages/hms-video-store/package.json index de7a3dbbf1..2dffba8b22 100644 --- a/packages/hms-video-store/package.json +++ b/packages/hms-video-store/package.json @@ -1,5 +1,5 @@ { - "version": "0.10.27-alpha.0", + "version": "0.10.27-alpha.1", "license": "MIT", "main": "dist/index.cjs.js", "module": "dist/index.js", @@ -41,7 +41,7 @@ "author": "100ms", "sideEffects": false, "dependencies": { - "@100mslive/hms-video": "0.9.27-alpha.0", + "@100mslive/hms-video": "0.9.27-alpha.1", "eventemitter2": "^6.4.7", "immer": "^9.0.6", "reselect": "4.0.0", diff --git a/packages/hms-video-web/package.json b/packages/hms-video-web/package.json index e48eedcbb0..8b2f2c0d70 100644 --- a/packages/hms-video-web/package.json +++ b/packages/hms-video-web/package.json @@ -1,6 +1,6 @@ { "name": "@100mslive/hms-video", - "version": "0.9.27-alpha.0", + "version": "0.9.27-alpha.1", "license": "MIT", "main": "dist/index.cjs.js", "typings": "dist/index.d.ts", diff --git a/packages/hms-virtual-background/package.json b/packages/hms-virtual-background/package.json index 0a4a5a0934..453881a9ba 100755 --- a/packages/hms-virtual-background/package.json +++ b/packages/hms-virtual-background/package.json @@ -1,5 +1,5 @@ { - "version": "1.11.27-alpha.0", + "version": "1.11.27-alpha.1", "license": "MIT", "main": "dist/index.cjs.js", "typings": "dist/index.d.ts", @@ -24,13 +24,13 @@ "format": "prettier --write src/**/*.ts" }, "peerDependencies": { - "@100mslive/hms-video": "0.9.27-alpha.0" + "@100mslive/hms-video": "0.9.27-alpha.1" }, "name": "@100mslive/hms-virtual-background", "author": "ashish17", "module": "dist/index.js", "devDependencies": { - "@100mslive/hms-video": "0.9.27-alpha.0" + "@100mslive/hms-video": "0.9.27-alpha.1" }, "dependencies": { "@mediapipe/selfie_segmentation": "^0.1.1632777926", diff --git a/packages/react-icons/package.json b/packages/react-icons/package.json index db0b3d63f1..cc69a34a51 100644 --- a/packages/react-icons/package.json +++ b/packages/react-icons/package.json @@ -4,7 +4,7 @@ "main": "dist/index.cjs.js", "module": "dist/index.js", "typings": "dist/index.d.ts", - "version": "0.8.27-alpha.0", + "version": "0.8.27-alpha.1", "author": "100ms", "license": "MIT", "files": [ diff --git a/packages/react-sdk/package.json b/packages/react-sdk/package.json index 8d50d14f04..c130b07201 100644 --- a/packages/react-sdk/package.json +++ b/packages/react-sdk/package.json @@ -4,7 +4,7 @@ "main": "dist/index.cjs.js", "module": "dist/index.js", "typings": "dist/index.d.ts", - "version": "0.8.27-alpha.0", + "version": "0.8.27-alpha.1", "author": "100ms", "license": "MIT", "files": [ @@ -43,7 +43,7 @@ "react": ">=16.8 <19.0.0" }, "dependencies": { - "@100mslive/hms-video-store": "0.10.27-alpha.0", + "@100mslive/hms-video-store": "0.10.27-alpha.1", "react-resize-detector": "^7.0.0", "zustand": "^3.6.2" } diff --git a/packages/react-sdk/src/hooks/usePDFShare.ts b/packages/react-sdk/src/hooks/usePDFShare.ts index 3c1447175e..cb684b4e7a 100644 --- a/packages/react-sdk/src/hooks/usePDFShare.ts +++ b/packages/react-sdk/src/hooks/usePDFShare.ts @@ -87,10 +87,11 @@ export const usePDFShare = (resetConfig?: () => void): usePDFShareResult => { }; inProgress.current = true; setSharing(true); + const isInsideIframe = window.self !== window.top; await toggleScreenShare?.({ - forceCurrentTab: isChromiumBased, + forceCurrentTab: isChromiumBased && !isInsideIframe, cropElement: iframeRef.current, - preferCurrentTab: isChromiumBased, + preferCurrentTab: isChromiumBased && !isInsideIframe, }); }, [amIScreenSharing, sendDataToPDFIframe, toggleScreenShare], diff --git a/packages/roomkit-react/package.json b/packages/roomkit-react/package.json index 34b9e73051..0f08518a55 100644 --- a/packages/roomkit-react/package.json +++ b/packages/roomkit-react/package.json @@ -10,7 +10,7 @@ "prebuilt", "roomkit" ], - "version": "0.1.18-alpha.0", + "version": "0.1.18-alpha.1", "author": "100ms", "license": "MIT", "files": [ @@ -76,10 +76,10 @@ "react": ">=17.0.2 <19.0.0" }, "dependencies": { - "@100mslive/hls-player": "0.1.27-alpha.0", - "@100mslive/hms-virtual-background": "1.11.27-alpha.0", - "@100mslive/react-icons": "0.8.27-alpha.0", - "@100mslive/react-sdk": "0.8.27-alpha.0", + "@100mslive/hls-player": "0.1.27-alpha.1", + "@100mslive/hms-virtual-background": "1.11.27-alpha.1", + "@100mslive/react-icons": "0.8.27-alpha.1", + "@100mslive/react-sdk": "0.8.27-alpha.1", "@100mslive/types-prebuilt": "0.12.5", "@emoji-mart/data": "^1.0.6", "@emoji-mart/react": "^1.0.1", diff --git a/packages/roomkit-web/package.json b/packages/roomkit-web/package.json index 939b4acb1c..4c10fd0c1b 100644 --- a/packages/roomkit-web/package.json +++ b/packages/roomkit-web/package.json @@ -1,6 +1,6 @@ { "name": "@100mslive/roomkit-web", - "version": "0.0.11-alpha.0", + "version": "0.0.11-alpha.1", "description": "A web component implementation of 100ms Prebuilt component", "keywords": [ "web-components", @@ -28,7 +28,7 @@ "build": "rm -rf dist && node ../../scripts/build-webapp" }, "dependencies": { - "@100mslive/roomkit-react": "0.1.18-alpha.0", + "@100mslive/roomkit-react": "0.1.18-alpha.1", "@r2wc/react-to-web-component": "2.0.2" } }