@stream-io/video-client 1.10.2 → 1.10.3
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 +7 -0
- package/dist/index.browser.es.js +9 -4
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +9 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +9 -4
- package/dist/index.es.js.map +1 -1
- package/dist/src/devices/CameraManager.d.ts +1 -0
- package/package.json +1 -1
- package/src/devices/CameraManager.ts +12 -2
- package/src/devices/__tests__/CameraManager.test.ts +7 -0
package/dist/index.es.js
CHANGED
|
@@ -3109,7 +3109,7 @@ const retryable = async (rpc, signal) => {
|
|
|
3109
3109
|
return result;
|
|
3110
3110
|
};
|
|
3111
3111
|
|
|
3112
|
-
const version = "1.10.
|
|
3112
|
+
const version = "1.10.3";
|
|
3113
3113
|
const [major, minor, patch] = version.split('.');
|
|
3114
3114
|
let sdkInfo = {
|
|
3115
3115
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -8776,13 +8776,16 @@ class CameraManager extends InputMediaDeviceManager {
|
|
|
8776
8776
|
height: 720,
|
|
8777
8777
|
};
|
|
8778
8778
|
}
|
|
8779
|
+
isDirectionSupportedByDevice() {
|
|
8780
|
+
return isReactNative() || isMobile();
|
|
8781
|
+
}
|
|
8779
8782
|
/**
|
|
8780
8783
|
* Select the camera direction.
|
|
8781
8784
|
*
|
|
8782
8785
|
* @param direction the direction of the camera to select.
|
|
8783
8786
|
*/
|
|
8784
8787
|
async selectDirection(direction) {
|
|
8785
|
-
if (
|
|
8788
|
+
if (this.isDirectionSupportedByDevice()) {
|
|
8786
8789
|
this.state.setDirection(direction);
|
|
8787
8790
|
// Providing both device id and direction doesn't work, so we deselect the device
|
|
8788
8791
|
this.state.setDevice(undefined);
|
|
@@ -8847,7 +8850,9 @@ class CameraManager extends InputMediaDeviceManager {
|
|
|
8847
8850
|
constraints.height = this.targetResolution.height;
|
|
8848
8851
|
// We can't set both device id and facing mode
|
|
8849
8852
|
// Device id has higher priority
|
|
8850
|
-
if (!constraints.deviceId &&
|
|
8853
|
+
if (!constraints.deviceId &&
|
|
8854
|
+
this.state.direction &&
|
|
8855
|
+
this.isDirectionSupportedByDevice()) {
|
|
8851
8856
|
constraints.facingMode =
|
|
8852
8857
|
this.state.direction === 'front' ? 'user' : 'environment';
|
|
8853
8858
|
}
|
|
@@ -12695,7 +12700,7 @@ class StreamClient {
|
|
|
12695
12700
|
});
|
|
12696
12701
|
};
|
|
12697
12702
|
this.getUserAgent = () => {
|
|
12698
|
-
const version = "1.10.
|
|
12703
|
+
const version = "1.10.3";
|
|
12699
12704
|
return (this.userAgent ||
|
|
12700
12705
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
12701
12706
|
};
|