wup
This commit is contained in:
parent
7d61d20c8e
commit
8784fa402d
@ -1,6 +1,7 @@
|
|||||||
/*! For license information please see src_components_faceRecognition_FaceRecognition_tsx-src_components_shared_organisms_Player_Ove-59cc90.a810eba2a0194c5f16e6.js.LICENSE.txt */
|
/*! For license information please see src_components_faceRecognition_FaceRecognition_tsx-src_components_shared_organisms_Player_Ove-59cc90.a810eba2a0194c5f16e6.js.LICENSE.txt */
|
||||||
/*! @ohtomi-preamble version: 8.1.0, name:src_components_faceRecognition_FaceRecognition_tsx-src_components_shared_organisms_Player_Ove-59cc90 */
|
/*! @ohtomi-preamble version: 8.1.0, name:src_components_faceRecognition_FaceRecognition_tsx-src_components_shared_organisms_Player_Ove-59cc90 */
|
||||||
|
|
||||||
|
import type React from "react";
|
||||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||||
import { jsx, jsxs } from "react/jsx-runtime";
|
import { jsx, jsxs } from "react/jsx-runtime";
|
||||||
|
|
||||||
@ -14,7 +15,7 @@ try {
|
|||||||
? globalThis
|
? globalThis
|
||||||
: "undefined" !== typeof self
|
: "undefined" !== typeof self
|
||||||
? self
|
? self
|
||||||
: {};
|
: ({} as typeof globalThis);
|
||||||
const t = new e.Error().stack;
|
const t = new e.Error().stack;
|
||||||
t &&
|
t &&
|
||||||
((e._sentryDebugIds = e._sentryDebugIds || {}),
|
((e._sentryDebugIds = e._sentryDebugIds || {}),
|
||||||
@ -38,11 +39,13 @@ try {
|
|||||||
{
|
{
|
||||||
98024: (e, t, n) => {
|
98024: (e, t, n) => {
|
||||||
n.d(t, { B: () => o });
|
n.d(t, { B: () => o });
|
||||||
const a = n(96540);
|
|
||||||
function o({ disabled: e = !1, storedDevice: t } = {}) {
|
function o({ disabled: e = !1, storedDevice: t } = {}) {
|
||||||
const [n, o] = useState(null);
|
const [error, setError] = useState(null);
|
||||||
const [inputDevices, setInputDevices] = useState<MediaDeviceInfo[]>([]);
|
const [inputDevices, setInputDevices] = useState<MediaDeviceInfo[]>([]);
|
||||||
const [s, c] = useState();
|
const [mediaDeviceInfo, setMediaDeviceInfo] =
|
||||||
|
useState<MediaDeviceInfo>();
|
||||||
|
|
||||||
const l = useCallback(async () => {
|
const l = useCallback(async () => {
|
||||||
try {
|
try {
|
||||||
await navigator.mediaDevices
|
await navigator.mediaDevices
|
||||||
@ -55,7 +58,8 @@ try {
|
|||||||
await navigator.mediaDevices
|
await navigator.mediaDevices
|
||||||
.enumerateDevices()
|
.enumerateDevices()
|
||||||
.then((MediaDevices) => {
|
.then((MediaDevices) => {
|
||||||
o(null);
|
setError(null);
|
||||||
|
|
||||||
const videoInputDevices = MediaDevices.filter(
|
const videoInputDevices = MediaDevices.filter(
|
||||||
(mediaDevice) =>
|
(mediaDevice) =>
|
||||||
mediaDevice.kind === "videoinput" &&
|
mediaDevice.kind === "videoinput" &&
|
||||||
@ -63,9 +67,12 @@ try {
|
|||||||
);
|
);
|
||||||
if (
|
if (
|
||||||
(setInputDevices(videoInputDevices),
|
(setInputDevices(videoInputDevices),
|
||||||
!s ||
|
!mediaDeviceInfo ||
|
||||||
!videoInputDevices.some(
|
!videoInputDevices.some(
|
||||||
(e) => e.deviceId === s.deviceId || e.label === s.label,
|
(videoInputDevice) =>
|
||||||
|
videoInputDevice.deviceId ===
|
||||||
|
mediaDeviceInfo.deviceId ||
|
||||||
|
videoInputDevice.label === mediaDeviceInfo.label,
|
||||||
))
|
))
|
||||||
) {
|
) {
|
||||||
let a;
|
let a;
|
||||||
@ -87,28 +94,39 @@ try {
|
|||||||
: videoInputDevices[0];
|
: videoInputDevices[0];
|
||||||
if (null == e)
|
if (null == e)
|
||||||
throw new Error("利用可能なカメラデバイスが存在しません");
|
throw new Error("利用可能なカメラデバイスが存在しません");
|
||||||
c(e);
|
setMediaDeviceInfo(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
o(e);
|
setError(e);
|
||||||
}
|
}
|
||||||
}, [s, null == t ? void 0 : t.deviceId, null == t ? void 0 : t.label]);
|
}, [
|
||||||
|
mediaDeviceInfo,
|
||||||
|
null == t ? void 0 : t.deviceId,
|
||||||
|
null == t ? void 0 : t.label,
|
||||||
|
]);
|
||||||
|
|
||||||
const d = useCallback(
|
const d = useCallback(
|
||||||
(e) => {
|
(e) => {
|
||||||
c(
|
setMediaDeviceInfo(
|
||||||
null == inputDevices
|
null == inputDevices
|
||||||
? void 0
|
? void 0
|
||||||
: inputDevices.find((t) => t.deviceId === e),
|
: inputDevices.find(
|
||||||
|
(inputDevice) => inputDevice.deviceId === e,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
[inputDevices],
|
[inputDevices],
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
useEffect(
|
useEffect(
|
||||||
() =>
|
() =>
|
||||||
e
|
e
|
||||||
? (o(null), setInputDevices([]), c(void 0), () => {})
|
? (setError(null),
|
||||||
|
setInputDevices([]),
|
||||||
|
setMediaDeviceInfo(void 0),
|
||||||
|
() => {})
|
||||||
: (l(),
|
: (l(),
|
||||||
navigator.mediaDevices.addEventListener("devicechange", l),
|
navigator.mediaDevices.addEventListener("devicechange", l),
|
||||||
() =>
|
() =>
|
||||||
@ -119,9 +137,9 @@ try {
|
|||||||
[e, l],
|
[e, l],
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
error: n,
|
error: error,
|
||||||
availableDevices: inputDevices,
|
availableDevices: inputDevices,
|
||||||
currentDevice: s,
|
currentDevice: mediaDeviceInfo,
|
||||||
select: d,
|
select: d,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -129,7 +147,6 @@ try {
|
|||||||
},
|
},
|
||||||
81801: (e, t, n) => {
|
81801: (e, t, n) => {
|
||||||
n.d(t, { y: () => i });
|
n.d(t, { y: () => i });
|
||||||
const a = n(96540);
|
|
||||||
const o = n(78685);
|
const o = n(78685);
|
||||||
const r = "camera-device";
|
const r = "camera-device";
|
||||||
function i() {
|
function i() {
|
||||||
@ -144,7 +161,6 @@ try {
|
|||||||
},
|
},
|
||||||
77177: (e, t, n) => {
|
77177: (e, t, n) => {
|
||||||
n.d(t, { j: () => C });
|
n.d(t, { j: () => C });
|
||||||
const a = n(96540);
|
|
||||||
const o = n(98024);
|
const o = n(98024);
|
||||||
const r = n(81801);
|
const r = n(81801);
|
||||||
const i = Math.floor(25.5);
|
const i = Math.floor(25.5);
|
||||||
@ -252,17 +268,11 @@ try {
|
|||||||
children: [
|
children: [
|
||||||
"failed" !== e &&
|
"failed" !== e &&
|
||||||
jsxs(u.Fragment, {
|
jsxs(u.Fragment, {
|
||||||
children: [
|
children: [jsx(v, {}), jsx(f, { children: "認証中" })],
|
||||||
jsx(v, {}),
|
|
||||||
jsx(f, { children: "認証中" }),
|
|
||||||
],
|
|
||||||
}),
|
}),
|
||||||
"failed" === e &&
|
"failed" === e &&
|
||||||
jsxs(u.Fragment, {
|
jsxs(u.Fragment, {
|
||||||
children: [
|
children: [jsx(g, {}), jsx(f, { children: "認証不可" })],
|
||||||
jsx(g, {}),
|
|
||||||
jsx(f, { children: "認証不可" }),
|
|
||||||
],
|
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
@ -443,7 +453,7 @@ try {
|
|||||||
n.d(t, { b: () => p });
|
n.d(t, { b: () => p });
|
||||||
const a = n(63998);
|
const a = n(63998);
|
||||||
const o = n(35830);
|
const o = n(35830);
|
||||||
const r = n(96540);
|
const r: typeof React = n(96540);
|
||||||
const i = n(74848);
|
const i = n(74848);
|
||||||
const s = ({ rate: e, currentRate: t, onClick: n }) => {
|
const s = ({ rate: e, currentRate: t, onClick: n }) => {
|
||||||
const a = useCallback(() => {
|
const a = useCallback(() => {
|
||||||
@ -574,7 +584,7 @@ try {
|
|||||||
},
|
},
|
||||||
41233: (e, t, n) => {
|
41233: (e, t, n) => {
|
||||||
n.d(t, { y: () => o });
|
n.d(t, { y: () => o });
|
||||||
const a = n(96540);
|
const a: typeof React = n(96540);
|
||||||
function o({ changePlaybackRate: e }) {
|
function o({ changePlaybackRate: e }) {
|
||||||
const [t, n] = useState(!1);
|
const [t, n] = useState(!1);
|
||||||
const [o, r] = useState(!1);
|
const [o, r] = useState(!1);
|
||||||
@ -636,7 +646,7 @@ try {
|
|||||||
},
|
},
|
||||||
49474: (e, t, n) => {
|
49474: (e, t, n) => {
|
||||||
n.d(t, { J: () => o });
|
n.d(t, { J: () => o });
|
||||||
const a = n(96540);
|
const a: typeof React = n(96540);
|
||||||
function o(e) {
|
function o(e) {
|
||||||
const [t, n] = useState("prompt");
|
const [t, n] = useState("prompt");
|
||||||
return (
|
return (
|
||||||
|
23
src/types/global.d.ts
vendored
Normal file
23
src/types/global.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
declare global {
|
||||||
|
interface Window {
|
||||||
|
SENTRY_ENVIRONMENT?: string;
|
||||||
|
SENTRY_DSN?: string;
|
||||||
|
SENTRY_RELEASE?: {
|
||||||
|
id?: string;
|
||||||
|
};
|
||||||
|
SENTRY_SDK_SOURCE?: SdkSource;
|
||||||
|
/**
|
||||||
|
* Debug IDs are indirectly injected by Sentry CLI or bundler plugins to directly reference a particular source map
|
||||||
|
* for resolving of a source file. The injected code will place an entry into the record for each loaded bundle/JS
|
||||||
|
* file.
|
||||||
|
*/
|
||||||
|
_sentryDebugIds?: Record<string, string>;
|
||||||
|
/**
|
||||||
|
* Raw module metadata that is injected by bundler plugins.
|
||||||
|
*
|
||||||
|
* Keys are `error.stack` strings, values are the metadata.
|
||||||
|
*/
|
||||||
|
_sentryModuleMetadata?: Record<string, any>;
|
||||||
|
_sentryEsmLoaderHookRegistered?: boolean;
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user