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.