@pexip/media 17.0.0 → 17.1.0
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 +15 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +18 -13
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @pexip/media
|
|
2
2
|
|
|
3
|
+
## 17.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 4298b039: Allow setting default constraints to `false` Fix Audio mixing
|
|
8
|
+
processor to return immediately when no main tracks
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies [4298b039]
|
|
13
|
+
- Updated dependencies [9fa7884d]
|
|
14
|
+
- @pexip/media-control@17.1.0
|
|
15
|
+
- @pexip/utils@16.7.0
|
|
16
|
+
- @pexip/media-processor@17.1.0
|
|
17
|
+
|
|
3
18
|
## 17.0.0
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -369,8 +369,8 @@ interface MediaOptions {
|
|
|
369
369
|
* Pass default constraints to use with get media wrappers
|
|
370
370
|
*/
|
|
371
371
|
getDefaultConstraints?: () => {
|
|
372
|
-
audio?: InputConstraintSet;
|
|
373
|
-
video?: InputConstraintSet;
|
|
372
|
+
audio?: InputConstraintSet | false;
|
|
373
|
+
video?: InputConstraintSet | false;
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
376
|
interface MediaProps {
|
package/dist/index.mjs
CHANGED
|
@@ -1825,7 +1825,7 @@ var createAudioMixingProcess = (getCurrrentMedia, scope = "mixer") => {
|
|
|
1825
1825
|
}
|
|
1826
1826
|
return Promise.resolve();
|
|
1827
1827
|
});
|
|
1828
|
-
if (!media.stream) {
|
|
1828
|
+
if (!media.stream || !mainTrack && !displayTrack) {
|
|
1829
1829
|
return media;
|
|
1830
1830
|
}
|
|
1831
1831
|
if (!mainTrack && displayTrack) {
|
|
@@ -2148,16 +2148,18 @@ var createMedia = ({
|
|
|
2148
2148
|
});
|
|
2149
2149
|
}
|
|
2150
2150
|
};
|
|
2151
|
-
const mergeMediaConstraints = (constraints) =>
|
|
2152
|
-
audio
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
});
|
|
2151
|
+
const mergeMediaConstraints = (constraints) => {
|
|
2152
|
+
const { audio, video } = getDefaultConstraints();
|
|
2153
|
+
return {
|
|
2154
|
+
audio: audio === false ? false : mergeConstraints(audio)(constraints.audio),
|
|
2155
|
+
video: video === false ? false : mergeConstraints(video)(constraints.video)
|
|
2156
|
+
};
|
|
2157
|
+
};
|
|
2159
2158
|
const getUserMediaAsync = async (constraints) => {
|
|
2160
|
-
queue.enqueue(
|
|
2159
|
+
queue.enqueue(
|
|
2160
|
+
async () => await updateMedia(mergeMediaConstraints(constraints)),
|
|
2161
|
+
false
|
|
2162
|
+
);
|
|
2161
2163
|
await queue.execute();
|
|
2162
2164
|
};
|
|
2163
2165
|
const getUserMedia3 = (constraints) => {
|
|
@@ -2172,11 +2174,14 @@ var createMedia = ({
|
|
|
2172
2174
|
{ status: props.media.status },
|
|
2173
2175
|
"Current Permission State"
|
|
2174
2176
|
);
|
|
2177
|
+
const mergedConstraints = mergeMediaConstraints(constraints);
|
|
2178
|
+
props.media.constraints = mergedConstraints;
|
|
2175
2179
|
props.devices = await getDevices2();
|
|
2180
|
+
if (!mergedConstraints.audio && !mergedConstraints.video) {
|
|
2181
|
+
return;
|
|
2182
|
+
}
|
|
2176
2183
|
if (isInitialPermissionsGranted(props.media.status)) {
|
|
2177
|
-
return await updateMedia(
|
|
2178
|
-
mergeMediaConstraints(constraints)
|
|
2179
|
-
);
|
|
2184
|
+
return await updateMedia(mergedConstraints);
|
|
2180
2185
|
}
|
|
2181
2186
|
});
|
|
2182
2187
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pexip/media",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.1.0",
|
|
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,10 +32,10 @@
|
|
|
32
32
|
"typecheck": "yarn tsc --noEmit -p ."
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@pexip/media-control": "17.
|
|
36
|
-
"@pexip/media-processor": "17.
|
|
35
|
+
"@pexip/media-control": "17.1.0",
|
|
36
|
+
"@pexip/media-processor": "17.1.0",
|
|
37
37
|
"@pexip/signal": "16.5.0",
|
|
38
|
-
"@pexip/utils": "16.
|
|
38
|
+
"@pexip/utils": "16.7.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@jest/globals": "^29.5.0",
|