datakeen-session-react 1.1.140-dev.27 → 1.1.140-dev.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/selfie/VideoResetStyles.js +1 -1
- package/dist/cjs/components/selfie/VideoResetStyles.js.map +1 -1
- package/dist/cjs/components/selfie/selfie-flow/SelfieRecorder.js +2 -2
- package/dist/cjs/components/selfie/selfie-flow/SelfieRecorder.js.map +1 -1
- package/dist/esm/components/selfie/VideoResetStyles.js +1 -1
- package/dist/esm/components/selfie/VideoResetStyles.js.map +1 -1
- package/dist/esm/components/selfie/selfie-flow/SelfieRecorder.js +2 -2
- package/dist/esm/components/selfie/selfie-flow/SelfieRecorder.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ var VideoResetStyles = function () {
|
|
|
14
14
|
var resetStyle = document.createElement("style");
|
|
15
15
|
resetStyle.id = "video-reset-global-styles";
|
|
16
16
|
// Réinitialiser tous les styles potentiellement problématiques
|
|
17
|
-
resetStyle.textContent = "\n /* R\u00E9initialiser les styles globaux qui pourraient affecter l'affichage de la vid\u00E9o */\n .selfie {\n --uni-primary-color: #11e5c5;\n --uni-secondary-color: #0a9983;\n --uni-primary-color-lighter: #37a998;\n --uni-secondary-color-lighter: #1cbeaa;\n --uni-alt-color: #086e5f;\n --uni-alt-color-lighter: #0d9485;\n --uni-light-color-variant-1: #d0f7f2;\n --uni-light-color-variant-2: #b2ece5;\n --uni-light-color: #fff;\n --uni-dark-color: #202020;\n --uni-error-color: #f44336;\n\n --uni-btn-padding: 10px 15px;\n --uni-btn-border: solid 0px;\n --uni-btn-border-radius: 0px;\n --uni-btn-font-size: 16px;\n --uni-btn-text-transform: normal;\n --uni-btn-border-outlined: solid 1px;\n --uni-btn-label-margin: 10px 0px;\n --uni-btn-disabled-bg-color: #eee;\n\n --uni-card-bg-color: transparent;\n }\n \n /* Forcer tous les \u00E9l\u00E9ments vid\u00E9o \u00E0 avoir le bon style */\n uni-video-recorder,\n uni-video-recorder::shadow-root *,\n uni-video-recorder::part(*),\n video-js,\n .video-js,\n .vjs-default-skin,\n .vjs-big-play-button,\n .vjs-control-bar {\n border-radius: 0 !important;\n background-color: transparent !important;\n overflow: hidden !important;\n }\n \n /* Cibler sp\u00E9cifiquement le conteneur vid\u00E9o */\n .video-container video,\n .video-container canvas {\n border-radius: 0 !important;\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n }\n \n /* Forcer l'\u00E9limination de tous les fonds noirs */\n .selfie
|
|
17
|
+
resetStyle.textContent = "\n /* R\u00E9initialiser les styles globaux qui pourraient affecter l'affichage de la vid\u00E9o */\n .selfie {\n --uni-primary-color: #11e5c5;\n --uni-secondary-color: #0a9983;\n --uni-primary-color-lighter: #37a998;\n --uni-secondary-color-lighter: #1cbeaa;\n --uni-alt-color: #086e5f;\n --uni-alt-color-lighter: #0d9485;\n --uni-light-color-variant-1: #d0f7f2;\n --uni-light-color-variant-2: #b2ece5;\n --uni-light-color: #fff;\n --uni-dark-color: #202020;\n --uni-error-color: #f44336;\n\n --uni-btn-padding: 10px 15px;\n --uni-btn-border: solid 0px;\n --uni-btn-border-radius: 0px;\n --uni-btn-font-size: 16px;\n --uni-btn-text-transform: normal;\n --uni-btn-border-outlined: solid 1px;\n --uni-btn-label-margin: 10px 0px;\n --uni-btn-disabled-bg-color: #eee;\n\n --uni-card-bg-color: transparent;\n }\n \n /* Forcer tous les \u00E9l\u00E9ments vid\u00E9o \u00E0 avoir le bon style */\n uni-video-recorder,\n uni-video-recorder::shadow-root *,\n uni-video-recorder::part(*),\n video-js,\n .video-js,\n .vjs-default-skin,\n .vjs-big-play-button,\n .vjs-control-bar {\n border-radius: 0 !important;\n background-color: transparent !important;\n overflow: hidden !important;\n }\n \n /* Cibler sp\u00E9cifiquement le conteneur vid\u00E9o */\n .video-container video,\n .video-container canvas {\n border-radius: 0 !important;\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n }\n \n /* Forcer l'\u00E9limination de tous les fonds noirs (hors boutons et \u00E9l\u00E9ments UI) */\n .selfie *:not(button):not(.selfie-button):not([class*=\"btn\"]) {\n background-color: transparent !important;\n }\n \n /* S'assurer que le composant VideoRecorder prend tout l'espace */\n .selfie .video-container uni-video-recorder {\n width: 100% !important;\n height: 100% !important;\n max-width: 100% !important;\n max-height: 100% !important;\n }\n ";
|
|
18
18
|
// Ajouter l'élément style au head du document
|
|
19
19
|
document.head.appendChild(resetStyle);
|
|
20
20
|
// Nettoyer en supprimant l'élément style lors du démontage du composant
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoResetStyles.js","sources":["../../../../../src/components/selfie/VideoResetStyles.tsx"],"sourcesContent":["import { useEffect } from \"react\";\n\n/**\n * Composant qui injecte des styles CSS globaux pour réinitialiser\n * tous les styles potentiellement problématiques du VideoRecorder\n */\nconst VideoResetStyles = () => {\n useEffect(() => {\n // Créer un élément style pour les styles de réinitialisation globaux\n const resetStyle = document.createElement(\"style\");\n resetStyle.id = \"video-reset-global-styles\";\n\n // Réinitialiser tous les styles potentiellement problématiques\n resetStyle.textContent = `\n /* Réinitialiser les styles globaux qui pourraient affecter l'affichage de la vidéo */\n .selfie {\n --uni-primary-color: #11e5c5;\n --uni-secondary-color: #0a9983;\n --uni-primary-color-lighter: #37a998;\n --uni-secondary-color-lighter: #1cbeaa;\n --uni-alt-color: #086e5f;\n --uni-alt-color-lighter: #0d9485;\n --uni-light-color-variant-1: #d0f7f2;\n --uni-light-color-variant-2: #b2ece5;\n --uni-light-color: #fff;\n --uni-dark-color: #202020;\n --uni-error-color: #f44336;\n\n --uni-btn-padding: 10px 15px;\n --uni-btn-border: solid 0px;\n --uni-btn-border-radius: 0px;\n --uni-btn-font-size: 16px;\n --uni-btn-text-transform: normal;\n --uni-btn-border-outlined: solid 1px;\n --uni-btn-label-margin: 10px 0px;\n --uni-btn-disabled-bg-color: #eee;\n\n --uni-card-bg-color: transparent;\n }\n \n /* Forcer tous les éléments vidéo à avoir le bon style */\n uni-video-recorder,\n uni-video-recorder::shadow-root *,\n uni-video-recorder::part(*),\n video-js,\n .video-js,\n .vjs-default-skin,\n .vjs-big-play-button,\n .vjs-control-bar {\n border-radius: 0 !important;\n background-color: transparent !important;\n overflow: hidden !important;\n }\n \n /* Cibler spécifiquement le conteneur vidéo */\n .video-container video,\n .video-container canvas {\n border-radius: 0 !important;\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n }\n \n /* Forcer l'élimination de tous les fonds noirs */\n .selfie
|
|
1
|
+
{"version":3,"file":"VideoResetStyles.js","sources":["../../../../../src/components/selfie/VideoResetStyles.tsx"],"sourcesContent":["import { useEffect } from \"react\";\n\n/**\n * Composant qui injecte des styles CSS globaux pour réinitialiser\n * tous les styles potentiellement problématiques du VideoRecorder\n */\nconst VideoResetStyles = () => {\n useEffect(() => {\n // Créer un élément style pour les styles de réinitialisation globaux\n const resetStyle = document.createElement(\"style\");\n resetStyle.id = \"video-reset-global-styles\";\n\n // Réinitialiser tous les styles potentiellement problématiques\n resetStyle.textContent = `\n /* Réinitialiser les styles globaux qui pourraient affecter l'affichage de la vidéo */\n .selfie {\n --uni-primary-color: #11e5c5;\n --uni-secondary-color: #0a9983;\n --uni-primary-color-lighter: #37a998;\n --uni-secondary-color-lighter: #1cbeaa;\n --uni-alt-color: #086e5f;\n --uni-alt-color-lighter: #0d9485;\n --uni-light-color-variant-1: #d0f7f2;\n --uni-light-color-variant-2: #b2ece5;\n --uni-light-color: #fff;\n --uni-dark-color: #202020;\n --uni-error-color: #f44336;\n\n --uni-btn-padding: 10px 15px;\n --uni-btn-border: solid 0px;\n --uni-btn-border-radius: 0px;\n --uni-btn-font-size: 16px;\n --uni-btn-text-transform: normal;\n --uni-btn-border-outlined: solid 1px;\n --uni-btn-label-margin: 10px 0px;\n --uni-btn-disabled-bg-color: #eee;\n\n --uni-card-bg-color: transparent;\n }\n \n /* Forcer tous les éléments vidéo à avoir le bon style */\n uni-video-recorder,\n uni-video-recorder::shadow-root *,\n uni-video-recorder::part(*),\n video-js,\n .video-js,\n .vjs-default-skin,\n .vjs-big-play-button,\n .vjs-control-bar {\n border-radius: 0 !important;\n background-color: transparent !important;\n overflow: hidden !important;\n }\n \n /* Cibler spécifiquement le conteneur vidéo */\n .video-container video,\n .video-container canvas {\n border-radius: 0 !important;\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n }\n \n /* Forcer l'élimination de tous les fonds noirs (hors boutons et éléments UI) */\n .selfie *:not(button):not(.selfie-button):not([class*=\"btn\"]) {\n background-color: transparent !important;\n }\n \n /* S'assurer que le composant VideoRecorder prend tout l'espace */\n .selfie .video-container uni-video-recorder {\n width: 100% !important;\n height: 100% !important;\n max-width: 100% !important;\n max-height: 100% !important;\n }\n `;\n\n // Ajouter l'élément style au head du document\n document.head.appendChild(resetStyle);\n\n // Nettoyer en supprimant l'élément style lors du démontage du composant\n return () => {\n const existingStyle = document.getElementById(\n \"video-reset-global-styles\"\n );\n if (existingStyle) {\n document.head.removeChild(existingStyle);\n }\n };\n }, []);\n\n // Ce composant ne rend rien dans le DOM\n return null;\n};\n\nexport default VideoResetStyles;\n"],"names":["useEffect"],"mappings":";;;;;;AAEA;;;AAGG;AACH,IAAM,gBAAgB,GAAG,YAAA;AACvB,IAAAA,eAAS,CAAC,YAAA;;QAER,IAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAClD,QAAA,UAAU,CAAC,EAAE,GAAG,2BAA2B;;AAG3C,QAAA,UAAU,CAAC,WAAW,GAAG,8rEA8DxB;;AAGD,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC;;QAGrC,OAAO,YAAA;YACL,IAAM,aAAa,GAAG,QAAQ,CAAC,cAAc,CAC3C,2BAA2B,CAC5B;YACD,IAAI,aAAa,EAAE;AACjB,gBAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC;YAC1C;AACF,QAAA,CAAC;IACH,CAAC,EAAE,EAAE,CAAC;;AAGN,IAAA,OAAO,IAAI;AACb;;;;"}
|
|
@@ -152,12 +152,12 @@ var SelfieRecorder = function (_a) {
|
|
|
152
152
|
setRecordingState("processing");
|
|
153
153
|
handleSelfie(enhancedEvent);
|
|
154
154
|
};
|
|
155
|
-
return (jsxRuntime.jsxs("div", { className: "selfie flex flex-col h-full w-full overflow-hidden", children: [jsxRuntime.jsxs("div", { className: "p-4 text-center", children: [jsxRuntime.jsx(Title.default, { className: "text-lg md:text-xl mb-1", children: t("selfie.recorder.title") }), jsxRuntime.jsx(Subtitle.default, { className: "text-xs text-gray-600 md:text-sm", children: t("selfie.recorder.subtitle") })] }), jsxRuntime.jsx("div", { className: "video-container flex-
|
|
155
|
+
return (jsxRuntime.jsxs("div", { className: "selfie flex flex-col h-full w-full overflow-hidden min-h-0", children: [jsxRuntime.jsxs("div", { className: "p-4 text-center shrink-0", children: [jsxRuntime.jsx(Title.default, { className: "text-lg md:text-xl mb-1", children: t("selfie.recorder.title") }), jsxRuntime.jsx(Subtitle.default, { className: "text-xs text-gray-600 md:text-sm", children: t("selfie.recorder.subtitle") })] }), jsxRuntime.jsx("div", { className: "video-container flex-1 min-h-0 relative flex items-center justify-center overflow-hidden", children: jsxRuntime.jsx(sdkReact.VideoRecorder, tslib_es6.__assign({ ref: recorderRef, preset: sdkReact.AcquisitionPreset.SELFIE_OPTIMIZED, hideCaptureBtn: true, faceChecker: "enabled", disableDebugMode: true, onRecorderReady: handleRecorderReady, onRecordCompleted: handleRecordCompleted, onRecord: recordStarting, style: { width: "100%", height: "100%" }, className: "video-recorder-no-radius w-full h-full" }, (selfieCaptureUtils.isIOS() && {
|
|
156
156
|
// iOS-specific attributes for fixing black screen
|
|
157
157
|
"data-playsinline": "true",
|
|
158
158
|
"data-autoplay": "true",
|
|
159
159
|
"data-muted": "true"
|
|
160
|
-
}), { strings: unisseyStrings.getUnisseyStrings(t) })) }), jsxRuntime.jsx("div", { className: "
|
|
160
|
+
}), { strings: unisseyStrings.getUnisseyStrings(t) })) }), jsxRuntime.jsx("div", { className: "shrink-0 bg-white border-t border-gray-200 p-4 md:p-6", children: jsxRuntime.jsxs("div", { className: "max-w-md mx-auto", children: [jsxRuntime.jsx("div", { className: "text-center text-xs text-gray-400 mt-3", children: t("selfie.recorder.note") }), jsxRuntime.jsxs(Button.default, { onClick: recordStarting, className: "w-full py-3 md:py-4 relative selfie-button", disabled: disableButton || !recorderReady, children: [recordingState === "idle" && t("selfie.recorder.start"), recordingState === "preparing" && t("selfie.recorder.preparing"), recordingState === "recording" && (jsxRuntime.jsxs("span", { className: "flex items-center justify-center", children: [jsxRuntime.jsx("span", { className: "mr-2", children: t("selfie.recorder.recording_label") }), jsxRuntime.jsxs("span", { className: "flex space-x-1 loading-dots", children: [jsxRuntime.jsx("span", { className: "h-1 w-1 bg-white rounded-full" }), jsxRuntime.jsx("span", { className: "h-1 w-1 bg-white rounded-full" }), jsxRuntime.jsx("span", { className: "h-1 w-1 bg-white rounded-full" })] })] })), recordingState === "processing" && t("selfie.recorder.processing")] })] }) })] }));
|
|
161
161
|
};
|
|
162
162
|
|
|
163
163
|
exports.default = SelfieRecorder;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelfieRecorder.js","sources":["../../../../../../src/components/selfie/selfie-flow/SelfieRecorder.tsx"],"sourcesContent":["import { useRef, useState, useEffect } from \"react\";\nimport { AcquisitionPreset, VideoRecorder } from \"@unissey-web/sdk-react\";\nimport Button from \"../../ui/Button\";\nimport Title from \"../../ui/Title\";\nimport Subtitle from \"../../ui/Subtitle\";\nimport useVideoRecorderStyles from \"../hooks/useVideoRecorderStyles\";\nimport { setupVideoElementsObserver } from \"../utils/videoElementStyles\";\nimport { delay, isIOS, waitForVideoFrame, getRecorderVideoElement } from \"../utils/selfieCaptureUtils\";\nimport { useLiveFrameCapture } from \"../hooks/useLiveFrameCapture\";\nimport { useI18n } from \"../../../hooks/useI18n\";\nimport { getUnisseyStrings } from \"../utils/unisseyStrings\";\n\ninterface SelfieRecorderProps {\n handleSelfie: (e: Event) => void;\n onBeginCapture?: () => void;\n isCapturing?: boolean;\n}\n\ninterface VideoRecorderRef extends HTMLElement {\n capture: () => void;\n}\n\nconst SelfieRecorder = ({\n handleSelfie,\n onBeginCapture = () => { },\n isCapturing = false,\n}: SelfieRecorderProps) => {\n const { t } = useI18n();\n const recorderRef = useRef<VideoRecorderRef | null>(null);\n const [disableButton, setDisableButton] = useState(false);\n const [recorderReady, setRecorderReady] = useState(false);\n const [recordingState, setRecordingState] = useState<\n \"idle\" | \"preparing\" | \"recording\" | \"processing\"\n >(\"idle\");\n const capturedThumbnailRef = useRef<string | null>(null);\n const { captureFrame, cleanup } = useLiveFrameCapture();\n\n useVideoRecorderStyles();\n\n useEffect(() => {\n document.body.classList.add(\"recording-selfie\");\n const cleanupObserver = setupVideoElementsObserver();\n\n // iOS-specific fix: Add required attributes to video elements after mount\n if (isIOS()) {\n const addIOSVideoAttributes = () => {\n const videoRecorders = document.querySelectorAll(\"uni-video-recorder\");\n videoRecorders.forEach((recorder) => {\n // Try to access shadow DOM and video elements\n try {\n const shadowRoot = (recorder as any).shadowRoot;\n if (shadowRoot) {\n const videoElements = shadowRoot.querySelectorAll(\"video\");\n videoElements.forEach((video: HTMLVideoElement) => {\n video.setAttribute(\"playsinline\", \"true\");\n video.setAttribute(\"autoplay\", \"true\");\n video.setAttribute(\"muted\", \"true\");\n // Ensure video plays inline and autoplays\n video.playsInline = true;\n video.autoplay = true;\n video.muted = true;\n });\n }\n } catch (error) {\n console.log(\"Could not access shadow DOM:\", error);\n }\n\n // Also set attributes on the component itself\n recorder.setAttribute(\"playsinline\", \"true\");\n recorder.setAttribute(\"autoplay\", \"true\");\n recorder.setAttribute(\"muted\", \"true\");\n });\n };\n\n // Apply immediately and also after a delay to catch dynamically created elements\n addIOSVideoAttributes();\n const iosTimeout = setTimeout(addIOSVideoAttributes, 500);\n const iosInterval = setInterval(addIOSVideoAttributes, 1000);\n\n return () => {\n document.body.classList.remove(\"recording-selfie\");\n cleanupObserver();\n cleanup();\n clearTimeout(iosTimeout);\n clearInterval(iosInterval);\n };\n }\n\n return () => {\n document.body.classList.remove(\"recording-selfie\");\n cleanupObserver();\n cleanup();\n };\n }, [cleanup]);\n\n const recordStarting = () => {\n if (!recorderReady || recordingState !== \"idle\") return;\n onBeginCapture();\n setRecordingState(\"preparing\");\n setDisableButton(true);\n\n const triggerCapture = async () => {\n try {\n await waitForVideoFrame(recorderRef.current);\n await delay(200);\n setRecordingState(\"recording\");\n\n // Capture a frame from the live video during recording (after a short delay)\n setTimeout(() => {\n const videoElement = getRecorderVideoElement(recorderRef.current);\n if (videoElement) {\n const thumbnail = captureFrame(videoElement);\n capturedThumbnailRef.current = thumbnail;\n }\n }, 1000); // Capture frame 1 second into recording\n\n recorderRef.current?.capture();\n } catch (error) {\n console.error(\"SelfieRecorder: failed to capture frame\", error);\n setRecordingState(\"idle\");\n setDisableButton(false);\n }\n };\n\n void triggerCapture();\n };\n\n const handleRecorderReady = () => setRecorderReady(true);\n\n const handleRecordCompleted = (e: Event) => {\n const customEvent = e as CustomEvent<{ media?: Blob; metadata?: string }>;\n if (!customEvent.detail?.media || customEvent.detail.media.size === 0) {\n console.error(\"❌ No valid media captured\");\n\n // iOS-specific debugging\n if (isIOS()) {\n console.log(\"🍎 iOS detected - checking video elements for proper attributes\");\n const videoRecorders = document.querySelectorAll(\"uni-video-recorder\");\n videoRecorders.forEach((recorder, index) => {\n console.log(`VideoRecorder ${index}:`, {\n playsinline: recorder.getAttribute(\"playsinline\"),\n autoplay: recorder.getAttribute(\"autoplay\"),\n muted: recorder.getAttribute(\"muted\")\n });\n });\n }\n\n setRecordingState(\"idle\");\n setDisableButton(false);\n return;\n }\n\n // Attach the captured thumbnail to the event\n const enhancedEvent = new CustomEvent('record-completed', {\n detail: {\n media: customEvent.detail.media,\n metadata: customEvent.detail.metadata || '',\n thumbnail: capturedThumbnailRef.current || undefined,\n }\n });\n\n setRecordingState(\"processing\");\n handleSelfie(enhancedEvent);\n };\n\n return (\n <div className=\"selfie flex flex-col h-full w-full overflow-hidden\">\n <div className=\"p-4 text-center\">\n <Title className=\"text-lg md:text-xl mb-1\">{t(\"selfie.recorder.title\")}</Title>\n <Subtitle className=\"text-xs text-gray-600 md:text-sm\">{t(\"selfie.recorder.subtitle\")}</Subtitle>\n </div>\n\n <div className=\"video-container flex-grow relative flex items-center justify-center overflow-hidden\">\n <VideoRecorder\n ref={recorderRef as any}\n preset={AcquisitionPreset.SELFIE_OPTIMIZED}\n hideCaptureBtn\n faceChecker=\"enabled\"\n disableDebugMode\n onRecorderReady={handleRecorderReady}\n onRecordCompleted={handleRecordCompleted}\n onRecord={recordStarting}\n style={{ width: \"100%\", height: \"100%\" }}\n className=\"video-recorder-no-radius w-full h-full\"\n {...(isIOS() && {\n // iOS-specific attributes for fixing black screen\n \"data-playsinline\": \"true\",\n \"data-autoplay\": \"true\",\n \"data-muted\": \"true\"\n })}\n strings={getUnisseyStrings(t)}\n />\n </div>\n\n <div className=\"sticky bottom-0 bg-white border-t border-gray-200 p-4 md:p-6\">\n <div className=\"max-w-md mx-auto\">\n <div className=\"text-center text-xs text-gray-400 mt-3\">\n {t(\"selfie.recorder.note\")}\n </div>\n\n <Button\n onClick={recordStarting}\n className=\"w-full py-3 md:py-4 relative selfie-button\"\n disabled={disableButton || !recorderReady}\n >\n {recordingState === \"idle\" && t(\"selfie.recorder.start\")}\n {recordingState === \"preparing\" && t(\"selfie.recorder.preparing\")}\n {recordingState === \"recording\" && (\n <span className=\"flex items-center justify-center\">\n <span className=\"mr-2\">{t(\"selfie.recorder.recording_label\")}</span>\n <span className=\"flex space-x-1 loading-dots\">\n <span className=\"h-1 w-1 bg-white rounded-full\"></span>\n <span className=\"h-1 w-1 bg-white rounded-full\"></span>\n <span className=\"h-1 w-1 bg-white rounded-full\"></span>\n </span>\n </span>\n )}\n {recordingState === \"processing\" && t(\"selfie.recorder.processing\")}\n </Button>\n </div>\n </div>\n </div>\n );\n};\n\nexport default SelfieRecorder;\n"],"names":["useI18n","useRef","useState","useLiveFrameCapture","useVideoRecorderStyles","useEffect","setupVideoElementsObserver","isIOS","__awaiter","waitForVideoFrame","delay","getRecorderVideoElement","_jsxs","_jsx","Title","Subtitle","VideoRecorder","__assign","AcquisitionPreset","getUnisseyStrings","Button"],"mappings":";;;;;;;;;;;;;;;;;;AAsBA,IAAM,cAAc,GAAG,UAAC,EAIF,EAAA;AAHpB,IAAA,IAAA,YAAY,GAAA,EAAA,CAAA,YAAA,CAAA,CACZ,EAAA,GAAA,EAAA,CAAA,cAA0B,CAAA,CAA1B,cAAc,GAAA,EAAA,KAAA,MAAA,GAAG,YAAA,EAAQ,CAAC,GAAA,EAAA,EAC1B,EAAA,CAAA,WAAmB;AAEX,IAAA,IAAA,CAAC,GAAKA,eAAO,EAAE,EAAd;AACT,IAAA,IAAM,WAAW,GAAGC,YAAM,CAA0B,IAAI,CAAC;IACnD,IAAA,EAAA,GAAoCC,cAAQ,CAAC,KAAK,CAAC,EAAlD,aAAa,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,gBAAgB,GAAA,EAAA,CAAA,CAAA,CAAmB;IACnD,IAAA,EAAA,GAAoCA,cAAQ,CAAC,KAAK,CAAC,EAAlD,aAAa,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,gBAAgB,GAAA,EAAA,CAAA,CAAA,CAAmB;IACnD,IAAA,EAAA,GAAsCA,cAAQ,CAElD,MAAM,CAAC,EAFF,cAAc,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,iBAAiB,GAAA,EAAA,CAAA,CAAA,CAE/B;AACT,IAAA,IAAM,oBAAoB,GAAGD,YAAM,CAAgB,IAAI,CAAC;IAClD,IAAA,EAAA,GAA4BE,uCAAmB,EAAE,EAA/C,YAAY,GAAA,EAAA,CAAA,YAAA,EAAE,OAAO,GAAA,EAAA,CAAA,OAA0B;AAEvD,IAAAC,8BAAsB,EAAE;AA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EAAA,EAAM,SAAS,EAAC,6BAA6B,EAAA,QAAA,EAAA,CAC3CC,yBAAM,SAAS,EAAC,+BAA+B,EAAA,CAAQ,EACvDA,cAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,+BAA+B,EAAA,CAAQ,EACvDA,cAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,+BAA+B,EAAA,CAAQ,CAAA,EAAA,CAClD,CAAA,EAAA,CACF,CACR,EACA,cAAc,KAAK,YAAY,IAAI,CAAC,CAAC,4BAA4B,CAAC,CAAA,EAAA,CAC5D,CAAA,EAAA,CACL,EAAA,CACF,CAAA,EAAA,CACF;AAEV;;;;"}
|
|
1
|
+
{"version":3,"file":"SelfieRecorder.js","sources":["../../../../../../src/components/selfie/selfie-flow/SelfieRecorder.tsx"],"sourcesContent":["import { useRef, useState, useEffect } from \"react\";\nimport { AcquisitionPreset, VideoRecorder } from \"@unissey-web/sdk-react\";\nimport Button from \"../../ui/Button\";\nimport Title from \"../../ui/Title\";\nimport Subtitle from \"../../ui/Subtitle\";\nimport useVideoRecorderStyles from \"../hooks/useVideoRecorderStyles\";\nimport { setupVideoElementsObserver } from \"../utils/videoElementStyles\";\nimport { delay, isIOS, waitForVideoFrame, getRecorderVideoElement } from \"../utils/selfieCaptureUtils\";\nimport { useLiveFrameCapture } from \"../hooks/useLiveFrameCapture\";\nimport { useI18n } from \"../../../hooks/useI18n\";\nimport { getUnisseyStrings } from \"../utils/unisseyStrings\";\n\ninterface SelfieRecorderProps {\n handleSelfie: (e: Event) => void;\n onBeginCapture?: () => void;\n isCapturing?: boolean;\n}\n\ninterface VideoRecorderRef extends HTMLElement {\n capture: () => void;\n}\n\nconst SelfieRecorder = ({\n handleSelfie,\n onBeginCapture = () => { },\n isCapturing = false,\n}: SelfieRecorderProps) => {\n const { t } = useI18n();\n const recorderRef = useRef<VideoRecorderRef | null>(null);\n const [disableButton, setDisableButton] = useState(false);\n const [recorderReady, setRecorderReady] = useState(false);\n const [recordingState, setRecordingState] = useState<\n \"idle\" | \"preparing\" | \"recording\" | \"processing\"\n >(\"idle\");\n const capturedThumbnailRef = useRef<string | null>(null);\n const { captureFrame, cleanup } = useLiveFrameCapture();\n\n useVideoRecorderStyles();\n\n useEffect(() => {\n document.body.classList.add(\"recording-selfie\");\n const cleanupObserver = setupVideoElementsObserver();\n\n // iOS-specific fix: Add required attributes to video elements after mount\n if (isIOS()) {\n const addIOSVideoAttributes = () => {\n const videoRecorders = document.querySelectorAll(\"uni-video-recorder\");\n videoRecorders.forEach((recorder) => {\n // Try to access shadow DOM and video elements\n try {\n const shadowRoot = (recorder as any).shadowRoot;\n if (shadowRoot) {\n const videoElements = shadowRoot.querySelectorAll(\"video\");\n videoElements.forEach((video: HTMLVideoElement) => {\n video.setAttribute(\"playsinline\", \"true\");\n video.setAttribute(\"autoplay\", \"true\");\n video.setAttribute(\"muted\", \"true\");\n // Ensure video plays inline and autoplays\n video.playsInline = true;\n video.autoplay = true;\n video.muted = true;\n });\n }\n } catch (error) {\n console.log(\"Could not access shadow DOM:\", error);\n }\n\n // Also set attributes on the component itself\n recorder.setAttribute(\"playsinline\", \"true\");\n recorder.setAttribute(\"autoplay\", \"true\");\n recorder.setAttribute(\"muted\", \"true\");\n });\n };\n\n // Apply immediately and also after a delay to catch dynamically created elements\n addIOSVideoAttributes();\n const iosTimeout = setTimeout(addIOSVideoAttributes, 500);\n const iosInterval = setInterval(addIOSVideoAttributes, 1000);\n\n return () => {\n document.body.classList.remove(\"recording-selfie\");\n cleanupObserver();\n cleanup();\n clearTimeout(iosTimeout);\n clearInterval(iosInterval);\n };\n }\n\n return () => {\n document.body.classList.remove(\"recording-selfie\");\n cleanupObserver();\n cleanup();\n };\n }, [cleanup]);\n\n const recordStarting = () => {\n if (!recorderReady || recordingState !== \"idle\") return;\n onBeginCapture();\n setRecordingState(\"preparing\");\n setDisableButton(true);\n\n const triggerCapture = async () => {\n try {\n await waitForVideoFrame(recorderRef.current);\n await delay(200);\n setRecordingState(\"recording\");\n\n // Capture a frame from the live video during recording (after a short delay)\n setTimeout(() => {\n const videoElement = getRecorderVideoElement(recorderRef.current);\n if (videoElement) {\n const thumbnail = captureFrame(videoElement);\n capturedThumbnailRef.current = thumbnail;\n }\n }, 1000); // Capture frame 1 second into recording\n\n recorderRef.current?.capture();\n } catch (error) {\n console.error(\"SelfieRecorder: failed to capture frame\", error);\n setRecordingState(\"idle\");\n setDisableButton(false);\n }\n };\n\n void triggerCapture();\n };\n\n const handleRecorderReady = () => setRecorderReady(true);\n\n const handleRecordCompleted = (e: Event) => {\n const customEvent = e as CustomEvent<{ media?: Blob; metadata?: string }>;\n if (!customEvent.detail?.media || customEvent.detail.media.size === 0) {\n console.error(\"❌ No valid media captured\");\n\n // iOS-specific debugging\n if (isIOS()) {\n console.log(\"🍎 iOS detected - checking video elements for proper attributes\");\n const videoRecorders = document.querySelectorAll(\"uni-video-recorder\");\n videoRecorders.forEach((recorder, index) => {\n console.log(`VideoRecorder ${index}:`, {\n playsinline: recorder.getAttribute(\"playsinline\"),\n autoplay: recorder.getAttribute(\"autoplay\"),\n muted: recorder.getAttribute(\"muted\")\n });\n });\n }\n\n setRecordingState(\"idle\");\n setDisableButton(false);\n return;\n }\n\n // Attach the captured thumbnail to the event\n const enhancedEvent = new CustomEvent('record-completed', {\n detail: {\n media: customEvent.detail.media,\n metadata: customEvent.detail.metadata || '',\n thumbnail: capturedThumbnailRef.current || undefined,\n }\n });\n\n setRecordingState(\"processing\");\n handleSelfie(enhancedEvent);\n };\n\n return (\n <div className=\"selfie flex flex-col h-full w-full overflow-hidden min-h-0\">\n <div className=\"p-4 text-center shrink-0\">\n <Title className=\"text-lg md:text-xl mb-1\">{t(\"selfie.recorder.title\")}</Title>\n <Subtitle className=\"text-xs text-gray-600 md:text-sm\">{t(\"selfie.recorder.subtitle\")}</Subtitle>\n </div>\n\n <div className=\"video-container flex-1 min-h-0 relative flex items-center justify-center overflow-hidden\">\n <VideoRecorder\n ref={recorderRef as any}\n preset={AcquisitionPreset.SELFIE_OPTIMIZED}\n hideCaptureBtn\n faceChecker=\"enabled\"\n disableDebugMode\n onRecorderReady={handleRecorderReady}\n onRecordCompleted={handleRecordCompleted}\n onRecord={recordStarting}\n style={{ width: \"100%\", height: \"100%\" }}\n className=\"video-recorder-no-radius w-full h-full\"\n {...(isIOS() && {\n // iOS-specific attributes for fixing black screen\n \"data-playsinline\": \"true\",\n \"data-autoplay\": \"true\",\n \"data-muted\": \"true\"\n })}\n strings={getUnisseyStrings(t)}\n />\n </div>\n\n <div className=\"shrink-0 bg-white border-t border-gray-200 p-4 md:p-6\">\n <div className=\"max-w-md mx-auto\">\n <div className=\"text-center text-xs text-gray-400 mt-3\">\n {t(\"selfie.recorder.note\")}\n </div>\n\n <Button\n onClick={recordStarting}\n className=\"w-full py-3 md:py-4 relative selfie-button\"\n disabled={disableButton || !recorderReady}\n >\n {recordingState === \"idle\" && t(\"selfie.recorder.start\")}\n {recordingState === \"preparing\" && t(\"selfie.recorder.preparing\")}\n {recordingState === \"recording\" && (\n <span className=\"flex items-center justify-center\">\n <span className=\"mr-2\">{t(\"selfie.recorder.recording_label\")}</span>\n <span className=\"flex space-x-1 loading-dots\">\n <span className=\"h-1 w-1 bg-white rounded-full\"></span>\n <span className=\"h-1 w-1 bg-white rounded-full\"></span>\n <span className=\"h-1 w-1 bg-white rounded-full\"></span>\n </span>\n </span>\n )}\n {recordingState === \"processing\" && t(\"selfie.recorder.processing\")}\n </Button>\n </div>\n </div>\n </div>\n );\n};\n\nexport default SelfieRecorder;\n"],"names":["useI18n","useRef","useState","useLiveFrameCapture","useVideoRecorderStyles","useEffect","setupVideoElementsObserver","isIOS","__awaiter","waitForVideoFrame","delay","getRecorderVideoElement","_jsxs","_jsx","Title","Subtitle","VideoRecorder","__assign","AcquisitionPreset","getUnisseyStrings","Button"],"mappings":";;;;;;;;;;;;;;;;;;AAsBA,IAAM,cAAc,GAAG,UAAC,EAIF,EAAA;AAHpB,IAAA,IAAA,YAAY,GA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AC,CAAA,EAAA,CAC5D,CAAA,EAAA,CACL,EAAA,CACF,CAAA,EAAA,CACF;AAEV;;;;"}
|
|
@@ -10,7 +10,7 @@ var VideoResetStyles = function () {
|
|
|
10
10
|
var resetStyle = document.createElement("style");
|
|
11
11
|
resetStyle.id = "video-reset-global-styles";
|
|
12
12
|
// Réinitialiser tous les styles potentiellement problématiques
|
|
13
|
-
resetStyle.textContent = "\n /* R\u00E9initialiser les styles globaux qui pourraient affecter l'affichage de la vid\u00E9o */\n .selfie {\n --uni-primary-color: #11e5c5;\n --uni-secondary-color: #0a9983;\n --uni-primary-color-lighter: #37a998;\n --uni-secondary-color-lighter: #1cbeaa;\n --uni-alt-color: #086e5f;\n --uni-alt-color-lighter: #0d9485;\n --uni-light-color-variant-1: #d0f7f2;\n --uni-light-color-variant-2: #b2ece5;\n --uni-light-color: #fff;\n --uni-dark-color: #202020;\n --uni-error-color: #f44336;\n\n --uni-btn-padding: 10px 15px;\n --uni-btn-border: solid 0px;\n --uni-btn-border-radius: 0px;\n --uni-btn-font-size: 16px;\n --uni-btn-text-transform: normal;\n --uni-btn-border-outlined: solid 1px;\n --uni-btn-label-margin: 10px 0px;\n --uni-btn-disabled-bg-color: #eee;\n\n --uni-card-bg-color: transparent;\n }\n \n /* Forcer tous les \u00E9l\u00E9ments vid\u00E9o \u00E0 avoir le bon style */\n uni-video-recorder,\n uni-video-recorder::shadow-root *,\n uni-video-recorder::part(*),\n video-js,\n .video-js,\n .vjs-default-skin,\n .vjs-big-play-button,\n .vjs-control-bar {\n border-radius: 0 !important;\n background-color: transparent !important;\n overflow: hidden !important;\n }\n \n /* Cibler sp\u00E9cifiquement le conteneur vid\u00E9o */\n .video-container video,\n .video-container canvas {\n border-radius: 0 !important;\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n }\n \n /* Forcer l'\u00E9limination de tous les fonds noirs */\n .selfie
|
|
13
|
+
resetStyle.textContent = "\n /* R\u00E9initialiser les styles globaux qui pourraient affecter l'affichage de la vid\u00E9o */\n .selfie {\n --uni-primary-color: #11e5c5;\n --uni-secondary-color: #0a9983;\n --uni-primary-color-lighter: #37a998;\n --uni-secondary-color-lighter: #1cbeaa;\n --uni-alt-color: #086e5f;\n --uni-alt-color-lighter: #0d9485;\n --uni-light-color-variant-1: #d0f7f2;\n --uni-light-color-variant-2: #b2ece5;\n --uni-light-color: #fff;\n --uni-dark-color: #202020;\n --uni-error-color: #f44336;\n\n --uni-btn-padding: 10px 15px;\n --uni-btn-border: solid 0px;\n --uni-btn-border-radius: 0px;\n --uni-btn-font-size: 16px;\n --uni-btn-text-transform: normal;\n --uni-btn-border-outlined: solid 1px;\n --uni-btn-label-margin: 10px 0px;\n --uni-btn-disabled-bg-color: #eee;\n\n --uni-card-bg-color: transparent;\n }\n \n /* Forcer tous les \u00E9l\u00E9ments vid\u00E9o \u00E0 avoir le bon style */\n uni-video-recorder,\n uni-video-recorder::shadow-root *,\n uni-video-recorder::part(*),\n video-js,\n .video-js,\n .vjs-default-skin,\n .vjs-big-play-button,\n .vjs-control-bar {\n border-radius: 0 !important;\n background-color: transparent !important;\n overflow: hidden !important;\n }\n \n /* Cibler sp\u00E9cifiquement le conteneur vid\u00E9o */\n .video-container video,\n .video-container canvas {\n border-radius: 0 !important;\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n }\n \n /* Forcer l'\u00E9limination de tous les fonds noirs (hors boutons et \u00E9l\u00E9ments UI) */\n .selfie *:not(button):not(.selfie-button):not([class*=\"btn\"]) {\n background-color: transparent !important;\n }\n \n /* S'assurer que le composant VideoRecorder prend tout l'espace */\n .selfie .video-container uni-video-recorder {\n width: 100% !important;\n height: 100% !important;\n max-width: 100% !important;\n max-height: 100% !important;\n }\n ";
|
|
14
14
|
// Ajouter l'élément style au head du document
|
|
15
15
|
document.head.appendChild(resetStyle);
|
|
16
16
|
// Nettoyer en supprimant l'élément style lors du démontage du composant
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoResetStyles.js","sources":["../../../../../src/components/selfie/VideoResetStyles.tsx"],"sourcesContent":["import { useEffect } from \"react\";\n\n/**\n * Composant qui injecte des styles CSS globaux pour réinitialiser\n * tous les styles potentiellement problématiques du VideoRecorder\n */\nconst VideoResetStyles = () => {\n useEffect(() => {\n // Créer un élément style pour les styles de réinitialisation globaux\n const resetStyle = document.createElement(\"style\");\n resetStyle.id = \"video-reset-global-styles\";\n\n // Réinitialiser tous les styles potentiellement problématiques\n resetStyle.textContent = `\n /* Réinitialiser les styles globaux qui pourraient affecter l'affichage de la vidéo */\n .selfie {\n --uni-primary-color: #11e5c5;\n --uni-secondary-color: #0a9983;\n --uni-primary-color-lighter: #37a998;\n --uni-secondary-color-lighter: #1cbeaa;\n --uni-alt-color: #086e5f;\n --uni-alt-color-lighter: #0d9485;\n --uni-light-color-variant-1: #d0f7f2;\n --uni-light-color-variant-2: #b2ece5;\n --uni-light-color: #fff;\n --uni-dark-color: #202020;\n --uni-error-color: #f44336;\n\n --uni-btn-padding: 10px 15px;\n --uni-btn-border: solid 0px;\n --uni-btn-border-radius: 0px;\n --uni-btn-font-size: 16px;\n --uni-btn-text-transform: normal;\n --uni-btn-border-outlined: solid 1px;\n --uni-btn-label-margin: 10px 0px;\n --uni-btn-disabled-bg-color: #eee;\n\n --uni-card-bg-color: transparent;\n }\n \n /* Forcer tous les éléments vidéo à avoir le bon style */\n uni-video-recorder,\n uni-video-recorder::shadow-root *,\n uni-video-recorder::part(*),\n video-js,\n .video-js,\n .vjs-default-skin,\n .vjs-big-play-button,\n .vjs-control-bar {\n border-radius: 0 !important;\n background-color: transparent !important;\n overflow: hidden !important;\n }\n \n /* Cibler spécifiquement le conteneur vidéo */\n .video-container video,\n .video-container canvas {\n border-radius: 0 !important;\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n }\n \n /* Forcer l'élimination de tous les fonds noirs */\n .selfie
|
|
1
|
+
{"version":3,"file":"VideoResetStyles.js","sources":["../../../../../src/components/selfie/VideoResetStyles.tsx"],"sourcesContent":["import { useEffect } from \"react\";\n\n/**\n * Composant qui injecte des styles CSS globaux pour réinitialiser\n * tous les styles potentiellement problématiques du VideoRecorder\n */\nconst VideoResetStyles = () => {\n useEffect(() => {\n // Créer un élément style pour les styles de réinitialisation globaux\n const resetStyle = document.createElement(\"style\");\n resetStyle.id = \"video-reset-global-styles\";\n\n // Réinitialiser tous les styles potentiellement problématiques\n resetStyle.textContent = `\n /* Réinitialiser les styles globaux qui pourraient affecter l'affichage de la vidéo */\n .selfie {\n --uni-primary-color: #11e5c5;\n --uni-secondary-color: #0a9983;\n --uni-primary-color-lighter: #37a998;\n --uni-secondary-color-lighter: #1cbeaa;\n --uni-alt-color: #086e5f;\n --uni-alt-color-lighter: #0d9485;\n --uni-light-color-variant-1: #d0f7f2;\n --uni-light-color-variant-2: #b2ece5;\n --uni-light-color: #fff;\n --uni-dark-color: #202020;\n --uni-error-color: #f44336;\n\n --uni-btn-padding: 10px 15px;\n --uni-btn-border: solid 0px;\n --uni-btn-border-radius: 0px;\n --uni-btn-font-size: 16px;\n --uni-btn-text-transform: normal;\n --uni-btn-border-outlined: solid 1px;\n --uni-btn-label-margin: 10px 0px;\n --uni-btn-disabled-bg-color: #eee;\n\n --uni-card-bg-color: transparent;\n }\n \n /* Forcer tous les éléments vidéo à avoir le bon style */\n uni-video-recorder,\n uni-video-recorder::shadow-root *,\n uni-video-recorder::part(*),\n video-js,\n .video-js,\n .vjs-default-skin,\n .vjs-big-play-button,\n .vjs-control-bar {\n border-radius: 0 !important;\n background-color: transparent !important;\n overflow: hidden !important;\n }\n \n /* Cibler spécifiquement le conteneur vidéo */\n .video-container video,\n .video-container canvas {\n border-radius: 0 !important;\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n }\n \n /* Forcer l'élimination de tous les fonds noirs (hors boutons et éléments UI) */\n .selfie *:not(button):not(.selfie-button):not([class*=\"btn\"]) {\n background-color: transparent !important;\n }\n \n /* S'assurer que le composant VideoRecorder prend tout l'espace */\n .selfie .video-container uni-video-recorder {\n width: 100% !important;\n height: 100% !important;\n max-width: 100% !important;\n max-height: 100% !important;\n }\n `;\n\n // Ajouter l'élément style au head du document\n document.head.appendChild(resetStyle);\n\n // Nettoyer en supprimant l'élément style lors du démontage du composant\n return () => {\n const existingStyle = document.getElementById(\n \"video-reset-global-styles\"\n );\n if (existingStyle) {\n document.head.removeChild(existingStyle);\n }\n };\n }, []);\n\n // Ce composant ne rend rien dans le DOM\n return null;\n};\n\nexport default VideoResetStyles;\n"],"names":[],"mappings":";;AAEA;;;AAGG;AACH,IAAM,gBAAgB,GAAG,YAAA;AACvB,IAAA,SAAS,CAAC,YAAA;;QAER,IAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAClD,QAAA,UAAU,CAAC,EAAE,GAAG,2BAA2B;;AAG3C,QAAA,UAAU,CAAC,WAAW,GAAG,8rEA8DxB;;AAGD,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC;;QAGrC,OAAO,YAAA;YACL,IAAM,aAAa,GAAG,QAAQ,CAAC,cAAc,CAC3C,2BAA2B,CAC5B;YACD,IAAI,aAAa,EAAE;AACjB,gBAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC;YAC1C;AACF,QAAA,CAAC;IACH,CAAC,EAAE,EAAE,CAAC;;AAGN,IAAA,OAAO,IAAI;AACb;;;;"}
|
|
@@ -148,12 +148,12 @@ var SelfieRecorder = function (_a) {
|
|
|
148
148
|
setRecordingState("processing");
|
|
149
149
|
handleSelfie(enhancedEvent);
|
|
150
150
|
};
|
|
151
|
-
return (jsxs("div", { className: "selfie flex flex-col h-full w-full overflow-hidden", children: [jsxs("div", { className: "p-4 text-center", children: [jsx(Title, { className: "text-lg md:text-xl mb-1", children: t("selfie.recorder.title") }), jsx(Subtitle, { className: "text-xs text-gray-600 md:text-sm", children: t("selfie.recorder.subtitle") })] }), jsx("div", { className: "video-container flex-
|
|
151
|
+
return (jsxs("div", { className: "selfie flex flex-col h-full w-full overflow-hidden min-h-0", children: [jsxs("div", { className: "p-4 text-center shrink-0", children: [jsx(Title, { className: "text-lg md:text-xl mb-1", children: t("selfie.recorder.title") }), jsx(Subtitle, { className: "text-xs text-gray-600 md:text-sm", children: t("selfie.recorder.subtitle") })] }), jsx("div", { className: "video-container flex-1 min-h-0 relative flex items-center justify-center overflow-hidden", children: jsx(VideoRecorder, __assign({ ref: recorderRef, preset: AcquisitionPreset.SELFIE_OPTIMIZED, hideCaptureBtn: true, faceChecker: "enabled", disableDebugMode: true, onRecorderReady: handleRecorderReady, onRecordCompleted: handleRecordCompleted, onRecord: recordStarting, style: { width: "100%", height: "100%" }, className: "video-recorder-no-radius w-full h-full" }, (isIOS() && {
|
|
152
152
|
// iOS-specific attributes for fixing black screen
|
|
153
153
|
"data-playsinline": "true",
|
|
154
154
|
"data-autoplay": "true",
|
|
155
155
|
"data-muted": "true"
|
|
156
|
-
}), { strings: getUnisseyStrings(t) })) }), jsx("div", { className: "
|
|
156
|
+
}), { strings: getUnisseyStrings(t) })) }), jsx("div", { className: "shrink-0 bg-white border-t border-gray-200 p-4 md:p-6", children: jsxs("div", { className: "max-w-md mx-auto", children: [jsx("div", { className: "text-center text-xs text-gray-400 mt-3", children: t("selfie.recorder.note") }), jsxs(Button, { onClick: recordStarting, className: "w-full py-3 md:py-4 relative selfie-button", disabled: disableButton || !recorderReady, children: [recordingState === "idle" && t("selfie.recorder.start"), recordingState === "preparing" && t("selfie.recorder.preparing"), recordingState === "recording" && (jsxs("span", { className: "flex items-center justify-center", children: [jsx("span", { className: "mr-2", children: t("selfie.recorder.recording_label") }), jsxs("span", { className: "flex space-x-1 loading-dots", children: [jsx("span", { className: "h-1 w-1 bg-white rounded-full" }), jsx("span", { className: "h-1 w-1 bg-white rounded-full" }), jsx("span", { className: "h-1 w-1 bg-white rounded-full" })] })] })), recordingState === "processing" && t("selfie.recorder.processing")] })] }) })] }));
|
|
157
157
|
};
|
|
158
158
|
|
|
159
159
|
export { SelfieRecorder as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelfieRecorder.js","sources":["../../../../../../src/components/selfie/selfie-flow/SelfieRecorder.tsx"],"sourcesContent":["import { useRef, useState, useEffect } from \"react\";\nimport { AcquisitionPreset, VideoRecorder } from \"@unissey-web/sdk-react\";\nimport Button from \"../../ui/Button\";\nimport Title from \"../../ui/Title\";\nimport Subtitle from \"../../ui/Subtitle\";\nimport useVideoRecorderStyles from \"../hooks/useVideoRecorderStyles\";\nimport { setupVideoElementsObserver } from \"../utils/videoElementStyles\";\nimport { delay, isIOS, waitForVideoFrame, getRecorderVideoElement } from \"../utils/selfieCaptureUtils\";\nimport { useLiveFrameCapture } from \"../hooks/useLiveFrameCapture\";\nimport { useI18n } from \"../../../hooks/useI18n\";\nimport { getUnisseyStrings } from \"../utils/unisseyStrings\";\n\ninterface SelfieRecorderProps {\n handleSelfie: (e: Event) => void;\n onBeginCapture?: () => void;\n isCapturing?: boolean;\n}\n\ninterface VideoRecorderRef extends HTMLElement {\n capture: () => void;\n}\n\nconst SelfieRecorder = ({\n handleSelfie,\n onBeginCapture = () => { },\n isCapturing = false,\n}: SelfieRecorderProps) => {\n const { t } = useI18n();\n const recorderRef = useRef<VideoRecorderRef | null>(null);\n const [disableButton, setDisableButton] = useState(false);\n const [recorderReady, setRecorderReady] = useState(false);\n const [recordingState, setRecordingState] = useState<\n \"idle\" | \"preparing\" | \"recording\" | \"processing\"\n >(\"idle\");\n const capturedThumbnailRef = useRef<string | null>(null);\n const { captureFrame, cleanup } = useLiveFrameCapture();\n\n useVideoRecorderStyles();\n\n useEffect(() => {\n document.body.classList.add(\"recording-selfie\");\n const cleanupObserver = setupVideoElementsObserver();\n\n // iOS-specific fix: Add required attributes to video elements after mount\n if (isIOS()) {\n const addIOSVideoAttributes = () => {\n const videoRecorders = document.querySelectorAll(\"uni-video-recorder\");\n videoRecorders.forEach((recorder) => {\n // Try to access shadow DOM and video elements\n try {\n const shadowRoot = (recorder as any).shadowRoot;\n if (shadowRoot) {\n const videoElements = shadowRoot.querySelectorAll(\"video\");\n videoElements.forEach((video: HTMLVideoElement) => {\n video.setAttribute(\"playsinline\", \"true\");\n video.setAttribute(\"autoplay\", \"true\");\n video.setAttribute(\"muted\", \"true\");\n // Ensure video plays inline and autoplays\n video.playsInline = true;\n video.autoplay = true;\n video.muted = true;\n });\n }\n } catch (error) {\n console.log(\"Could not access shadow DOM:\", error);\n }\n\n // Also set attributes on the component itself\n recorder.setAttribute(\"playsinline\", \"true\");\n recorder.setAttribute(\"autoplay\", \"true\");\n recorder.setAttribute(\"muted\", \"true\");\n });\n };\n\n // Apply immediately and also after a delay to catch dynamically created elements\n addIOSVideoAttributes();\n const iosTimeout = setTimeout(addIOSVideoAttributes, 500);\n const iosInterval = setInterval(addIOSVideoAttributes, 1000);\n\n return () => {\n document.body.classList.remove(\"recording-selfie\");\n cleanupObserver();\n cleanup();\n clearTimeout(iosTimeout);\n clearInterval(iosInterval);\n };\n }\n\n return () => {\n document.body.classList.remove(\"recording-selfie\");\n cleanupObserver();\n cleanup();\n };\n }, [cleanup]);\n\n const recordStarting = () => {\n if (!recorderReady || recordingState !== \"idle\") return;\n onBeginCapture();\n setRecordingState(\"preparing\");\n setDisableButton(true);\n\n const triggerCapture = async () => {\n try {\n await waitForVideoFrame(recorderRef.current);\n await delay(200);\n setRecordingState(\"recording\");\n\n // Capture a frame from the live video during recording (after a short delay)\n setTimeout(() => {\n const videoElement = getRecorderVideoElement(recorderRef.current);\n if (videoElement) {\n const thumbnail = captureFrame(videoElement);\n capturedThumbnailRef.current = thumbnail;\n }\n }, 1000); // Capture frame 1 second into recording\n\n recorderRef.current?.capture();\n } catch (error) {\n console.error(\"SelfieRecorder: failed to capture frame\", error);\n setRecordingState(\"idle\");\n setDisableButton(false);\n }\n };\n\n void triggerCapture();\n };\n\n const handleRecorderReady = () => setRecorderReady(true);\n\n const handleRecordCompleted = (e: Event) => {\n const customEvent = e as CustomEvent<{ media?: Blob; metadata?: string }>;\n if (!customEvent.detail?.media || customEvent.detail.media.size === 0) {\n console.error(\"❌ No valid media captured\");\n\n // iOS-specific debugging\n if (isIOS()) {\n console.log(\"🍎 iOS detected - checking video elements for proper attributes\");\n const videoRecorders = document.querySelectorAll(\"uni-video-recorder\");\n videoRecorders.forEach((recorder, index) => {\n console.log(`VideoRecorder ${index}:`, {\n playsinline: recorder.getAttribute(\"playsinline\"),\n autoplay: recorder.getAttribute(\"autoplay\"),\n muted: recorder.getAttribute(\"muted\")\n });\n });\n }\n\n setRecordingState(\"idle\");\n setDisableButton(false);\n return;\n }\n\n // Attach the captured thumbnail to the event\n const enhancedEvent = new CustomEvent('record-completed', {\n detail: {\n media: customEvent.detail.media,\n metadata: customEvent.detail.metadata || '',\n thumbnail: capturedThumbnailRef.current || undefined,\n }\n });\n\n setRecordingState(\"processing\");\n handleSelfie(enhancedEvent);\n };\n\n return (\n <div className=\"selfie flex flex-col h-full w-full overflow-hidden\">\n <div className=\"p-4 text-center\">\n <Title className=\"text-lg md:text-xl mb-1\">{t(\"selfie.recorder.title\")}</Title>\n <Subtitle className=\"text-xs text-gray-600 md:text-sm\">{t(\"selfie.recorder.subtitle\")}</Subtitle>\n </div>\n\n <div className=\"video-container flex-grow relative flex items-center justify-center overflow-hidden\">\n <VideoRecorder\n ref={recorderRef as any}\n preset={AcquisitionPreset.SELFIE_OPTIMIZED}\n hideCaptureBtn\n faceChecker=\"enabled\"\n disableDebugMode\n onRecorderReady={handleRecorderReady}\n onRecordCompleted={handleRecordCompleted}\n onRecord={recordStarting}\n style={{ width: \"100%\", height: \"100%\" }}\n className=\"video-recorder-no-radius w-full h-full\"\n {...(isIOS() && {\n // iOS-specific attributes for fixing black screen\n \"data-playsinline\": \"true\",\n \"data-autoplay\": \"true\",\n \"data-muted\": \"true\"\n })}\n strings={getUnisseyStrings(t)}\n />\n </div>\n\n <div className=\"sticky bottom-0 bg-white border-t border-gray-200 p-4 md:p-6\">\n <div className=\"max-w-md mx-auto\">\n <div className=\"text-center text-xs text-gray-400 mt-3\">\n {t(\"selfie.recorder.note\")}\n </div>\n\n <Button\n onClick={recordStarting}\n className=\"w-full py-3 md:py-4 relative selfie-button\"\n disabled={disableButton || !recorderReady}\n >\n {recordingState === \"idle\" && t(\"selfie.recorder.start\")}\n {recordingState === \"preparing\" && t(\"selfie.recorder.preparing\")}\n {recordingState === \"recording\" && (\n <span className=\"flex items-center justify-center\">\n <span className=\"mr-2\">{t(\"selfie.recorder.recording_label\")}</span>\n <span className=\"flex space-x-1 loading-dots\">\n <span className=\"h-1 w-1 bg-white rounded-full\"></span>\n <span className=\"h-1 w-1 bg-white rounded-full\"></span>\n <span className=\"h-1 w-1 bg-white rounded-full\"></span>\n </span>\n </span>\n )}\n {recordingState === \"processing\" && t(\"selfie.recorder.processing\")}\n </Button>\n </div>\n </div>\n </div>\n );\n};\n\nexport default SelfieRecorder;\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;AAsBA,IAAM,cAAc,GAAG,UAAC,EAIF,EAAA;AAHpB,IAAA,IAAA,YAAY,GAAA,EAAA,CAAA,YAAA,CAAA,CACZ,EAAA,GAAA,EAAA,CAAA,cAA0B,CAAA,CAA1B,cAAc,GAAA,EAAA,KAAA,MAAA,GAAG,YAAA,EAAQ,CAAC,GAAA,EAAA,EAC1B,EAAA,CAAA,WAAmB;AAEX,IAAA,IAAA,CAAC,GAAK,OAAO,EAAE,EAAd;AACT,IAAA,IAAM,WAAW,GAAG,MAAM,CAA0B,IAAI,CAAC;IACnD,IAAA,EAAA,GAAoC,QAAQ,CAAC,KAAK,CAAC,EAAlD,aAAa,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,gBAAgB,GAAA,EAAA,CAAA,CAAA,CAAmB;IACnD,IAAA,EAAA,GAAoC,QAAQ,CAAC,KAAK,CAAC,EAAlD,aAAa,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,gBAAgB,GAA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KAAK,MAAM,IAAI,CAAC,CAAC,uBAAuB,CAAC,EACvD,cAAc,KAAK,WAAW,IAAI,CAAC,CAAC,2BAA2B,CAAC,EAChE,cAAc,KAAK,WAAW,KAC7BA,IAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,kCAAkC,EAAA,QAAA,EAAA,CAChDC,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,MAAM,EAAA,QAAA,EAAE,CAAC,CAAC,iCAAiC,CAAC,EAAA,CAAQ,EACpED,IAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,6BAA6B,EAAA,QAAA,EAAA,CAC3CC,cAAM,SAAS,EAAC,+BAA+B,EAAA,CAAQ,EACvDA,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,+BAA+B,EAAA,CAAQ,EACvDA,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,+BAA+B,EAAA,CAAQ,CAAA,EAAA,CAClD,CAAA,EAAA,CACF,CACR,EACA,cAAc,KAAK,YAAY,IAAI,CAAC,CAAC,4BAA4B,CAAC,CAAA,EAAA,CAC5D,CAAA,EAAA,CACL,EAAA,CACF,CAAA,EAAA,CACF;AAEV;;;;"}
|
|
1
|
+
{"version":3,"file":"SelfieRecorder.js","sources":["../../../../../../src/components/selfie/selfie-flow/SelfieRecorder.tsx"],"sourcesContent":["import { useRef, useState, useEffect } from \"react\";\nimport { AcquisitionPreset, VideoRecorder } from \"@unissey-web/sdk-react\";\nimport Button from \"../../ui/Button\";\nimport Title from \"../../ui/Title\";\nimport Subtitle from \"../../ui/Subtitle\";\nimport useVideoRecorderStyles from \"../hooks/useVideoRecorderStyles\";\nimport { setupVideoElementsObserver } from \"../utils/videoElementStyles\";\nimport { delay, isIOS, waitForVideoFrame, getRecorderVideoElement } from \"../utils/selfieCaptureUtils\";\nimport { useLiveFrameCapture } from \"../hooks/useLiveFrameCapture\";\nimport { useI18n } from \"../../../hooks/useI18n\";\nimport { getUnisseyStrings } from \"../utils/unisseyStrings\";\n\ninterface SelfieRecorderProps {\n handleSelfie: (e: Event) => void;\n onBeginCapture?: () => void;\n isCapturing?: boolean;\n}\n\ninterface VideoRecorderRef extends HTMLElement {\n capture: () => void;\n}\n\nconst SelfieRecorder = ({\n handleSelfie,\n onBeginCapture = () => { },\n isCapturing = false,\n}: SelfieRecorderProps) => {\n const { t } = useI18n();\n const recorderRef = useRef<VideoRecorderRef | null>(null);\n const [disableButton, setDisableButton] = useState(false);\n const [recorderReady, setRecorderReady] = useState(false);\n const [recordingState, setRecordingState] = useState<\n \"idle\" | \"preparing\" | \"recording\" | \"processing\"\n >(\"idle\");\n const capturedThumbnailRef = useRef<string | null>(null);\n const { captureFrame, cleanup } = useLiveFrameCapture();\n\n useVideoRecorderStyles();\n\n useEffect(() => {\n document.body.classList.add(\"recording-selfie\");\n const cleanupObserver = setupVideoElementsObserver();\n\n // iOS-specific fix: Add required attributes to video elements after mount\n if (isIOS()) {\n const addIOSVideoAttributes = () => {\n const videoRecorders = document.querySelectorAll(\"uni-video-recorder\");\n videoRecorders.forEach((recorder) => {\n // Try to access shadow DOM and video elements\n try {\n const shadowRoot = (recorder as any).shadowRoot;\n if (shadowRoot) {\n const videoElements = shadowRoot.querySelectorAll(\"video\");\n videoElements.forEach((video: HTMLVideoElement) => {\n video.setAttribute(\"playsinline\", \"true\");\n video.setAttribute(\"autoplay\", \"true\");\n video.setAttribute(\"muted\", \"true\");\n // Ensure video plays inline and autoplays\n video.playsInline = true;\n video.autoplay = true;\n video.muted = true;\n });\n }\n } catch (error) {\n console.log(\"Could not access shadow DOM:\", error);\n }\n\n // Also set attributes on the component itself\n recorder.setAttribute(\"playsinline\", \"true\");\n recorder.setAttribute(\"autoplay\", \"true\");\n recorder.setAttribute(\"muted\", \"true\");\n });\n };\n\n // Apply immediately and also after a delay to catch dynamically created elements\n addIOSVideoAttributes();\n const iosTimeout = setTimeout(addIOSVideoAttributes, 500);\n const iosInterval = setInterval(addIOSVideoAttributes, 1000);\n\n return () => {\n document.body.classList.remove(\"recording-selfie\");\n cleanupObserver();\n cleanup();\n clearTimeout(iosTimeout);\n clearInterval(iosInterval);\n };\n }\n\n return () => {\n document.body.classList.remove(\"recording-selfie\");\n cleanupObserver();\n cleanup();\n };\n }, [cleanup]);\n\n const recordStarting = () => {\n if (!recorderReady || recordingState !== \"idle\") return;\n onBeginCapture();\n setRecordingState(\"preparing\");\n setDisableButton(true);\n\n const triggerCapture = async () => {\n try {\n await waitForVideoFrame(recorderRef.current);\n await delay(200);\n setRecordingState(\"recording\");\n\n // Capture a frame from the live video during recording (after a short delay)\n setTimeout(() => {\n const videoElement = getRecorderVideoElement(recorderRef.current);\n if (videoElement) {\n const thumbnail = captureFrame(videoElement);\n capturedThumbnailRef.current = thumbnail;\n }\n }, 1000); // Capture frame 1 second into recording\n\n recorderRef.current?.capture();\n } catch (error) {\n console.error(\"SelfieRecorder: failed to capture frame\", error);\n setRecordingState(\"idle\");\n setDisableButton(false);\n }\n };\n\n void triggerCapture();\n };\n\n const handleRecorderReady = () => setRecorderReady(true);\n\n const handleRecordCompleted = (e: Event) => {\n const customEvent = e as CustomEvent<{ media?: Blob; metadata?: string }>;\n if (!customEvent.detail?.media || customEvent.detail.media.size === 0) {\n console.error(\"❌ No valid media captured\");\n\n // iOS-specific debugging\n if (isIOS()) {\n console.log(\"🍎 iOS detected - checking video elements for proper attributes\");\n const videoRecorders = document.querySelectorAll(\"uni-video-recorder\");\n videoRecorders.forEach((recorder, index) => {\n console.log(`VideoRecorder ${index}:`, {\n playsinline: recorder.getAttribute(\"playsinline\"),\n autoplay: recorder.getAttribute(\"autoplay\"),\n muted: recorder.getAttribute(\"muted\")\n });\n });\n }\n\n setRecordingState(\"idle\");\n setDisableButton(false);\n return;\n }\n\n // Attach the captured thumbnail to the event\n const enhancedEvent = new CustomEvent('record-completed', {\n detail: {\n media: customEvent.detail.media,\n metadata: customEvent.detail.metadata || '',\n thumbnail: capturedThumbnailRef.current || undefined,\n }\n });\n\n setRecordingState(\"processing\");\n handleSelfie(enhancedEvent);\n };\n\n return (\n <div className=\"selfie flex flex-col h-full w-full overflow-hidden min-h-0\">\n <div className=\"p-4 text-center shrink-0\">\n <Title className=\"text-lg md:text-xl mb-1\">{t(\"selfie.recorder.title\")}</Title>\n <Subtitle className=\"text-xs text-gray-600 md:text-sm\">{t(\"selfie.recorder.subtitle\")}</Subtitle>\n </div>\n\n <div className=\"video-container flex-1 min-h-0 relative flex items-center justify-center overflow-hidden\">\n <VideoRecorder\n ref={recorderRef as any}\n preset={AcquisitionPreset.SELFIE_OPTIMIZED}\n hideCaptureBtn\n faceChecker=\"enabled\"\n disableDebugMode\n onRecorderReady={handleRecorderReady}\n onRecordCompleted={handleRecordCompleted}\n onRecord={recordStarting}\n style={{ width: \"100%\", height: \"100%\" }}\n className=\"video-recorder-no-radius w-full h-full\"\n {...(isIOS() && {\n // iOS-specific attributes for fixing black screen\n \"data-playsinline\": \"true\",\n \"data-autoplay\": \"true\",\n \"data-muted\": \"true\"\n })}\n strings={getUnisseyStrings(t)}\n />\n </div>\n\n <div className=\"shrink-0 bg-white border-t border-gray-200 p-4 md:p-6\">\n <div className=\"max-w-md mx-auto\">\n <div className=\"text-center text-xs text-gray-400 mt-3\">\n {t(\"selfie.recorder.note\")}\n </div>\n\n <Button\n onClick={recordStarting}\n className=\"w-full py-3 md:py-4 relative selfie-button\"\n disabled={disableButton || !recorderReady}\n >\n {recordingState === \"idle\" && t(\"selfie.recorder.start\")}\n {recordingState === \"preparing\" && t(\"selfie.recorder.preparing\")}\n {recordingState === \"recording\" && (\n <span className=\"flex items-center justify-center\">\n <span className=\"mr-2\">{t(\"selfie.recorder.recording_label\")}</span>\n <span className=\"flex space-x-1 loading-dots\">\n <span className=\"h-1 w-1 bg-white rounded-full\"></span>\n <span className=\"h-1 w-1 bg-white rounded-full\"></span>\n <span className=\"h-1 w-1 bg-white rounded-full\"></span>\n </span>\n </span>\n )}\n {recordingState === \"processing\" && t(\"selfie.recorder.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