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": { "dependencies": {
"@tauri-apps/api": "^1.4.0", "@tauri-apps/api": "^1.4.0",
"vue": "^3.2.45" "vue": "^3.2.45",
"vue-router": "^4.3.0"
}, },
"devDependencies": { "devDependencies": {
"@tauri-apps/cli": "^1.4.0", "@tauri-apps/cli": "^1.4.0",

View File

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

View File

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