Skip to content

Commit f73a4d2

Browse files
committed
Do not light torch by default; provide property to do so.
1 parent 4239c40 commit f73a4d2

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# bedrock-vue-barcode-scanner ChangeLog
22

3+
## 1.4.1 - 2025-??-??
4+
5+
### Added
6+
- Provide property to automatically light torch when initialized.
7+
8+
### Changed
9+
- Do not light torch by default.
10+
311
## 1.4.0 - 2025-04-03
412

513
### Changed

components/BarcodeScanner.vue

+6-2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ export default {
3939
showQrBox: {
4040
type: Boolean,
4141
default: false
42+
},
43+
lightTorch: {
44+
type: Boolean,
45+
default: false
4246
}
4347
},
4448
emits: ['result', 'close'],
@@ -98,8 +102,8 @@ export default {
98102
const selectedCamera = scanner.getRunningTrackSettings()?.deviceId;
99103
updateSelectedCamera(selectedCamera);
100104
}
101-
// Default to turning light on
102-
if(!cameraLight.value) {
105+
// Turn on torch by default, if requested
106+
if(cameraLight.value != props.lightTorch) {
103107
await toggleTorch();
104108
}
105109
await getZoomConstraints();

0 commit comments

Comments
 (0)