-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
339a795
commit 771f621
Showing
11 changed files
with
46 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> | ||
<title>DocWebCapture</title> | ||
<title>Mobile Web Capture - Capture continuously & Edit result images</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/ddv.css"> | ||
<link rel="stylesheet" href="./index.css"> | ||
</head> | ||
|
@@ -21,10 +21,6 @@ | |
console.warn(message); | ||
alert(message); | ||
}; | ||
|
||
Dynamsoft.DDV.on("error", (e) => { | ||
alert(e.message) | ||
}); | ||
</script> | ||
<script type="module"> | ||
import { isMobile, initDocDetectModule } from "./utils.js"; | ||
|
@@ -69,6 +65,8 @@ | |
// Play video stream in 1080P | ||
captureViewer.play({ | ||
resolution: [1920,1080], | ||
}).catch(err => { | ||
alert(err.message) | ||
}); | ||
|
||
// Create an edit viewer | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> | ||
<title>DocWebCapture</title> | ||
<title>Mobile Web Capture - Detect boundaries on the existing images</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/ddv.css"> | ||
<link rel="stylesheet" href="./index.css"> | ||
</head> | ||
|
@@ -21,10 +21,6 @@ | |
console.warn(message); | ||
alert(message); | ||
}; | ||
|
||
Dynamsoft.DDV.on("error", (e) => { | ||
alert(e.message) | ||
}); | ||
</script> | ||
<script type="module"> | ||
import { isMobile, createFileInput } from "./utils.js"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,9 @@ Environment: Node.js v18.13.0 | |
|
||
```javascript | ||
await DDV.setConfig({ | ||
// your license key | ||
license: 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9', | ||
engineResourcePath: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/engine' | ||
// your license key | ||
license: 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9', | ||
engineResourcePath: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/engine' | ||
}); | ||
|
||
// your license key | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,9 @@ Environment: Node.js v18.13.0 | |
|
||
```javascript | ||
await DDV.setConfig({ | ||
// your license key | ||
license: 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9', | ||
engineResourcePath: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/engine' | ||
// your license key | ||
license: 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9', | ||
engineResourcePath: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/engine' | ||
}); | ||
|
||
// your license key | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,9 @@ Environment: Node.js v18.13.0 | |
|
||
```javascript | ||
await DDV.setConfig({ | ||
// your license key | ||
license: 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9', | ||
engineResourcePath: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/engine' | ||
// your license key | ||
license: 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9', | ||
engineResourcePath: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/engine' | ||
}); | ||
|
||
// your license key | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> | ||
<title>DocWebCapture</title> | ||
<title>Mobile Web Capture - HelloWorld</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/ddv.css"> | ||
<link rel="stylesheet" href="./index.css"> | ||
</head> | ||
|
@@ -28,10 +28,6 @@ | |
console.warn(message); | ||
alert(message); | ||
}; | ||
|
||
Dynamsoft.DDV.on("error", (e) => { | ||
alert(e.message) | ||
}); | ||
</script> | ||
<script type="module"> | ||
import { isMobile, initDocDetectModule } from "./utils.js"; | ||
|
@@ -67,6 +63,8 @@ | |
// Play video stream in 1080P | ||
captureViewer.play({ | ||
resolution: [1920,1080], | ||
}).catch(err => { | ||
alert(err.message) | ||
}); | ||
|
||
// Display the result image | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> | ||
<title>DocWebCapture</title> | ||
<title>Mobile Web Capture - Relatively complete document capturing workflow</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/ddv.css"> | ||
<link rel="stylesheet" href="./index.css"> | ||
</head> | ||
|
@@ -21,10 +21,6 @@ | |
console.warn(message); | ||
alert(message); | ||
}; | ||
|
||
Dynamsoft.DDV.on("error", (e) => { | ||
alert(e.message) | ||
}); | ||
</script> | ||
<script type="module"> | ||
import { isMobile, initDocDetectModule } from "./utils.js"; | ||
|
@@ -71,6 +67,8 @@ | |
// Play video stream in 1080P | ||
captureViewer.play({ | ||
resolution: [1920,1080], | ||
}).catch(err => { | ||
alert(err.message) | ||
}); | ||
|
||
// Register an event in `captureViewer` to show the perspective viewer | ||
|
@@ -93,7 +91,7 @@ | |
// Register an event in `perspectiveViewer` to go back the capture viewer | ||
perspectiveViewer.on("backToCaptureViewer",() => { | ||
switchViewer(1,0,0); | ||
captureViewer.play(); | ||
captureViewer.play().catch(err => {alert(err.message)}); | ||
}); | ||
|
||
// Register an event in `perspectiveViewer` to show the edit viewer | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> | ||
<title>DocWebCapture</title> | ||
<title>Mobile Web Capture - Review and Adjust the detected boundaries</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/ddv.css"> | ||
<link rel="stylesheet" href="./index.css"> | ||
</head> | ||
|
@@ -26,10 +26,6 @@ | |
console.warn(message); | ||
alert(message); | ||
}; | ||
|
||
Dynamsoft.DDV.on("error", (e) => { | ||
alert(e.message) | ||
}); | ||
</script> | ||
<script type="module"> | ||
import { isMobile, initDocDetectModule } from "./utils.js"; | ||
|
@@ -64,6 +60,8 @@ | |
// Play video stream in 1080P | ||
captureViewer.play({ | ||
resolution: [1920,1080], | ||
}).catch(err => { | ||
alert(err.message) | ||
}); | ||
|
||
// Register captured event | ||
|
@@ -113,7 +111,7 @@ | |
function viewerSwitch(capture, perspective){ | ||
if(capture) { | ||
captureViewer.show(); | ||
captureViewer.play(); | ||
captureViewer.play().catch(err => {alert(err)}); | ||
} else { | ||
captureViewer.hide(); | ||
captureViewer.stop(); | ||
|