This commit is contained in:
Steven C 2024-03-01 02:32:29 -08:00
parent 6d7c5434d4
commit 261f682b78
3 changed files with 22 additions and 5 deletions

View File

@ -12,7 +12,8 @@
},
"dependencies": {
"@tauri-apps/api": "^1.4.0",
"vue": "^3.2.45"
"vue": "^3.2.45",
"vue-router": "^4.3.0"
},
"devDependencies": {
"@tauri-apps/cli": "^1.4.0",

View File

@ -11,6 +11,9 @@ dependencies:
vue:
specifier: ^3.2.45
version: 3.2.45
vue-router:
specifier: ^4.3.0
version: 4.3.0(vue@3.2.45)
devDependencies:
'@tauri-apps/cli':
@ -1320,6 +1323,10 @@ packages:
- whiskers
dev: true
/@vue/devtools-api@6.6.1:
resolution: {integrity: sha512-LgPscpE3Vs0x96PzSSB4IGVSZXZBZHpfxs+ZA1d+VEPwHdOXowy/Y2CsvCAIFrf+ssVU1pD1jidj505EpUnfbA==}
dev: false
/@vue/reactivity-transform@3.2.45:
resolution: {integrity: sha512-BHVmzYAvM7vcU5WmuYqXpwaBHjsS8T63jlKGWVtHxAHIoMIlmaMyurUSEs1Zcg46M4AYT5MtB1U274/2aNzjJQ==}
dependencies:
@ -8899,6 +8906,15 @@ packages:
webpack: 5.90.1
dev: true
/vue-router@4.3.0(vue@3.2.45):
resolution: {integrity: sha512-dqUcs8tUeG+ssgWhcPbjHvazML16Oga5w34uCUmsk7i0BcnskoLGwjpa15fqMr2Fa5JgVBrdL2MEgqz6XZ/6IQ==}
peerDependencies:
vue: ^3.2.0
dependencies:
'@vue/devtools-api': 6.6.1
vue: 3.2.45
dev: false
/vue-style-loader@4.1.3:
resolution: {integrity: sha512-sFuh0xfbtpRlKfm39ss/ikqs9AbKCoXZBpHeVZ8Tx650o0k0q/YCM7FRvigtxpACezfq6af+a7JeqVTWvncqDg==}
dependencies:

View File

@ -2,20 +2,20 @@
export default {
data() {
return {
streams: []
};
},
mounted() {
this.initWebcams();
this.initCam();
},
methods: {
async initWebcams() {
async initCam() {
try {
const constraints = { video: true };
const stream = await navigator.mediaDevices.getUserMedia(constraints);
this.streams.push(stream);
} catch (error) {
console.error('Error accessing webcam:', error);
console.error('Error accessing camera:', error);
}
}
}