Skip to content

Commit 3556cf1

Browse files
committed
update code to adapt to DBR JS 9.0.0
1 parent f512a2c commit 3556cf1

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

2.ui-tweaking/4.difference-video-size.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h1 style="font-size: 1.5em;">Enlarge the Video Stream</h1>
1717
</div>
1818
<div id="UIElement" class="UIElement">
1919
<div id="div-ui-container" style="width:100%;height:100%;">
20-
<div class="dce-video-container" style="position:relative;width:100%;height:100%;"></div>
20+
<div class="dce-video-container" style="position:relative;width:100%;height:100%;"></div>
2121
</div>
2222
</div>
2323
<script src="https://cdn.jsdelivr.net/npm/keillion-dynamsoft-javascript-barcode@0.20220318174621.0/dist/dbr.js"></script>

2.ui-tweaking/5.read-video-with-custom-default-ui.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ <h1>Customized Default UI</h1>
4848
<div id="UIElement" class="UIElement">
4949
</div>
5050
<script src="https://cdn.jsdelivr.net/npm/keillion-dynamsoft-javascript-barcode@0.20220318174621.0/dist/dbr.js"></script>
51+
<!-- <script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@8.8.7/dist/dbr.js"></script> -->
5152
<script>
5253
/** LICENSE ALERT - README
5354
*
@@ -386,6 +387,11 @@ <h1>Customized Default UI</h1>
386387
text-align: center;
387388
font-size: medium;
388389
}
390+
391+
.UIElement > div {
392+
width: 100%;
393+
height: 100%;
394+
}
389395
</style>
390396

391397
</html>

2.ui-tweaking/my.dbr.scanner.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
<div id="div-video-container" style="width:100%;height:100%;position:relative;">
1+
<div id="div-ui-container" style="width:100%;height:100%;position:relative;">
22
<svg id="dce-loading" style="animation:turn 1.5s linear infinite;" viewBox="0 0 1024 1024" p-id="11986" width="200" height="200"><path d="M512.1 64.2c-35.4 0-64 28.7-64 64v128c0 35.4 28.7 64 64 64 35.4 0 64-28.7 64-64v-128c0-35.3-28.6-64-64-64zM320.4 328.3l-110.8-64c-30.6-17.7-69.8-7.2-87.4 23.4-17.7 30.6-7.2 69.8 23.4 87.4l110.8 64c30.6 17.7 69.8 7.2 87.4-23.4 17.7-30.6 7.2-69.8-23.4-87.4zM342.4 609.2c-17.7-30.6-56.8-41.1-87.4-23.4l-110.8 64c-30.6 17.7-41.1 56.8-23.4 87.4 17.7 30.6 56.8 41.1 87.4 23.4l110.8-64c30.6-17.7 41.1-56.8 23.4-87.4zM509.2 707.1c-35.4 0-64 28.7-64 64v128c0 35.4 28.7 64 64 64 35.4 0 64-28.7 64-64v-128c0-35.3-28.6-64-64-64zM875.8 652.2l-110.8-64c-30.6-17.7-69.8-7.2-87.4 23.4-17.7 30.6-7.2 69.8 23.4 87.4l110.8 64c30.6 17.7 69.8 7.2 87.4-23.4 17.7-30.6 7.2-69.7-23.4-87.4zM678.9 418.2c17.7 30.6 56.8 41.1 87.4 23.4l110.8-64c30.6-17.7 41.1-56.8 23.4-87.4-17.7-30.6-56.8-41.1-87.4-23.4l-110.8 64c-30.6 17.6-41.1 56.8-23.4 87.4z" p-id="11987"></path></svg>
3-
<video class="dce-video" playsinline="true" muted style="width:100%;height:100%;"></video>
4-
<div class="dbrScanner-cvs-scanarea" style="width:100%;height:100%;position:absolute;left:0;top:0;overflow:hidden;"></div>
3+
<div class="dce-video-container" style="position:absolute;width:100%;height:100%;"></div>
4+
<div class="dce-scanarea" style="width:100%;height:100%;position:absolute;left:0;top:0;overflow:hidden;">
5+
<div class="dce-scanlight" style="width:100%;display:none;height:70px;position:absolute;animation:3s infinite dce-scanlight;background-image:linear-gradient(#ffffff00, #ffb668);border-bottom:2px solid #ff8400;user-select:none;"></div>
6+
</div>
57
<div id="dce-mask" hidden style="width:100%;height:100%;position:absolute;top:-10px;left:-10px;padding:10px;">
6-
<div class="dbrScanner-scanlight" style="width:calc(100% - 20px);display:none;left:10px;height:70px;position:absolute;animation:3s infinite dbrScanner-scanlight;background-image:linear-gradient(#ffffff00, #ffb668);border-bottom:2px solid #ff8400;user-select:none;"></div>
78
<div class="dce-corner" style="position:absolute;width:50px;height:50px;top:0;left:0;border-left:3px solid #fe8e14;border-top:3px solid #fe8e14;"></div>
89
<div class="dce-corner" style="position:absolute;width:50px;height:50px;top:0;right:0;border-right:3px solid #fe8e14;border-top:3px solid #fe8e14;"></div>
910
<div class="dce-corner" style="position:absolute;width:50px;height:50px;left:0;bottom:0;border-left:3px solid #fe8e14;border-bottom:3px solid #fe8e14;"></div>
@@ -19,7 +20,7 @@
1920
75% { transform: rotate(270deg); }
2021
100% { transform: rotate(360deg); }
2122
}
22-
@keyframes dbrScanner-scanlight {
23+
@keyframes dce-scanlight {
2324
from { top: 0px; }
2425
to { top: calc(100% - 87px) }
2526
}

0 commit comments

Comments
 (0)