diff --git a/camera.html b/camera.html
index 62b4ce3..dfe74c9 100644
--- a/camera.html
+++ b/camera.html
@@ -1,45 +1,45 @@
-
-
-
-
- QrcodeDecoder - Camera
-
-
-
- Click start to scan qrcode.
-
-
+
+
+
+
+ QrcodeDecoder - Camera
+
+
+
+ Click start to scan qrcode.
+
+
-
-
-
+
+
-
+ stop.onclick = function() {
+ qr.stop();
+ };
+ }
+ main();
+
+
diff --git a/image.html b/image.html
index 5fbb6bc..2f822af 100644
--- a/image.html
+++ b/image.html
@@ -1,60 +1,61 @@
-
-
-
-
- QrcodeDecoder - Image
-
-
-
- Same domain image
- 
-
-
-
-
-
- Different domain image
-
-
-
-
-
-
+
+
+
-
+ btn2.onclick = async () => {
+ // you can also decode from image path
+ // const code = await qr.decodeFromImage('./assets/qrcode.png');
+ const code = await qr.decodeFromImage(
+ 'https://yugasun.com/static/wechat.jpg',
+ {
+ crossOrigin: 'anonymous',
+ },
+ );
+ console.log(code);
+ result2.innerText = code.data;
+ };
+ }
+ main();
+
+