@live-change/peer-connection-frontend 0.8.105 → 0.8.107
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.
|
@@ -311,6 +311,7 @@
|
|
|
311
311
|
|
|
312
312
|
function setUserMedia(media) {
|
|
313
313
|
if(media === model.value.media) return
|
|
314
|
+
if(media?.id === model.value.media?.id) return
|
|
314
315
|
console.log("MEDIA STREAM CHANGE", media, 'FROM', model.value.media)
|
|
315
316
|
if(model.value.media) {
|
|
316
317
|
stopMedia(model.value.media)
|
|
@@ -343,12 +344,11 @@
|
|
|
343
344
|
const limitedMedia = ref(null)
|
|
344
345
|
|
|
345
346
|
const selectedConstraints = ref({ video: false, audio: false })
|
|
346
|
-
|
|
347
|
-
video
|
|
348
|
-
|
|
349
|
-
audio
|
|
347
|
+
watchEffect(() => {
|
|
348
|
+
const video = limitedMedia.value === 'audio' ? false :
|
|
349
|
+
{ deviceId: model.value?.videoInput?.deviceId, ...constraints.value.video }
|
|
350
|
+
const audio = limitedMedia.value === 'video' ? false :
|
|
350
351
|
{ deviceId: model.value?.audioInput?.deviceId, ...constraints.value.audio }
|
|
351
|
-
}), ({ video, audio }) => {
|
|
352
352
|
console.log("SELECTED CONSTRAINTS", {
|
|
353
353
|
video: selectedConstraints.value.video?.deviceId,
|
|
354
354
|
audio: selectedConstraints.value.audio?.deviceId
|
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
console.log("SELECTED CONSTRAINTS CHANGE", { video: video.deviceId, audio: audio.deviceId })
|
|
359
359
|
selectedConstraints.value = { video, audio }
|
|
360
360
|
}
|
|
361
|
-
}
|
|
361
|
+
})
|
|
362
362
|
|
|
363
363
|
const gettingUserMedia = ref(false)
|
|
364
364
|
async function updateUserMedia(retry = false) {
|
|
@@ -386,6 +386,9 @@
|
|
|
386
386
|
const mediaStream = await getUserMediaNative(constraints)
|
|
387
387
|
if(JSON.stringify(selectedConstraints.value) !== JSON.stringify(constraints)) {
|
|
388
388
|
console.log("SELECTED CONSTRAINTS CHANGED WHILE GETTING USER MEDIA")
|
|
389
|
+
stopMedia(mediaStream)
|
|
390
|
+
gettingUserMedia.value = false
|
|
391
|
+
setTimeout(() => updateUserMedia(), 10)
|
|
389
392
|
return
|
|
390
393
|
}
|
|
391
394
|
/* if(userMedia.value && retry) {
|
|
@@ -47,10 +47,15 @@ async function isUserMediaPermitted(constraints = { audio: true, video: true })
|
|
|
47
47
|
const getUserMediaNative = userMediaFactory()
|
|
48
48
|
const getDisplayMediaNative = displayMediaFactory()
|
|
49
49
|
|
|
50
|
-
const trackedStreams = []
|
|
50
|
+
//const trackedStreams = []
|
|
51
|
+
globalThis.trackedStreams = []
|
|
51
52
|
|
|
52
53
|
async function getUserMedia(...args) {
|
|
53
54
|
const stream = await getUserMediaNative(...args)
|
|
55
|
+
const index = trackedStreams.indexOf(stream)
|
|
56
|
+
if(index >= 0) {
|
|
57
|
+
console.error("STREAM ALREADY TRACKED", stream, "ALL STREAMS", trackedStreams)
|
|
58
|
+
}
|
|
54
59
|
trackedStreams.push(stream)
|
|
55
60
|
console.log("STREAM ADDED", stream, "ALL STREAMS", trackedStreams.length)
|
|
56
61
|
return stream
|
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.107",
|
|
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.107",
|
|
26
|
+
"@live-change/dao": "^0.8.107",
|
|
27
|
+
"@live-change/dao-vue3": "^0.8.107",
|
|
28
|
+
"@live-change/dao-websocket": "^0.8.107",
|
|
29
|
+
"@live-change/framework": "^0.8.107",
|
|
30
|
+
"@live-change/password-authentication-service": "^0.8.107",
|
|
31
|
+
"@live-change/secret-code-service": "^0.8.107",
|
|
32
|
+
"@live-change/secret-link-service": "^0.8.107",
|
|
33
|
+
"@live-change/session-service": "^0.8.107",
|
|
34
|
+
"@live-change/user-frontend": "^0.8.107",
|
|
35
|
+
"@live-change/user-service": "^0.8.107",
|
|
36
|
+
"@live-change/vue3-components": "^0.8.107",
|
|
37
|
+
"@live-change/vue3-ssr": "^0.8.107",
|
|
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.107",
|
|
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": "da00b9062a0238e1497c76009b0bd9e74ff7a376"
|
|
69
69
|
}
|