@live-change/peer-connection-frontend 0.8.37 → 0.8.39

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.
@@ -10,7 +10,6 @@ declare module 'vue' {
10
10
  Button: typeof import('primevue/button')['default']
11
11
  Debugger: typeof import('./src/components/Debugger.vue')['default']
12
12
  DeviceSelect: typeof import('./src/components/DeviceSelect.vue')['default']
13
- DevicesSelect: typeof import('./src/components/DevicesSelect.vue')['default']
14
13
  Dialog: typeof import('primevue/dialog')['default']
15
14
  Dropdown: typeof import('primevue/dropdown')['default']
16
15
  InputSwitch: typeof import('primevue/inputswitch')['default']
@@ -64,15 +64,11 @@
64
64
  </video>
65
65
  </div>
66
66
 
67
-
68
67
  </div>
69
68
  </template>
70
69
 
71
70
  <script setup>
72
71
  import Button from "primevue/button"
73
- import Dropdown from "primevue/dropdown"
74
- import Dialog from "primevue/dialog"
75
- import PermissionsDialog from './PermissionsDialog.vue'
76
72
  import DeviceSelect from './DeviceSelect.vue'
77
73
 
78
74
  import { ref, unref, computed, watch, onMounted, onUnmounted, getCurrentInstance } from 'vue'
@@ -82,7 +78,7 @@
82
78
  const appContext = (typeof window != 'undefined') && getCurrentInstance()?.appContext
83
79
 
84
80
  import { createPeer } from "./Peer.js"
85
- import { getUserMedia as getUserMediaNative, getDisplayMedia as getDisplayMediaNative, isUserMediaPermitted }
81
+ import { getDisplayMedia as getDisplayMediaNative }
86
82
  from "./userMedia.js"
87
83
  import { mediaStreamsTracks } from './mediaStreamsTracks.js'
88
84
 
@@ -169,43 +165,6 @@
169
165
  createPeerPromise = null
170
166
  }
171
167
 
172
- const permissionsDialog = ref(false)
173
- const permissionsCallbacks = ref(null)
174
-
175
- async function showPermissionsDialog() {
176
- return new Promise((resolve, reject) => {
177
- permissionsCallbacks.value = {
178
- disabled: () => {
179
- resolve(false)
180
- },
181
- ok: () => {
182
- resolve(true)
183
- },
184
- cancel: () => {
185
- reject('canceled by user')
186
- }
187
- }
188
- permissionsDialog.value = {
189
- visible: true
190
- }
191
- })
192
- }
193
-
194
- const connectDeviceDialog = ref(false)
195
- const connectDeviceCallbacks = ref(null)
196
-
197
- async function askToConnectCamera(constraints) {
198
- return new Promise((resolve, reject) => {
199
- connectDeviceCallbacks.value = {
200
- connected: () => resolve({ ...constraints }),
201
- camera: () => resolve({ ...constraints, audio: false }),
202
- microphone: () => resolve({ ...constraints, video: false }),
203
- cancel: () => resolve(null)
204
- }
205
- connectDeviceDialog.value = true
206
- })
207
- }
208
-
209
168
  async function getDisplayMedia() { // media stream retrival logic
210
169
  let initialConstraints = { video: true } // make a copy
211
170
  let constraints = { ...initialConstraints }
@@ -231,7 +190,6 @@
231
190
  displayMedia.value = null
232
191
  }
233
192
 
