@pexip/media 17.1.0 → 17.1.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @pexip/media
2
2
 
3
+ ## 17.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 51b06b3c: Fix initial media status derive
8
+ - @pexip/media-control@17.1.1
9
+ - @pexip/media-processor@17.1.1
10
+
3
11
  ## 17.1.0
4
12
 
5
13
  ### Minor Changes
package/README.md CHANGED
@@ -3,21 +3,25 @@
3
3
  A package to connect `@pexip/media-control` and `@pexip/media-processor` to
4
4
  create a streamlined media process
5
5
 
6
+ ## Install
7
+
8
+ `npm install @pexip/media`
9
+
6
10
  ## Overview
7
11
 
8
12
  ### `createMedia`
9
13
 
10
- It create an object to interact with the media stream, which is usually used for
11
- our main stream.
14
+ It create's an object to interact with the media stream, which is usually used
15
+ for our main stream.
12
16
 
13
- Its majority features:
17
+ Its major features:
14
18
 
15
19
  - Create a media pipeline to get and process the `MediaStream`, see
16
20
  `createMediaPipeline`. It also provides some media features including:
17
21
 
18
22
  - Video Processing - background blur
19
23
  - Audio Processing - Noise Suppression
20
- - Audio Signal Detection - To detect if the active audio input device capturing any audio
24
+ - Audio Signal Detection - To detect if the active audio input device is capturing any audio
21
25
  - Voice Activity Detection - To detect if there is any voice activity
22
26
 
23
27
  - Provide media input related information
@@ -36,8 +40,8 @@ A processor to process video from the stream to be used together with
36
40
 
37
41
  ### `createPreviewController`
38
42
 
39
- It create an object to control the provided media stream, e.g. change the
40
- audio/video input device and apply changes to main stream when necessary.
43
+ It create's an object to control the provided media stream, e.g. change the
44
+ audio/video input device and apply changes to the main stream when necessary.
41
45
 
42
46
  ## Usage
43
47
 
@@ -259,7 +263,7 @@ signals.onStreamTrackEnabled.add(track => {
259
263
  console.log(track);
260
264
  });
261
265
 
262
- // Later we can initial a gUM to get a MediaStream
266
+ // Later we can initialize a gUM to get a MediaStream
263
267
  mediaController.getUserMedia({
264
268
  audio: {
265
269
  sampleRate: 48000, // Ideal sample rate for our own noise suppression implementation
@@ -291,7 +295,7 @@ mediaController.media.status = UserMediaStatus.Initial;
291
295
  // Stop the `MediaStream`
292
296
  await mediaController.media.release();
293
297
 
294
- // Later we can make changes to the media on-demand without initiate a new gUM call
298
+ // Later we can make changes to the media on-demand without initiating a new gUM call
295
299
 
296
300
  // Turn off background blur
297
301
  await mediaController.media.applyConstraints({
@@ -305,7 +309,7 @@ await mediaController.media.applyConstraints({
305
309
  await mediaController.media.applyConstraints({
306
310
  audio: {denoise: true, noiseSuppression: false},
307
311
  });
308
- // Use build-in noise suppression
312
+ // Use built-in noise suppression
309
313
  await mediaController.media.applyConstraints({
310
314
  audio: {denoise: false, noiseSuppression: true},
311
315
  });
@@ -345,6 +349,4 @@ const controller = createPreviewController({
345
349
  },
346
350
  psySegScriptLoaded: true,
347
351
  });
348
-
349
- // Want to learn more? Please checkout the `@pexip/media-demo` sample app to try
350
352
  ```
package/dist/index.mjs CHANGED
@@ -234,7 +234,8 @@ var deriveInitialPermissionStatus = async (prevStatus, getPermissionState = getI
234
234
  if (isInitialPermissions(prevStatus) || isRejected(prevStatus)) {
235
235
  return prevStatus;
236
236
  }
237
- if (areBothGranted(prevStatus)) {
237
+ const { audio, video } = await getPermissionState();
238
+ if (areBothGranted(prevStatus) || audio === "granted" && video === "granted") {
238
239
  return "initial-permissions-granted" /* InitialPermissionsGranted */;
239
240
  }
240
241
  if (isGrantedAudio(prevStatus)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pexip/media",
3
- "version": "17.1.0",
3
+ "version": "17.1.1",
4
4
  "description": "Home for media related stuff",
5
5
  "homepage": "https://gitlab.com/pexip/zoo",
6
6
  "bugs": "https://gitlab.com/pexip/zoo/issues",
@@ -32,8 +32,8 @@
32
32
  "typecheck": "yarn tsc --noEmit -p ."
33
33
  },
34
34
  "dependencies": {
35
- "@pexip/media-control": "17.1.0",
36
- "@pexip/media-processor": "17.1.0",
35
+ "@pexip/media-control": "17.1.1",
36
+ "@pexip/media-processor": "17.1.1",
37
37
  "@pexip/signal": "16.5.0",
38
38
  "@pexip/utils": "16.7.0"
39
39
  },