@pexip/media 19.0.0 → 19.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 +13 -0
- package/dist/media.js +10 -2
- package/dist/previewController.js +1 -0
- package/dist/utils.js +3 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @pexip/media
|
|
2
2
|
|
|
3
|
+
## 19.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 7271998: Fix `syncMuteState` and
|
|
8
|
+
`onAudioMuteStateChanged`/`onVideoMuteStateChanged`
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies [e3a9d84]
|
|
13
|
+
- @pexip/media-processor@19.1.0
|
|
14
|
+
- @pexip/media-control@19.1.0
|
|
15
|
+
|
|
3
16
|
## 19.0.0
|
|
4
17
|
|
|
5
18
|
### Major Changes
|
package/dist/media.js
CHANGED
|
@@ -215,12 +215,20 @@ export const createMedia = ({ getMuteState, signals, audioProcessors, videoProce
|
|
|
215
215
|
const syncMuteState = (tracks) => {
|
|
216
216
|
const inputMuted = getMuteState();
|
|
217
217
|
for (const track of tracks) {
|
|
218
|
+
const prevMuted = track.muted;
|
|
218
219
|
switch (track.kind) {
|
|
219
|
-
case 'audioinput':
|
|
220
|
+
case 'audioinput': {
|
|
220
221
|
track.mute(inputMuted.audio);
|
|
222
|
+
if (prevMuted !== track.muted) {
|
|
223
|
+
signals.onAudioMuteStateChanged?.emit(track.muted);
|
|
224
|
+
}
|
|
221
225
|
break;
|
|
226
|
+
}
|
|
222
227
|
case 'videoinput':
|
|
223
228
|
track.mute(inputMuted.video);
|
|
229
|
+
if (prevMuted !== track.muted) {
|
|
230
|
+
signals.onVideoMuteStateChanged?.emit(track.muted);
|
|
231
|
+
}
|
|
224
232
|
break;
|
|
225
233
|
default:
|
|
226
234
|
break;
|
|
@@ -271,7 +279,7 @@ export const createMedia = ({ getMuteState, signals, audioProcessors, videoProce
|
|
|
271
279
|
shouldDiscardMedia: () => props.discardMedia,
|
|
272
280
|
onMediaTracksChanged: (media, tracks) => {
|
|
273
281
|
// Sync mute state to input tracks
|
|
274
|
-
syncMuteState(
|
|
282
|
+
syncMuteState(tracks);
|
|
275
283
|
tracks.forEach(track => {
|
|
276
284
|
if (track.track) {
|
|
277
285
|
const unsubscribe = createStreamTrackEventSubscriptions(track.track, {
|
|
@@ -321,6 +321,7 @@ export const createPreviewStreamController = ({ getCurrentDevices, getCurrentMed
|
|
|
321
321
|
if (mainMedia && mainStream) {
|
|
322
322
|
// Workaround for iOS Safari bug
|
|
323
323
|
// https://bugs.webkit.org/show_bug.cgi?id=179363
|
|
324
|
+
// https://github.com/pexip/mcu/issues/43138
|
|
324
325
|
const mainMuted = !!mainStream.getTracks().some(t => t.muted);
|
|
325
326
|
const current = mainMedia.audioInput;
|
|
326
327
|
const prev = props.originalMainAudioInput;
|
package/dist/utils.js
CHANGED
|
@@ -41,7 +41,7 @@ export const createMediaTrack = (trackInit) => {
|
|
|
41
41
|
...(trackInit.getSettings?.() ?? {}),
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
|
-
|
|
44
|
+
const mediaTrack = {
|
|
45
45
|
get kind() {
|
|
46
46
|
return trackInit.kind;
|
|
47
47
|
},
|
|
@@ -74,7 +74,7 @@ export const createMediaTrack = (trackInit) => {
|
|
|
74
74
|
isTrackMuted(trackInit.track));
|
|
75
75
|
},
|
|
76
76
|
get source() {
|
|
77
|
-
return sourceMediaTrack ??
|
|
77
|
+
return sourceMediaTrack ?? mediaTrack;
|
|
78
78
|
},
|
|
79
79
|
mute(toMute) {
|
|
80
80
|
if (trackInit.overrideMute) {
|
|
@@ -152,6 +152,7 @@ export const createMediaTrack = (trackInit) => {
|
|
|
152
152
|
};
|
|
153
153
|
},
|
|
154
154
|
};
|
|
155
|
+
return mediaTrack;
|
|
155
156
|
};
|
|
156
157
|
export const createTrackProcessingPipeline = (processors) => async (track) => {
|
|
157
158
|
let lastTrack = track;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pexip/media",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.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",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"typecheck": "yarn tsc --noEmit -p ."
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@pexip/media-control": "19.
|
|
37
|
-
"@pexip/media-processor": "19.
|
|
36
|
+
"@pexip/media-control": "19.1.0",
|
|
37
|
+
"@pexip/media-processor": "19.1.0",
|
|
38
38
|
"@pexip/signal": "16.7.1",
|
|
39
39
|
"@pexip/utils": "16.13.0"
|
|
40
40
|
},
|