Skip to content

Commit d016323

Browse files
committed
fixed
1 parent a2763f1 commit d016323

7 files changed

Lines changed: 708 additions & 488 deletions

2.ui-tweaking/1.read-video-show-result.html

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@
44
<head>
55
<meta charset="utf-8">
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7-
<meta name="description"
8-
content="Read barcode from a video input. This sample demonstrates the default built-in UI.">
7+
<meta name="description" content="Read barcode from a video input. This sample demonstrates the default built-in UI.">
98
<meta name="keywords" content="read barcode from video, built-in ui">
109
<title>Dynamsoft Barcode Reader Sample - Video Decoding with Default UI</title>
1110
</head>
1211

1312
<body>
14-
<h1 style="font-size: 1.5em;">Use the Default Built-in UI</h1>
15-
<div id="UIElement">
16-
<button id="showScanner">Show The Scanner</button>
13+
<h1>Use the Default Built-in UI</h1>
14+
<div id="UIElement" class="UIElement">
15+
<button id="showScanner" class="showScanner">Show The Scanner</button>
1716
</div>
1817
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@8.8.7/dist/dbr.js"></script>
1918
<script>
@@ -61,12 +60,6 @@ <h1 style="font-size: 1.5em;">Use the Default Built-in UI</h1>
6160
padding: 0;
6261
}
6362

64-
button#showScanner {
65-
position: absolute;
66-
width: 50%;
67-
left: 25%;
68-
}
69-
7063
body {
7164
display: flex;
7265
flex-direction: column;
@@ -78,17 +71,27 @@ <h1 style="font-size: 1.5em;">Use the Default Built-in UI</h1>
7871
color: #455A64;
7972
}
8073

74+
h1 {
75+
font-size: 1.5em;
76+
}
77+
8178
button {
82-
font-size: 1.5rem;
8379
margin-bottom: 2vh;
80+
font-size: 1.5rem;
8481
}
8582

86-
#UIElement {
83+
.UIElement {
84+
height: 60vh;
85+
width: 80vw;
8786
margin: 2vmin auto;
8887
text-align: center;
8988
font-size: medium;
90-
height: 60vh;
91-
width: 60vw;
89+
}
90+
91+
.showScanner {
92+
position: absolute;
93+
width: 50%;
94+
left: 25%;
9295
}
9396
</style>
9497

2.ui-tweaking/2.read-video-no-extra-control.html

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
</head>
1111

1212
<body>
13-
<h1 style="font-size: 1.5em;">Hide UI Controllers</h1>
14-
<div id="UIElement">
15-
<div id="div-video-container" style="width:100%;height:100%;">
16-
<video class="dce-video" playsinline="true" muted style="width:100%;height:100%;"></video>
13+
<h1>Hide UI Controllers</h1>
14+
<div id="UIElement" class="UIElement">
15+
<div id="div-video-container" class="div-video-container">
16+
<video class="dce-video" playsinline="true" muted></video>
1717
</div>
1818
</div>
1919
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@8.8.7/dist/dbr.js"></script>
@@ -34,7 +34,6 @@ <h1 style="font-size: 1.5em;">Hide UI Controllers</h1>
3434

3535
// scanner for decoding video
3636
let pScanner = null;
37-
3837
// decode video from camera
3938
(async () => {
4039
try {
@@ -67,20 +66,20 @@ <h1 style="font-size: 1.5em;">Hide UI Controllers</h1>
6766
color: #455A64;
6867
}
6968

70-
button {
71-
font-size: 1.5rem;
72-
margin-bottom: 2vh;
69+
h1 {
70+
font-size: 1.5em;
7371
}
7472

75-
#UIElement {
73+
.UIElement {
74+
height: 60vh;
75+
width: 80vw;
7676
margin: 2vmin auto;
7777
text-align: center;
7878
font-size: medium;
79-
height: 40vh;
80-
width: 100vw;
8179
}
8280

83-
.div-video-container {
81+
.div-video-container,
82+
.dce-video {
8483
width: 100%;
8584
height: 100%;
8685
}

0 commit comments

Comments
 (0)