@pexip/media-control 16.7.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 ADDED
@@ -0,0 +1,967 @@
1
+ # Changelog
2
+
3
+ ## 16.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [94b7f753]
8
+ - @pexip/utils@16.6.0
9
+
10
+ ## 16.7.0
11
+
12
+ ### Minor Changes
13
+
14
+ - 05ef9099: Remove some default constraints
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [456c06c6]
19
+ - @pexip/utils@16.5.0
20
+
21
+ ## 16.6.0
22
+
23
+ ### Minor Changes
24
+
25
+ - f8d4190238: Take portrait mode into account when comparing resolutions
26
+ - f8d4190238: Add facing mode utility functions
27
+ - f8d4190238: Add more utility functions
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies [3ba403f688]
32
+ - @pexip/utils@16.4.1
33
+
34
+ ## 16.5.0
35
+
36
+ ### Minor Changes
37
+
38
+ - 6225612: Remove @pexip/logger dependency
39
+
40
+ ### Patch Changes
41
+
42
+ - Updated dependencies [e6ef1f2]
43
+ - @pexip/utils@16.4.0
44
+
45
+ ## 16.4.0
46
+
47
+ ### Minor Changes
48
+
49
+ - 6496a9d: Extract device kind comparison
50
+
51
+ ## 16.3.1
52
+
53
+ ### Patch Changes
54
+
55
+ - Updated dependencies [4763e5b4]
56
+ - @pexip/utils@16.3.1
57
+
58
+ ## 16.3.0
59
+
60
+ ### Patch Changes
61
+
62
+ - @pexip/utils@16.3.0
63
+
64
+ ## 16.2.0
65
+
66
+ ### Patch Changes
67
+
68
+ - @pexip/utils@16.2.0
69
+
70
+ ## 16.1.0
71
+
72
+ ### Patch Changes
73
+
74
+ - @pexip/utils@16.1.0
75
+
76
+ ## 16.0.0
77
+
78
+ ### Patch Changes
79
+
80
+ - @pexip/utils@16.0.0
81
+
82
+ ## 15.0.0
83
+
84
+ ### Patch Changes
85
+
86
+ - @pexip/utils@15.0.0
87
+
88
+ ## 14.1.0
89
+
90
+ ### Patch Changes
91
+
92
+ - @pexip/utils@14.1.0
93
+
94
+ ## 14.0.0
95
+
96
+ ### Minor Changes
97
+
98
+ - c85b88f8: Add getFacingModeFromConstraintString
99
+
100
+ ### Patch Changes
101
+
102
+ - @pexip/utils@14.0.0
103
+
104
+ ## 13.2.0
105
+
106
+ ### Patch Changes
107
+
108
+ - @pexip/utils@13.2.0
109
+
110
+ ## 13.1.0
111
+
112
+ ### Patch Changes
113
+
114
+ - @pexip/utils@13.1.0
115
+
116
+ ## 13.0.0
117
+
118
+ ### Major Changes
119
+
120
+ - 3750d84b: Only build esm bundle via tsup\
121
+
122
+ ### Patch Changes
123
+
124
+ - @pexip/utils@13.0.0
125
+
126
+ ## 12.0.0
127
+
128
+ ### Patch Changes
129
+
130
+ - @pexip/utils@12.0.0
131
+
132
+ ## 11.0.0
133
+
134
+ ### Patch Changes
135
+
136
+ - @pexip/utils@11.0.0
137
+
138
+ ## 10.1.0
139
+
140
+ ### Patch Changes
141
+
142
+ - @pexip/utils@10.1.0
143
+
144
+ ## 10.0.0
145
+
146
+ ### Patch Changes
147
+
148
+ - @pexip/utils@10.0.0
149
+
150
+ ## 9.0.0
151
+
152
+ ### Minor Changes
153
+
154
+ - 5a852b05: No unnecessary reqeust on blocked devices
155
+
156
+ ### Patch Changes
157
+
158
+ - @pexip/utils@9.0.0
159
+
160
+ ## 8.0.0
161
+
162
+ ### Patch Changes
163
+
164
+ - @pexip/utils@8.0.0
165
+
166
+ ## 7.0.0
167
+
168
+ ### Minor Changes
169
+
170
+ - 5d824c12: No unnecessary gUM for irrelevant device change
171
+
172
+ ## '@pexip/media': minor
173
+
174
+ - No unnecessary gUM for irrelevant device change
175
+
176
+ closes https://gitlab.com/pexip/zoo/-/issues/3129
177
+
178
+ ## '@pexip/media-control': minor
179
+
180
+ - Add 2 new util functions
181
+ - hasRequestingDevice,
182
+ - shouldRequestDevice,
183
+
184
+ - efc7d2a8: Better media logging
185
+
186
+ ## @pexip/logger
187
+
188
+ - Add more AudioNode to log
189
+
190
+ ## @pexip/media
191
+
192
+ - Truncate unnecessary fields when logging with JSON
193
+
194
+ ## @pexip/media-control
195
+
196
+ - Put MediaDeviceInfoKind['settings'] fields into toJSON for logging
197
+
198
+ ## @pexip/media-processor
199
+
200
+ - Drop logger dependency and related usages
201
+
202
+ - dead15ae: Fix unplug and plug media fallback issue
203
+
204
+ closes https://gitlab.com/pexip/zoo/-/issues/2986
205
+
206
+ ## @pexip/media
207
+
208
+ - Use the correct media status after release
209
+
210
+ ## @pexip/media-control
211
+
212
+ - Ignore ended track when validating the current device and the new constraint
213
+
214
+ ### Patch Changes
215
+
216
+ - Updated dependencies [16854bc7]
217
+ - @pexip/utils@7.0.0
218
+
219
+ ## 6.0.0
220
+
221
+ ### Patch Changes
222
+
223
+ - @pexip/utils@6.0.0
224
+
225
+ ## 5.0.0
226
+
227
+ ### Minor Changes
228
+
229
+ - 9f68146d: # Presentation with audio.
230
+
231
+ Be able to share presentation with audio.
232
+
233
+ ## Changes on `media`
234
+
235
+ Introduce `audioMixingProcessor` to mix audio track with additional one.
236
+
237
+ ## Changes on `media-control`
238
+
239
+ Introduce `mixWithAdditionalMedia` constraint.
240
+
241
+ ## Changes on `media-components`
242
+
243
+ Pass a cleanup `fn` to `usePresentation` hook.
244
+
245
+ ## Changes on `media-processor`
246
+
247
+ Add `merger` node constructor.
248
+
249
+ ### Patch Changes
250
+
251
+ - Updated dependencies [2e36be80]
252
+ - @pexip/utils@5.0.0
253
+
254
+ ## 4.0.0
255
+
256
+ ### Minor Changes
257
+
258
+ - cf8bec29b6: # Use Streams API
259
+
260
+ ## Changes on `media-processor`
261
+
262
+ - Use Streams API for video processing, fallback to
263
+ requestVideoFrameCallback/setTimeout when the API is not available
264
+ - Turn off alpha when producing the final drawing on canvas
265
+ - closes https://gitlab.com/pexip/zoo/-/issues/2186
266
+ - Use desynchronized hint for canvas
267
+ - Fix edge issue when composing blur background
268
+ - Fix process `opened` state issue on async function
269
+
270
+ ### Commits
271
+
272
+ - fc398f4b38 perf(media-processor): use desynchronized hint
273
+ - ed2d95c653 feat(media-processor): use stream transform
274
+ - da53143a49 fix(media-processor): dom-webcodecs types
275
+ - e271047b0f feat(media-processor): VideoProcessor accept transformers
276
+ - eeb8992f97 feat(media-processor): add transformer creator
277
+ - 20d085aac2 feat(media-processor): add MediaStreamTrack generator & processor
278
+ - 096f1adc77 perf(media-processor): turn off alpha for none effect
279
+ - a1a282c34a refactor(media-processor): move canvas related into
280
+ canvasRenderer
281
+
282
+ ## Changes on `media`
283
+
284
+ - Use the latest APIs from `media-processor`
285
+ - Fix types overridden by `dom-webcodecs`
286
+
287
+ ### Commits
288
+
289
+ - 0156012aab fix(media): use streams API from media-processor
290
+ - e61ca85375 fix(media): type overrides
291
+
292
+ ## Changes on `media-control`
293
+
294
+ - Fix types overridden by `dom-webcodecs`
295
+
296
+ ### Commit
297
+
298
+ - 0a63010d20 fix(media-control): type overrides
299
+
300
+ ## Changes on Apps
301
+
302
+ - Use the latest APIs
303
+
304
+ ### Commits
305
+
306
+ - b7a768a350 feat(infinity-connect): turn on video processing for Safari
307
+ - d05dc48b8f fix(media-processor-demo): remove comments
308
+ - 6d58d0c987 fix(media-processor-demo): add missing await
309
+ - 4859029594 fix(infinity-connect): apply latest changes from media
310
+ - 3c30502ee7 fix(aquila): use latest changes from media
311
+ - 179359a95d fix(media-demo): update settings as well
312
+ - e3ac0cdd0e fix(media-demo): apply latest changes from media
313
+ - f251c75f16 feat(media-processor-demo): use createCanvasTransform
314
+
315
+ ## Others
316
+
317
+ - Add types/dom-webcodecs
318
+
319
+ ### Commit
320
+
321
+ - 2458690b46 build: add types/dom-webcodecs
322
+
323
+ ### Patch Changes
324
+
325
+ - @pexip/utils@4.0.0
326
+
327
+ ## 2.1.0
328
+
329
+ ### Minor Changes
330
+
331
+ - 0a054710b: Relax all input constraints
332
+
333
+ Before we only relax the constraints when they are an `exact` constraints,
334
+ after the change we relax all constraints when possible to be more
335
+ forgiveness.
336
+
337
+ - acedce8d8: Decouple resolution check from device check
338
+
339
+ ## '@pexip/media-control'
340
+
341
+ - Decouple resolution check from `isRequestedInputDevice` and add a new
342
+ function to verify the resolution `isRequestedResolution`
343
+
344
+ ## '@pexip/media'
345
+
346
+ - Use `isRequestedResolution` to check the resolution to decide if we should
347
+ request the media again
348
+
349
+ - b3cbb8a59: Fallback input device notification
350
+
351
+ ## '@pexip/aquila'
352
+
353
+ - Add `useFallbackDeviceNotifier` hook and use it in Preflight
354
+ - Log the global `Notifyer` whenever there is a new toast.
355
+ - Fix an unnecessary update of the selected inputs when media is set to
356
+ `undefined`
357
+
358
+ ## '@pexip/media'
359
+
360
+ - Extract the device info and put it to
361
+ `expectedVideoInput`/`expectedAudioInput` when we cannot find the device
362
+ from the current device list for completeness.
363
+ - Use `isStreamingRequestedDevices` instead of
364
+ `isStreamingRequestedDevicesBase` to have more info about the track
365
+
366
+ ## '@pexip/media-control'
367
+
368
+ - Add a new utility function, `extractDeviceFromConstraints`, to extract the
369
+ device info from the provided constraints
370
+ - Update `isStreamingRequestedDevices` to allow passing `undefined` stream
371
+ param.
372
+
373
+ - 57eb593c0: Be more forgiveness when comparing input devices
374
+
375
+ When checking against the requested input device with the constraints
376
+ provided, it is better to use the label to verify them to avoid stale
377
+ `deviceId` issue.
378
+
379
+ ## '@pexip/media'
380
+
381
+ - Should always use permission granted devices to do the comparison
382
+
383
+ ## '@pexip/media-control'
384
+
385
+ - Use device's label to compare device when possible
386
+
387
+ - 8e3e3b1f9: Refactor media package to follow the media constraint pattern
388
+
389
+ https://developer.mozilla.org/en-US/docs/Web/API/Media_Streams_API/Constraints
390
+
391
+ - Move and extend the media features based on MediaTrackConstraints by
392
+ interpreting the provided constraints
393
+ - Voice Activity Detection - `vad` of type `boolean`
394
+ - Audio Signal Detection - `asd` of type `boolean`
395
+ - Noise suppression - `denoise` (to avoid the conflict of the built-in
396
+ `noiseSupression`) of type `boolean`, `true` means using our own impl,
397
+ remember to disable the built-in `noiseSupression` as you don't want to
398
+ use them both
399
+ - Blur level - `blurLevel` of type `number`
400
+ - Erode param - `erode` of type `number`
401
+ - Video segmentation effects - `videoSegmentation` of type `none`, `blur`,
402
+ `overlay` or `remove` (`remove` will be added in another MR)
403
+ - Ad-hoc change of the features should be done via the `Media` object with the
404
+ new `applyConstraints` API
405
+ - `getUserMedia` is always getting a new media while applying the features
406
+ based on the constraints when there is change to the constraints
407
+
408
+ Example:
409
+
410
+ ```typescript
411
+ const constriants = {
412
+ audio: {
413
+ noiseSuppression: false, // Disable the built-in noise suppression
414
+ denoise: true, // Use our own impl of noise suppression
415
+ vad: true, // Use Voice Activity Detection
416
+ asd: true, // Use Audio Signal Detection to check if the microphone is malfunctioned
417
+ },
418
+ video: {
419
+ videoSegmentation: 'blur', // Use background blur
420
+ erode: 1,
421
+ blurLevel: 21,
422
+ },
423
+ };
424
+ ```
425
+
426
+ The new `MediaController` interface (removed feature-related props):
427
+
428
+ ```typescript
429
+ export interface MediaController {
430
+ /**
431
+ * Current Media if any
432
+ */
433
+ media: Media;
434
+ /**
435
+ * Current device list
436
+ */
437
+ devices: MediaDeviceInfoLike[];
438
+ /**
439
+ * Execute the media pipeline immediately with provided constraints
440
+ *
441
+ * @param constraints - @see MediaDeviceRequest
442
+ */
443
+ getUserMedia: (constraints: MediaDeviceRequest) => void;
444
+ /**
445
+ * Execute the media pipeline immediately with provided constraints. An
446
+ * explicit version of `getUserMedia` to make it possible to chain other
447
+ * async actions
448
+ *
449
+ * @param constraints - @see MediaDeviceRequest
450
+ */
451
+ getUserMediaAsync: (constraints: MediaDeviceRequest) => Promise<void>;
452
+ /**
453
+ * Cross-check PermissionState and available devices before requesting user
454
+ * media, the request will be skipped if there is no granted device.
455
+ */
456
+ tryAndGetUserMedia: (constraints: MediaDeviceRequest) => void;
457
+ }
458
+ ```
459
+
460
+ The new `Media` interface (added `applyConstraints`):
461
+
462
+ ```typescript
463
+ export interface Media {
464
+ /**
465
+ * The constraints used to request the media
466
+ */
467
+ constraints?: MediaDeviceRequest;
468
+ /**
469
+ * The devices used for the media
470
+ */
471
+ devices: MediaDeviceInfoLike[];
472
+ /**
473
+ * Media stream for the media
474
+ */
475
+ stream?: MediaStream;
476
+ /**
477
+ * The raw stream obtained from the `getUserMedia` API
478
+ */
479
+ rawStream?: MediaStream;
480
+ /**
481
+ * Audio input device is used for the audio track from the current stream
482
+ */
483
+ audioInput?: MediaDeviceInfoLike;
484
+ /**
485
+ * Video input device is used for the video track from the current stream
486
+ */
487
+ videoInput?: MediaDeviceInfoLike;
488
+ /**
489
+ * The audio input device which is expected to be used for the current
490
+ * stream based on the provided constraints
491
+ */
492
+ expectedAudioInput?: MediaDeviceInfoLike;
493
+ /**
494
+ * The video input device which is expected to be used for the current
495
+ * stream based on the provided constraints
496
+ */
497
+ expectedVideoInput?: MediaDeviceInfoLike;
498
+ /**
499
+ * The status of the media
500
+ */
501
+ status: UserMediaStatus;
502
+ /**
503
+ * Current mute state of audio track
504
+ * `undefined` means there is no such track from the stream
505
+ */
506
+ audioMuted: boolean | undefined;
507
+ /**
508
+ * Current mute state of video track
509
+ * `undefined` means there is no such track fromt the stream
510
+ */
511
+ videoMuted: boolean | undefined;
512
+ /**
513
+ * mute/unmute the audio track
514
+ */
515
+ muteAudio(mute: boolean): void;
516
+ /**
517
+ * mute/unmute the video track
518
+ */
519
+ muteVideo(mute: boolean): void;
520
+ /**
521
+ * Apply the constraints to the current media
522
+ */
523
+ applyConstraints(constraints: MediaDeviceRequest): Promise<void>;
524
+ /**
525
+ * Release the media resources, e.g. camera/microphone
526
+ */
527
+ release(): Promise<void>;
528
+ }
529
+ ```
530
+
531
+ - 048e384e7: Fix device selection misbehavior
532
+
533
+ ## fix(media-control): use delete operator to override constraints keys
534
+
535
+ - Use delete operator to override constraints keys instead of setting them as
536
+ `undefined` to avoid unintended key-value overriding
537
+
538
+ ## fix(aquila): avoid using deep property access with optional chaining
539
+
540
+ - Avoid using deep property access with optional chaining to workaround
541
+ unknown behavior of missing the optional chaining operator after
542
+ compilation.
543
+ - Improve the log
544
+
545
+ ### Patch Changes
546
+
547
+ - Updated dependencies [3b3883832]
548
+ - @pexip/utils@2.1.0
549
+
550
+ ## 2.0.0
551
+
552
+ ### Minor Changes
553
+
554
+ - 0430bbad2: ## '@pexip/media'
555
+
556
+ Add mute state and related events
557
+
558
+ - Add `audioMuted` and `videoMuted`
559
+ - Connect `MediaStreamTrack` native events to signals
560
+ - Add and connect `onStreamTrackEnabled` signal
561
+ - Refactor `buildMedia`
562
+
563
+ ## '@pexip/media-demo'
564
+
565
+ Add mute state and related logics
566
+
567
+ ## '@pexip/media-control'
568
+
569
+ Change `createStreamTrackEventSubscriptions` to accept track instead of
570
+ stream.
571
+
572
+ - cf2493ea9: Fix blocked device selection issues
573
+
574
+ ## @pexip/aquila
575
+
576
+ - Add i18n to `DeviceSelect` component
577
+ - Use `MissDeviceAlert` component only when there is denied device or no
578
+ device available for selection
579
+
580
+ ## @pexip/components
581
+
582
+ - Add `errorTextId` prop to `Select` component for testing
583
+
584
+ ## @pexip/media
585
+
586
+ - Add more props to Media
587
+
588
+ Add `status`, `expectedAudioInput`, `expectedVideoInput`, `constraints` to
589
+ `Media`
590
+
591
+ ## @pexip/media-control
592
+
593
+ - Add `findDeviceFromDeviceConstraints` util
594
+
595
+ Find device from the device list with provided constraints, i.e.
596
+ `InputDeviceConstraint` -> `MediaDeviceInfoLike | true | undefined`. It
597
+ returns `true` meaning that it can be any devices, `undefined` means device
598
+ not found, otherwise, the matched device will be returned
599
+
600
+ - 07caf0c47: Fix behavior signal `onDeviceChanged` issue
601
+
602
+ ## General
603
+
604
+ The behavior signal of `onDevicesChanged` can
605
+ [cause problem](https://gitlab.com/pexip/zoo/-/issues/1780) when there is no
606
+ device at all.
607
+
608
+ Indeed, there is no need to use a behaving signal, a generic one is good
609
+ enough for our usecase of `onDevicesChanged`. What we need to do before we
610
+ initiate the initial `getUserMedia` is to cross-check with the
611
+ `PermissionState` and the `devices`, and thus `tryAndGetUserMedia` API is
612
+ introduced to do the job.
613
+
614
+ ## Changes
615
+
616
+ ### fix(aquila): use preflight page to trigger media request
617
+
618
+ - Change `onDevicesChanged` to a `generic` signal, instead of `behavior`
619
+ - Use Preflight to trigger media request
620
+
621
+ closes https://gitlab.com/pexip/zoo/-/issues/1780
622
+
623
+ ### feat(aquila): add useGetUserMedia hook
624
+
625
+ - Add `useGetUserMedia` hook to trigger permission validation and initiate
626
+ media request
627
+
628
+ ### feat(media): new tryAndGetUserMedia API
629
+
630
+ - Add `tryAndGetUserMedia`
631
+ - Check if there is any actual changes of devices
632
+
633
+ ### refactor(media-control): for re-usability
634
+
635
+ - Refactor `createTrackDevicesChanges` to allow passing initial state
636
+
637
+ - 31c667453: Move findDevice utility function to utils file to avoid circular
638
+ import
639
+ - 029f5fb8a: Fix unique devices function
640
+ - 5ad1a1e92: Remove `skipFilter` and `shouldRetainAudio`
641
+
642
+ - Remove `skipFilter` parameter for `getDevices`
643
+
644
+ The decision should be made at application level
645
+
646
+ - Remove `shouldRetainAudio` option for `MediaDeviceRequest`
647
+
648
+ Side effect is always bad
649
+
650
+ - c1bf7f05c: Remove duplicated devices before checking changes
651
+
652
+ - Extract the logic to track device changes, and add unit test cases
653
+ - Remove duplicated devices when tracking changes from `devicechange` event
654
+ - Use `MediaDeviceInfoLike` instead `MediaDeviceInfo` for related events
655
+
656
+ A bug from Firefox (v88.0.1) 64-bit or above, there is chance that the devices
657
+ we get from the API `enumerateDevices` are not unique with particular devices,
658
+ e.g. Logitech BRIO. Since we are relying on the uniqueness for tracking the
659
+ changes of device to fire `devices:found` or `devices:lost` events, this
660
+ causes all the operations relying on these events, e.g. false positive
661
+ `devices:found` event.
662
+
663
+ See https://gitlab.com/pexip/zoo/-/issues/1743
664
+
665
+ - 72641f2cd: Fix `isConstraintSet`
666
+
667
+ - The type guard for checking if the provided value is a constraint yields a
668
+ false positive
669
+
670
+ Fix signal subscription issue
671
+
672
+ - Under a certain situation, the detach function will be called multiple times
673
+
674
+ ### Patch Changes
675
+
676
+ - 281f3afbe: Support `MediaStreamConstraints`, same as
677
+ `MediaDevices.getUserMedia()`
678
+
679
+ With this MR, the API for `getUserMedia` has been simplified and now is
680
+ following the design of `MediaDevices.getUserMedia()` API with an extension of
681
+ an extra key, `device`, to `MediaStreamConstraints` and also retain the
682
+ capability of using `MediaDeviceInfo`/`MediaDeviceInfo[]` as constraints.
683
+
684
+ EXAMPLES:
685
+
686
+ ```typescript
687
+ import {getUserMedia} from '@pexip/media-control';
688
+ const audioInput = {
689
+ deviceId: 'a-id-1',
690
+ kind: 'audioinput',
691
+ label: 'fake-audio',
692
+ };
693
+ const videoInput = {
694
+ deviceId: 'v-id-2',
695
+ kind: 'videoinput',
696
+ label: 'fake-video',
697
+ };
698
+
699
+ // To get a stream with specific devices when available
700
+ const stream = await getUserMedia({audio: audioInput, video: videoInput});
701
+ // The above constraints provided will be converted as
702
+ // `{audio: {deviceId: {ideal: ['a-id-1']}}, video: {deviceId: {ideal: ['v-id-2']}}}`
703
+ // to pass to MediaDevices.getUserMedia
704
+
705
+ // To get a stream with exact devices
706
+ const stream = await getUserMedia({
707
+ audio: {device: {exact: audioInput}},
708
+ video: {device: {exact: videoInput}},
709
+ });
710
+ // The above constraints provided will be converted as
711
+ // `{audio: {deviceId: {exact: ['a-id-1']}}, video: {deviceId: {exact: ['v-id-2']}}}`
712
+ // to pass to MediaDevices.getUserMedia
713
+
714
+ // To get a stream with front facing camera, same as MediaDevices.getUserMedia
715
+ const stream = await getUserMedia({
716
+ audio: true,
717
+ video: {facingMode: 'user'},
718
+ });
719
+ ```
720
+
721
+ BREAKING CHANGES:
722
+
723
+ - Rename/remove some keys of `MediaStreamRequest`
724
+
725
+ - `audioInput` and `videoInput` are renamed to `audio` and `video`
726
+ respectively to follow the spec.
727
+ - `exactAudioInput` and `exactVideoInput` are removed. In order to request
728
+ exact devices, it is now required to follow the pattern of
729
+ `MediaStreamConstraints` with `device` key. Thus there is **NO default for
730
+ requesting exact devices**.
731
+ - `NotFoundError` is tuned to be more specific when possible to verify with
732
+ `getDevices` and the provided constraints
733
+
734
+ If we can derive the `NotFoundError` from `devices` and `constraints` We
735
+ throw `AudioAndVideoDeviceNotFoundError`, `AudioInputDeviceNotFoundError`
736
+ or `VideoInputDeviceNotFoundError` else, we throw the original
737
+ `NotFoundError`
738
+
739
+ closes #1428
740
+
741
+ - 649e27941: - Support constraints pattern for `isRequestedInput` utility
742
+
743
+ - Rename `hasRequestedStream` to `isStreamingRequestedDevices`, and it is now
744
+ return an object with keys `audio` and `video` to show exact result.
745
+
746
+ E.g. `{audio: true, video: true}` means that it is streaming the exact
747
+ devices as requested
748
+
749
+ - 6ddadd2e5: Support facingMode stream track and constraint comparison
750
+ - 839436f8d: ## @pexip/media
751
+
752
+ - Only use `error` level when on the following errors when requesting media,
753
+ otherwise, `warn` level
754
+
755
+ - `TypeError`
756
+ - `NotSupportedError`
757
+ - `UnknownError`
758
+ - `OverconstrainedError` (when it is not `exact` device request)
759
+
760
+ ## @pexip/media-control
761
+
762
+ - Add `isExactDeviceConstraint` utility to check if the provided constraint is
763
+ an exact constraint
764
+
765
+ ## 1.4.0
766
+
767
+ ### Minor Changes
768
+
769
+ - 5c9120efd: Track changes using changesets
770
+
771
+ ## [0.14.3] - 2021-03-22
772
+
773
+ ### Fixed
774
+
775
+ - Entry points issue
776
+
777
+ ## [0.14.2] - 2021-03-19
778
+
779
+ ### Fixed
780
+
781
+ - Fix lsp error about "downlevelIteration"
782
+
783
+ ### Changed
784
+
785
+ - Use tslib to avoid duplicate declarations to use together with
786
+ "downlevelIteration"
787
+ - Rename test file to use the same pattern as aquila, aka xxxx.test.ts
788
+ - Remove Fake camera related codes
789
+
790
+ Fake camera is not used in both aquila and sleipnir
791
+
792
+ ## [0.14.1] - 2021-03-11
793
+
794
+ ### Fixed
795
+
796
+ - Accessing `mediaDevices` when it is disabled/unavailable
797
+ - Consistent `getDevices`
798
+ - Add more logs
799
+
800
+ ## [0.14.0] - 2021-03-11
801
+
802
+ ### Changed
803
+
804
+ - Remove api-extractor and related
805
+
806
+ ## [0.13.2] - 2021-03-02
807
+
808
+ ### Fixed
809
+
810
+ - make sure we always get initial `enumerateDevices` [#3679]
811
+ - fix `setInterval` fallback for `ondevicechange` [#3679]
812
+
813
+ ## [0.13.1] - 2021-02-26
814
+
815
+ ### Added
816
+
817
+ - debug logs [#3659]
818
+
819
+ ## [0.13.0] - 2021-02-25
820
+
821
+ ### Added
822
+
823
+ - `setLogger` function to set the global logger for this module
824
+
825
+ ## [0.12.3] - 2021-02-16
826
+
827
+ ### Changed
828
+
829
+ - Remove @babel/core, tslib and @pexip/logger dependencies
830
+
831
+ Note: @babel/core was added by #1916 to resolve the unmet peer deps warning
832
+ but it is only needed when using the Node API[1]. Thus it is considered as
833
+ unnecessary for our situation.
834
+
835
+ [1]: https://babeljs.io/docs/en/babel-plugin-transform-runtime#via-node-api
836
+
837
+ ## [0.12.2] - 2021-02-16
838
+
839
+ ### Fixed
840
+
841
+ - Compare the request and the track directly for `hasRequestedStream`, to fix
842
+ #3523
843
+
844
+ Since the device list from `enumerateDevices` from Firefox Nightly always
845
+ return a set of fake devices. We should not rely on looking up the device info
846
+ from the `enumerateDevices`, and should comparing them directly.
847
+
848
+ ## [0.12.1] - 2021-02-11
849
+
850
+ ### Fixed
851
+
852
+ - DevicesUnauthorized should comes with authorized devices when available for
853
+ completeness
854
+
855
+ ## [0.12.0] - 2021-02-10
856
+
857
+ ### Changed
858
+
859
+ - Emit DevicesUnauthorized/NoInputDevices event
860
+ - DevicesFound/DevicesLost comes with the latest device list, `currentDevices`
861
+
862
+ ### Added
863
+
864
+ - Add utils to check media request against current MediaStream
865
+ hasRequestedStream
866
+
867
+ ## [0.11.0] - 2021-02-09
868
+
869
+ ### Changed
870
+
871
+ - BREAKING CHANGE: Consistent device change event
872
+
873
+ DevicesChanged/DevicesFound/DevicesLost events are no longer emit modified
874
+ devices. It emits what it gets from the getDevices, aka
875
+ navigator.mediaDevices.enumerateDevices(), to allow the interpretation of
876
+ media device permission status.
877
+
878
+ It also make the DevicesFound/DevicesLost events emitted consistently
879
+
880
+ ## [0.10.2] - 2021-01-29
881
+
882
+ ### Fixed
883
+
884
+ - Fix `findDevice` fallback issue, see
885
+ [#3178](https://github.com/pexip/aquila-research/issues/3178)
886
+
887
+ ```typescript
888
+ const d1 = {deviceId: '01', label: 'A'};
889
+ const d2 = {deviceId: '02', label: 'B'};
890
+ const d3 = {deviceId: '03', label: 'A'};
891
+ const d4 = {deviceId: '04', label: 'B'};
892
+ const d5 = {deviceId: '05', label: 'A'};
893
+ const d6 = {deviceId: '06', label: 'B'};
894
+ const devices = [d1, d2, d3, d4];
895
+
896
+ // With useFallback flag is `true`, the default
897
+ findDevice(d1)(devices); // d1
898
+ findDevice(d2)(devices); // d2
899
+ findDevice(d3)(devices); // d3
900
+ findDevice(d4)(devices); // d4
901
+ findDevice(d5)(devices); // d1
902
+ findDevice(d6)(devices); // d2
903
+
904
+ // With useFallback flag is `false`
905
+ findDevice(d1, false)(devices); // d1
906
+ findDevice(d2, false)(devices); // d2
907
+ findDevice(d3, false)(devices); // d3
908
+ findDevice(d4, false)(devices); // d4
909
+ findDevice(d5, false)(devices); // undefined
910
+ findDevice(d6, false)(devices); // undefined
911
+ ```
912
+
913
+ ## [0.10.1] - 2020-12-10
914
+
915
+ ### Fixed
916
+
917
+ - Fix `devicechange` in Safari
918
+
919
+ ## [0.10.0] - 2020-11-23
920
+
921
+ ### Added
922
+
923
+ - added new helper methods `findCurrentVideoInputDeviceIdFromStream`,
924
+ `findDeviceWithDeviceId`, `findDevicesByKind`, `findAudioInputDevices`,
925
+ `findVideoInputDevices`, `findAudioOutputDevices`, `stopMediaStream`,
926
+ `hasAudioOrVideoInputs`, `hasAudioInputs`, `hasVideoInputs`.
927
+
928
+ ### Changed
929
+
930
+ - rename `isAudioOrVideoInput` to `hasAudioOrVideoInputs`
931
+
932
+ ## [0.9.0] - 2020-11-17
933
+
934
+ ### Changed
935
+
936
+ - don't filter out default devices
937
+
938
+ ## [0.8.0] - 2020-10-28
939
+
940
+ ### Added
941
+
942
+ - `areTracksEnabled` - helper that checks if all the tracks in media stream are
943
+ enabled [#1973](https://github.com/pexip/aquila-research/pull/1973)
944
+
945
+ ## [0.7.0] - 2020-10-28
946
+
947
+ ### Added
948
+
949
+ - `muteStreamTrack` - Set `MediaStreamTrack['enabled']` according to `mute`
950
+ parameter for the provided `stream`
951
+
952
+ ## [0.6.0] - 2020-10-23
953
+
954
+ ### Added
955
+
956
+ - `compareMediaDeviceToMediaTrack` - compares track and MediadeviceInfo
957
+ `findMediaInputFromMediaStreamTrack` - get media input info from track
958
+ `findMediaInputFromStream` - get media input info from MediaStram
959
+ `findPermissionGrantedDevices` - devices with labels
960
+ `findCurrentAudioOutputId` - always return correct sinkId
961
+ `isAudioOrVideoInput` - check if audioinput or videoinput devices in the list
962
+ [#1947](https://github.com/pexip/aquila-research/pull/1947)
963
+
964
+ ### Removed
965
+
966
+ - **BREAKING**: Remove `findDeviceFromStreamTrack`
967
+ [#1947](https://github.com/pexip/aquila-research/pull/1947)