PageSourceSearch

https://www.samsunglife.com/lib/koreaId/js/kiface.js

js samsunglife.com collected 2026-10-01 11:52:35 UTC 2,780 bytes, 111 lines download raw bytes

1import * as video from "./video.js";
2
3window.kiface = window.kiface || {};
4
5window.kiface.isFileDownloaded =
6  window.kiface.isFileDownloaded !== undefined &&
7  window.kiface.isFileDownloaded !== null
8    ? window.kiface.isFileDownloaded
9    : false;
10
11window.kiface.isDownloadWasm =
12  window.kiface.isDownloadWasm !== undefined &&
13  window.kiface.isDownloadWasm !== null
14    ? window.kiface.isDownloadWasm
15    : false;
16
17window.kiface.isDownloadData =
18  window.kiface.isDownloadData !== undefined &&
19  window.kiface.isDownloadData !== null
20    ? window.kiface.isDownloadData
21    : false;
22
23window.kiface.setIsFileDownloaded = (isDownloaded) => {
24  video.setIsFileDownloaded(isDownloaded);
25};
26
27window.kiface.readyCamera = async () => {
28  await video.readyCamera();
29};
30
31window.kiface.isMediaStream = () => {
32  return video.isMediaStream();
33};
34
35window.kiface.readyRecord = async () => {
36  await video.readyRecord();
37};
38
39window.kiface.stopRecordingVideo = () => {
40  video.stopRecordingVideo();
41};
42
43window.kiface.cancelDownload = () => {
44  video.cancelDownload();
45};
46
47window.kiface.downloadFile = async () => {
48  await video.downloadFile();
49};
50
51window.kiface.downloadWasmFile = async () => {
52  await video.downloadWasmFile();
53};
54
55/**
56 * 기능: 안면인식 시작 함수<br>
57 * 설명: config.isUseRecord 가 true 일 경우 녹화 시작, false 일 경우 사용 안함.
58 * @name startDetectFace
59 * @function
60 */
61window.kiface.startDetectFace = async (isUseRecord) => {
62  video.startLiveness();
63  if (isUseRecord) {
64    const iosVersion = video.getiOSVersionCheck();
65    const isAndroid = video.isAndroid();
66    if (!isAndroid && iosVersion > 0 && iosVersion < 16) {
67      // iOS 기기이고 16 미만인 경우만 차단
68      console.warn(
69        "iOS 16 버전 이하에서는 동영상 녹화 기능을 사용할 수 없습니다.",
70      );
71    } else {
72      video.startRecordingVideo();
73    }
74  }
75};
76
77/**
78 * 기능: x 버튼 눌렀을 때, 동작하는 함수<br>
79 * 설명: config.isUseRecord 가 true 일 경우 녹화 멈춤, false 경우 사용 안함
80 * @name handleCloseBtn
81 * @function
82//  */
83window.kiface.handleCloseBtn = async () => {
84  if (window.kiface.isFileDownloaded) {
85    // 카메라 off
86    video.offCamera();
87    // 안면인식 멈춤
88    video.stopLiveness();
89  }
90};
91
92/**
93 * 기능: 안면인식 중 녹화 동영상을 다운로드 함수<br>
94 * @name handleClickDownloadBtn
95 * @function
96 */
97window.kiface.handleDownload = () => {
98  const url = video.getVideoBlob();
99
100  if (!video.isCompleted() || !url) {
101    alert("아직 비디오가 생성되지 않았습니다.");
102    return;
103  }
104
105  const a = document.createElement("a");
106  a.href = url;
107  a.download = "video.webm";
108  document.body.appendChild(a);
109  a.click();
110  document.body.removeChild(a);
111};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.