@live-change/peer-connection-frontend 0.8.93 → 0.8.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -140,6 +140,8 @@
|
|
|
140
140
|
</template>
|
|
141
141
|
</PermissionsDialog>
|
|
142
142
|
|
|
143
|
+
<pre>{{ model }}</pre>
|
|
144
|
+
<!-- <pre>{{ audioInputs }}</pre>-->
|
|
143
145
|
<!--
|
|
144
146
|
|
|
145
147
|
<pre>PD: {{ permissionsDialog }}</pre>
|
|
@@ -243,9 +245,22 @@
|
|
|
243
245
|
onMounted(updateDevices)
|
|
244
246
|
}
|
|
245
247
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
248
|
+
function fixLabel(device, index) {
|
|
249
|
+
const { deviceId, groupId, kind, label } = device
|
|
250
|
+
if(!label.trim()) return {
|
|
251
|
+
deviceId, groupId, kind,
|
|
252
|
+
label: ({
|
|
253
|
+
audioinput: "Audio Input",
|
|
254
|
+
audiooutput: "Audio Output",
|
|
255
|
+
videoinput: "Video Input"
|
|
256
|
+
}[kind]) + ` ${index + 1}`
|
|
257
|
+
}
|
|
258
|
+
return device
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
const audioInputs = computed(() => devices.value.filter(device => device.kind === 'audioinput').map(fixLabel))
|
|
262
|
+
const audioOutputs = computed(() => devices.value.filter(device => device.kind === 'audiooutput').map(fixLabel))
|
|
263
|
+
const videoInputs = computed(() => devices.value.filter(device => device.kind === 'videoinput').map(fixLabel))
|
|
249
264
|
|
|
250
265
|
watch(audioInputs, (value) => {
|
|
251
266
|
if(value.length === 0) return
|
|
@@ -296,8 +311,10 @@
|
|
|
296
311
|
}
|
|
297
312
|
model.value = {
|
|
298
313
|
...model.value,
|
|
314
|
+
dupa:123,
|
|
299
315
|
media
|
|
300
316
|
}
|
|
317
|
+
console.log("MEDIA STREAM CHANGED", model.value.media, media)
|
|
301
318
|
}
|
|
302
319
|
|
|
303
320
|
/* onMounted(() => {
|
|
@@ -459,6 +476,15 @@
|
|
|
459
476
|
const permissionsCallbacks = ref({})
|
|
460
477
|
|
|
461
478
|
async function showPermissionsDialog() {
|
|
479
|
+
try {
|
|
480
|
+
await Promise.all([
|
|
481
|
+
navigator.permissions.query({ name: 'camera' }),
|
|
482
|
+
navigator.permissions.query({ name: 'microphone' })
|
|
483
|
+
])
|
|
484
|
+
} catch(error) {
|
|
485
|
+
/// TODO: some other dialog for firefox...
|
|
486
|
+
return
|
|
487
|
+
}
|
|
462
488
|
return new Promise((resolve, reject) => {
|
|
463
489
|
permissionsCallbacks.value = {
|
|
464
490
|
audioOnly: () => {
|
|
@@ -498,6 +524,7 @@
|
|
|
498
524
|
|
|
499
525
|
function handleEmptyPreviewClick() {
|
|
500
526
|
if(model.value.media) return
|
|
527
|
+
if(!permissionsDialog.value?.permissions) return
|
|
501
528
|
const { camera, microphone } = permissionsDialog.value.permissions
|
|
502
529
|
if(camera === 'denied' || microphone === 'denied') {
|
|
503
530
|
// open permissions dialog
|
|
@@ -507,6 +534,7 @@
|
|
|
507
534
|
|
|
508
535
|
function handleDisabledAudioClick() {
|
|
509
536
|
limitedMedia.value = null
|
|
537
|
+
if(!permissionsDialog.value?.permissions) return
|
|
510
538
|
const { camera, microphone } = permissionsDialog.value.permissions
|
|
511
539
|
if(camera === 'denied' || microphone === 'denied') {
|
|
512
540
|
// open permissions dialog
|
|
@@ -516,6 +544,7 @@
|
|
|
516
544
|
function handleDisabledVideoClick() {
|
|
517
545
|
console.log("DISABLED VIDEO CLICK")
|
|
518
546
|
limitedMedia.value = null
|
|
547
|
+
if(!permissionsDialog.value?.permissions) return
|
|
519
548
|
const { camera, microphone } = permissionsDialog.value.permissions
|
|
520
549
|
if(camera === 'denied' || microphone === 'denied') {
|
|
521
550
|
// open permissions dialog
|
|
@@ -105,8 +105,13 @@
|
|
|
105
105
|
|
|
106
106
|
for(const requiredPermission of JSON.parse(value)) {
|
|
107
107
|
console.log("check permission", requiredPermission)
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
let state, permissionState
|
|
109
|
+
try {
|
|
110
|
+
permissionState = await navigator.permissions.query(requiredPermission)
|
|
111
|
+
state = permissionState ? permissionState.state : "unknown"
|
|
112
|
+
} catch {
|
|
113
|
+
state = 'not_supported'
|
|
114
|
+
}
|
|
110
115
|
model.value = {
|
|
111
116
|
...model.value,
|
|
112
117
|
permissions: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/peer-connection-frontend",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.94",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "dotenvx run -- node server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
|
|
6
6
|
"localDevInit": "rm tmp.db; dotenvx run -- node server/start.js localDev --enableSessions --initScript ./init.js",
|
|
@@ -22,19 +22,19 @@
|
|
|
22
22
|
},
|
|
23
23
|
"type": "module",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@live-change/cli": "^0.8.
|
|
26
|
-
"@live-change/dao": "^0.8.
|
|
27
|
-
"@live-change/dao-vue3": "^0.8.
|
|
28
|
-
"@live-change/dao-websocket": "^0.8.
|
|
29
|
-
"@live-change/framework": "^0.8.
|
|
30
|
-
"@live-change/password-authentication-service": "^0.8.
|
|
31
|
-
"@live-change/secret-code-service": "^0.8.
|
|
32
|
-
"@live-change/secret-link-service": "^0.8.
|
|
33
|
-
"@live-change/session-service": "^0.8.
|
|
34
|
-
"@live-change/user-frontend": "^0.8.
|
|
35
|
-
"@live-change/user-service": "^0.8.
|
|
36
|
-
"@live-change/vue3-components": "^0.8.
|
|
37
|
-
"@live-change/vue3-ssr": "^0.8.
|
|
25
|
+
"@live-change/cli": "^0.8.94",
|
|
26
|
+
"@live-change/dao": "^0.8.94",
|
|
27
|
+
"@live-change/dao-vue3": "^0.8.94",
|
|
28
|
+
"@live-change/dao-websocket": "^0.8.94",
|
|
29
|
+
"@live-change/framework": "^0.8.94",
|
|
30
|
+
"@live-change/password-authentication-service": "^0.8.94",
|
|
31
|
+
"@live-change/secret-code-service": "^0.8.94",
|
|
32
|
+
"@live-change/secret-link-service": "^0.8.94",
|
|
33
|
+
"@live-change/session-service": "^0.8.94",
|
|
34
|
+
"@live-change/user-frontend": "^0.8.94",
|
|
35
|
+
"@live-change/user-service": "^0.8.94",
|
|
36
|
+
"@live-change/vue3-components": "^0.8.94",
|
|
37
|
+
"@live-change/vue3-ssr": "^0.8.94",
|
|
38
38
|
"@vueuse/core": "^10.11.0",
|
|
39
39
|
"boxicons": "^2.1.4",
|
|
40
40
|
"codeceptjs-assert": "^0.0.5",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"vue3-scroll-border": "0.1.6"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@live-change/codeceptjs-helper": "^0.8.
|
|
57
|
+
"@live-change/codeceptjs-helper": "^0.8.94",
|
|
58
58
|
"codeceptjs": "^3.6.5",
|
|
59
59
|
"generate-password": "1.7.1",
|
|
60
60
|
"playwright": "^1.41.2",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"author": "Michał Łaszczewski <michal@laszczewski.pl>",
|
|
66
66
|
"license": "BSD-3-Clause",
|
|
67
67
|
"description": "",
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "1c40a298d8d39dfcf4fc17bb754df365e7214d3e"
|
|
69
69
|
}
|