234
-
235
193
  function sendTestMessage() {
236
194
  for(const connection of peer.value.connections) {
237
195
  peer.value.sendMessage({
@@ -242,7 +200,6 @@
242
200
  }
243
201
  }
244
202
 
245
-
246
203
  </script>
247
204
 
248
205
  <style scoped lang="scss">
@@ -54,7 +54,6 @@
54
54
  let lowProcessor, midProcessor, highProcessor
55
55
  let lowSlow = 0, midSlow = 0, highSlow = 0
56
56
 
57
-
58
57
  function measureAmplitudeProcess(cb) {
59
58
  return function(event) {
60
59
  const numberOfChannels = event.inputBuffer.numberOfChannels
@@ -72,6 +71,7 @@
72
71
  }
73
72
 
74
73
  function handleLow(instant) {
74
+ if(!low.value) return console.log("no low element")
75
75
  instant = Math.log(instant)
76
76
  let value = lowSlow
77
77
  if(!Number.isFinite(value)) value = -1000
@@ -84,6 +84,7 @@
84
84
  low.value.style.height = height + 'px'
85
85
  }
86
86
  function handleMid(instant) {
87
+ if(!mid.value) return console.log("no mid element")
87
88
  instant = Math.log(instant)
88
89
  let value = midSlow
89
90
  if(!Number.isFinite(value)) value = -1000
@@ -96,6 +97,7 @@
96
97
  mid.value.style.height = height + 'px'
97
98
  }
98
99
  function handleHigh(instant) {
100
+ if(!high.value) return console.log("no high element")
99
101
  instant = Math.log(instant)
100
102
  let value = highSlow
101
103
  if(!Number.isFinite(value)) value = -1000
package/index.js CHANGED
@@ -8,8 +8,11 @@ export { Debugger, DeviceSelect, PermissionsDialog, VolumeIndicator }
8
8
  import { createPeer } from './front/src/components/Peer.js'
9
9
  import { createPeerConnection } from './front/src/components/PeerConnection.js'
10
10
  import { getUserMedia, getDisplayMedia, isUserMediaPermitted } from './front/src/components/userMedia.js'
11
+ import { mediaStreamsTracks } from './front/src/components/mediaStreamsTracks.js'
11
12
 
12
- export { createPeer, createPeerConnection, getUserMedia, getDisplayMedia, isUserMediaPermitted }
13
+ export {
14
+ createPeer, createPeerConnection, getUserMedia, getDisplayMedia, isUserMediaPermitted, mediaStreamsTracks
15
+ }
13
16
 
14
17
  import { peerConnectionRoutes } from './front/src/router.js'
15
18
  export { peerConnectionRoutes }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/peer-connection-frontend",
3
- "version": "0.8.37",
3
+ "version": "0.8.39",
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.37",
26
- "@live-change/dao": "^0.8.37",
27
- "@live-change/dao-vue3": "^0.8.37",
28
- "@live-change/dao-websocket": "^0.8.37",
29
- "@live-change/framework": "^0.8.37",
30
- "@live-change/password-authentication-service": "^0.8.37",
31
- "@live-change/secret-code-service": "^0.8.37",
32
- "@live-change/secret-link-service": "^0.8.37",
33
- "@live-change/session-service": "^0.8.37",
34
- "@live-change/user-frontend": "^0.8.37",
35
- "@live-change/user-service": "^0.8.37",
36
- "@live-change/vue3-components": "^0.8.37",
37
- "@live-change/vue3-ssr": "^0.8.37",
25
+ "@live-change/cli": "^0.8.39",
26
+ "@live-change/dao": "^0.8.39",
27
+ "@live-change/dao-vue3": "^0.8.39",
28
+ "@live-change/dao-websocket": "^0.8.39",
29
+ "@live-change/framework": "^0.8.39",
30
+ "@live-change/password-authentication-service": "^0.8.39",
31
+ "@live-change/secret-code-service": "^0.8.39",
32
+ "@live-change/secret-link-service": "^0.8.39",
33
+ "@live-change/session-service": "^0.8.39",
34
+ "@live-change/user-frontend": "^0.8.39",
35
+ "@live-change/user-service": "^0.8.39",
36
+ "@live-change/vue3-components": "^0.8.39",
37
+ "@live-change/vue3-ssr": "^0.8.39",
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.37",
57
+ "@live-change/codeceptjs-helper": "^0.8.39",
58
58
  "codeceptjs": "^3.5.12",
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": "8b97a83258a3eccd08534d0376015781c4eefdec"
68
+ "gitHead": "153d139ad9785b0b2fcbfbf2c35a999a499f2168"
69
69
  }
@@ -1,6 +1,9 @@
1
1
  import App from "@live-change/framework"
2
2
  const app = App.app()
3
3
 
4
+ import dotenv from 'dotenv'
5
+ dotenv.config()
6
+
4
7
  const contactTypes = ['email', 'phone']
5
8
  const remoteAccountTypes = ['google']
6
9
 
@@ -108,6 +111,10 @@ app.config = {
108
111
  turn: {
109
112
  urls: 'turn:turn.chaosu.pl:4433'
110
113
  }
114
+ },
115
+ {
116
+ name: 'videoCall',
117
+ path: "@live-change/video-call-service",
111
118
  }
112
119
  ]
113
120
  }