@live-change/peer-connection-frontend 0.8.94 → 0.8.96

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.
@@ -14,6 +14,7 @@ declare module 'vue' {
14
14
  Dialog: typeof import('primevue/dialog')['default']
15
15
  Dropdown: typeof import('primevue/dropdown')['default']
16
16
  InputSwitch: typeof import('primevue/inputswitch')['default']
17
+ MediaSettingsButton: typeof import('./src/components/MediaSettingsButton.vue')['default']
17
18
  MicrophoneButton: typeof import('./src/components/MicrophoneButton.vue')['default']
18
19
  PermissionsDialog: typeof import('./src/components/PermissionsDialog.vue')['default']
19
20
  RouterLink: typeof import('vue-router')['RouterLink']
@@ -44,6 +44,11 @@
44
44
  </div>
45
45
  </div>
46
46
 
47
+ <div v-if="gettingUserMedia"
48
+ class="absolute top-0 left-0 w-full h-full flex flex-column justify-content-center align-items-center">
49
+ <ProgressSpinner />
50
+ </div>
51
+
47
52
  <div class="absolute top-0 left-0 w-full h-full flex flex-column justify-content-end align-items-center">
48
53
  <div class="flex flex-row justify-content-between align-items-center h-5rem w-7rem media-buttons">
49
54
  <MicrophoneButton v-model="model" @disabled-audio-click="handleDisabledAudioClick" />
@@ -140,7 +145,7 @@
140
145
  </template>
141
146
  </PermissionsDialog>
142
147
 
143
- <pre>{{ model }}</pre>
148
+ <!-- <pre>{{ model }}</pre>-->
144
149
  <!-- <pre>{{ audioInputs }}</pre>-->
145
150
  <!--
146
151
 
@@ -165,6 +170,7 @@
165
170
 
166
171
  import Button from 'primevue/button'
167
172
  import Dropdown from 'primevue/dropdown'
173
+ import ProgressSpinner from 'primevue/progressspinner'
168
174
  import PermissionsDialog from './PermissionsDialog.vue'
169
175
  import VolumeIndicator from './VolumeIndicator.vue'
170
176
 
@@ -311,10 +317,15 @@
311
317
  }
312
318
  model.value = {
313
319
  ...model.value,
314
- dupa:123,
315
320
  media
316
321
  }
317
- console.log("MEDIA STREAM CHANGED", model.value.media, media)
322
+ setTimeout(() => { /// firefox needs this timeout
323
+ model.value = {
324
+ ...model.value,
325
+ media
326
+ }
327
+ console.log("MEDIA STREAM CHANGED", model.value.media, media)
328
+ }, 1)
318
329
  }
319
330
 
320
331
  /* onMounted(() => {
@@ -349,11 +360,18 @@
349
360
  }
350
361
  }, { immediate: true })
351
362
 
352
- let gettingUserMedia = false
363
+ const gettingUserMedia = ref(false)
353
364
  async function updateUserMedia(retry = false) {
354
365
  console.log("USER MEDIA UPDATE WHEN MODEL IS", model.value)
355
- if(gettingUserMedia) return
356
- gettingUserMedia = true
366
+ if(gettingUserMedia.value) return
367
+ if(!retry && model.value.mediaError) {
368
+ console.log("CLEAR MEDIA ERROR")
369
+ model.value = {
370
+ ...model.value,
371
+ mediaError: null
372
+ }
373
+ }
374
+ gettingUserMedia.value = true
357
375
  try {
358
376
  const constraints = selectedConstraints.value
359
377
  const videoAllowed = videoInputRequest.value !== 'none' && constraints.video
@@ -366,6 +384,10 @@
366
384
  try {
367
385
  console.log("GET USER MEDIA")
368
386
  const mediaStream = await getUserMediaNative(constraints)
387
+ if(JSON.stringify(selectedConstraints.value) !== JSON.stringify(constraints)) {
388
+ console.log("SELECTED CONSTRAINTS CHANGED WHILE GETTING USER MEDIA")
389
+ return
390
+ }
369
391
  /* if(userMedia.value && retry) {
370
392
  console.log("CLOSE USER MEDIA")
371
393
  userMedia.value.getTracks().forEach(track => track.stop())
@@ -425,7 +447,7 @@
425
447
  }
426
448
  }
427
449
  } finally {
428
- gettingUserMedia = false
450
+ gettingUserMedia.value = false
429
451
  }
430
452
  }
431
453
 
@@ -574,7 +596,7 @@
574
596
  function updateAudioInput(value) {
575
597
  model.value = {
576
598
  ...model.value,
577
- audioInput: value
599
+ audioInput: value,
578
600
  }
579
601
  }
580
602
  function updateAudioOutput(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/peer-connection-frontend",
3
- "version": "0.8.94",
3
+ "version": "0.8.96",
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.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",
25
+ "@live-change/cli": "^0.8.96",
26
+ "@live-change/dao": "^0.8.96",
27
+ "@live-change/dao-vue3": "^0.8.96",
28
+ "@live-change/dao-websocket": "^0.8.96",
29
+ "@live-change/framework": "^0.8.96",
30
+ "@live-change/password-authentication-service": "^0.8.96",
31
+ "@live-change/secret-code-service": "^0.8.96",
32
+ "@live-change/secret-link-service": "^0.8.96",
33
+ "@live-change/session-service": "^0.8.96",
34
+ "@live-change/user-frontend": "^0.8.96",
35
+ "@live-change/user-service": "^0.8.96",
36
+ "@live-change/vue3-components": "^0.8.96",
37
+ "@live-change/vue3-ssr": "^0.8.96",
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.94",
57
+ "@live-change/codeceptjs-helper": "^0.8.96",
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": "1c40a298d8d39dfcf4fc17bb754df365e7214d3e"
68
+ "gitHead": "e6eb56356f9b75fc5656c795f0dfaf9a0ad143c2"
69
69
  }