Repository navigation
v1.13.5-webview-preload
·
1 commit
to webview-preload
since this release
What's Changed
- 안드로이드 웹뷰 샘플에서 preloading 적용 샘플 코드
- android asset에 preload.html 및 preload.js 파일 추가 및 webview에서는 preload.html 호출 (호출시 ocrType 전달)
- preload.html (preload.js)
- OCR_LICENSE_KEY와 OCR_RESOURCE_BASE_URL은 preload.html 에서 관리 (WebViewActivity로 부터 이관)
- WebView와 preload.html은 postMessage로 "usebwasmocrpreload()" 함수 리스너를 통해 통신
- preload.html 은 iframe을 갖으며 iframe은 https://ocr.useb.co.kr/ocr.html 을 호출 preload.js의 가장 마지막에서 자동으로 iframe의 url이 onload 되었을때 preloading 이벤트를 postMessage를 통해 preload.html 과 iframe내 ocr.html에 전달하고 preloading status UI를 started로 변경 preloading 완료시 이벤트를 수신하며 end로 변경
- 신분증 촬영 버튼을 누르면, preloading stratus가 end인 상태에서는 별도 wasm과 data 파일 다운로드 없이 바로 카메라 모듈을 로딩한뒤 시작됨.
Full Changelog: v1.13.5...v1.13.5-webview-preload