@stream-io/video-client 0.6.3 → 0.6.4
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 +14 -10
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +14 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +14 -10
- package/dist/index.es.js.map +1 -1
- package/dist/src/StreamVideoClient.d.ts +1 -1
- package/dist/src/devices/InputMediaDeviceManager.d.ts +1 -1
- package/dist/src/devices/SpeakerManager.d.ts +4 -3
- package/package.json +1 -1
- package/src/StreamVideoClient.ts +1 -1
- package/src/devices/InputMediaDeviceManager.ts +4 -2
- package/src/devices/SpeakerManager.ts +18 -6
|
@@ -72,7 +72,7 @@ export declare class StreamVideoClient {
|
|
|
72
72
|
* Creates a new call.
|
|
73
73
|
*
|
|
74
74
|
* @param type the type of the call.
|
|
75
|
-
* @param id the id of the call
|
|
75
|
+
* @param id the id of the call.
|
|
76
76
|
*/
|
|
77
77
|
call: (type: string, id: string) => Call;
|
|
78
78
|
/**
|
|
@@ -58,7 +58,7 @@ export declare abstract class InputMediaDeviceManager<T extends InputMediaDevice
|
|
|
58
58
|
/**
|
|
59
59
|
* Selects a device.
|
|
60
60
|
*
|
|
61
|
-
* Note:
|
|
61
|
+
* Note: This method is not supported in React Native
|
|
62
62
|
* @param deviceId the device id to select.
|
|
63
63
|
*/
|
|
64
64
|
select(deviceId: string | undefined): Promise<void>;
|
|
@@ -9,6 +9,7 @@ export declare class SpeakerManager {
|
|
|
9
9
|
* Lists the available audio output devices
|
|
10
10
|
*
|
|
11
11
|
* Note: It prompts the user for a permission to use devices (if not already granted)
|
|
12
|
+
* Note: This method is not supported in React Native
|
|
12
13
|
*
|
|
13
14
|
* @returns an Observable that will be updated if a device is connected or disconnected
|
|
14
15
|
*/
|
|
@@ -16,7 +17,7 @@ export declare class SpeakerManager {
|
|
|
16
17
|
/**
|
|
17
18
|
* Select a device.
|
|
18
19
|
*
|
|
19
|
-
* Note:
|
|
20
|
+
* Note: This method is not supported in React Native
|
|
20
21
|
*
|
|
21
22
|
* @param deviceId empty string means the system default
|
|
22
23
|
*/
|
|
@@ -26,13 +27,13 @@ export declare class SpeakerManager {
|
|
|
26
27
|
* Set the volume of the audio elements
|
|
27
28
|
* @param volume a number between 0 and 1.
|
|
28
29
|
*
|
|
29
|
-
* Note:
|
|
30
|
+
* Note: This method is not supported in React Native
|
|
30
31
|
*/
|
|
31
32
|
setVolume(volume: number): void;
|
|
32
33
|
/**
|
|
33
34
|
* Set the volume of a participant.
|
|
34
35
|
*
|
|
35
|
-
* Note:
|
|
36
|
+
* Note: This method is not supported in React Native.
|
|
36
37
|
*
|
|
37
38
|
* @param sessionId the participant's session id.
|
|
38
39
|
* @param volume a number between 0 and 1. Set it to `undefined` to use the default volume.
|
package/package.json
CHANGED
package/src/StreamVideoClient.ts
CHANGED
|
@@ -310,7 +310,7 @@ export class StreamVideoClient {
|
|
|
310
310
|
* Creates a new call.
|
|
311
311
|
*
|
|
312
312
|
* @param type the type of the call.
|
|
313
|
-
* @param id the id of the call
|
|
313
|
+
* @param id the id of the call.
|
|
314
314
|
*/
|
|
315
315
|
call = (type: string, id: string) => {
|
|
316
316
|
return new Call({
|
|
@@ -125,12 +125,14 @@ export abstract class InputMediaDeviceManager<
|
|
|
125
125
|
/**
|
|
126
126
|
* Selects a device.
|
|
127
127
|
*
|
|
128
|
-
* Note:
|
|
128
|
+
* Note: This method is not supported in React Native
|
|
129
129
|
* @param deviceId the device id to select.
|
|
130
130
|
*/
|
|
131
131
|
async select(deviceId: string | undefined) {
|
|
132
132
|
if (isReactNative()) {
|
|
133
|
-
throw new Error(
|
|
133
|
+
throw new Error(
|
|
134
|
+
'This method is not supported in React Native. Please visit https://getstream.io/video/docs/reactnative/core/camera-and-microphone/#speaker-management for reference.',
|
|
135
|
+
);
|
|
134
136
|
}
|
|
135
137
|
if (deviceId === this.state.selectedDevice) {
|
|
136
138
|
return;
|
|
@@ -34,23 +34,31 @@ export class SpeakerManager {
|
|
|
34
34
|
* Lists the available audio output devices
|
|
35
35
|
*
|
|
36
36
|
* Note: It prompts the user for a permission to use devices (if not already granted)
|
|
37
|
+
* Note: This method is not supported in React Native
|
|
37
38
|
*
|
|
38
39
|
* @returns an Observable that will be updated if a device is connected or disconnected
|
|
39
40
|
*/
|
|
40
41
|
listDevices() {
|
|
42
|
+
if (isReactNative()) {
|
|
43
|
+
throw new Error(
|
|
44
|
+
'This feature is not supported in React Native. Please visit https://getstream.io/video/docs/reactnative/core/camera-and-microphone/#speaker-management for more details',
|
|
45
|
+
);
|
|
46
|
+
}
|
|
41
47
|
return getAudioOutputDevices();
|
|
42
48
|
}
|
|
43
49
|
|
|
44
50
|
/**
|
|
45
51
|
* Select a device.
|
|
46
52
|
*
|
|
47
|
-
* Note:
|
|
53
|
+
* Note: This method is not supported in React Native
|
|
48
54
|
*
|
|
49
55
|
* @param deviceId empty string means the system default
|
|
50
56
|
*/
|
|
51
57
|
select(deviceId: string) {
|
|
52
58
|
if (isReactNative()) {
|
|
53
|
-
throw new Error(
|
|
59
|
+
throw new Error(
|
|
60
|
+
'This feature is not supported in React Native. Please visit https://getstream.io/video/docs/reactnative/core/camera-and-microphone/#speaker-management for more details',
|
|
61
|
+
);
|
|
54
62
|
}
|
|
55
63
|
this.state.setDevice(deviceId);
|
|
56
64
|
}
|
|
@@ -63,11 +71,13 @@ export class SpeakerManager {
|
|
|
63
71
|
* Set the volume of the audio elements
|
|
64
72
|
* @param volume a number between 0 and 1.
|
|
65
73
|
*
|
|
66
|
-
* Note:
|
|
74
|
+
* Note: This method is not supported in React Native
|
|
67
75
|
*/
|
|
68
76
|
setVolume(volume: number) {
|
|
69
77
|
if (isReactNative()) {
|
|
70
|
-
throw new Error(
|
|
78
|
+
throw new Error(
|
|
79
|
+
'This feature is not supported in React Native. Please visit https://getstream.io/video/docs/reactnative/core/camera-and-microphone/#speaker-management for more details',
|
|
80
|
+
);
|
|
71
81
|
}
|
|
72
82
|
if (volume && (volume < 0 || volume > 1)) {
|
|
73
83
|
throw new Error('Volume must be between 0 and 1');
|
|
@@ -78,14 +88,16 @@ export class SpeakerManager {
|
|
|
78
88
|
/**
|
|
79
89
|
* Set the volume of a participant.
|
|
80
90
|
*
|
|
81
|
-
* Note:
|
|
91
|
+
* Note: This method is not supported in React Native.
|
|
82
92
|
*
|
|
83
93
|
* @param sessionId the participant's session id.
|
|
84
94
|
* @param volume a number between 0 and 1. Set it to `undefined` to use the default volume.
|
|
85
95
|
*/
|
|
86
96
|
setParticipantVolume(sessionId: string, volume: number | undefined) {
|
|
87
97
|
if (isReactNative()) {
|
|
88
|
-
throw new Error(
|
|
98
|
+
throw new Error(
|
|
99
|
+
'This feature is not supported in React Native. Please visit https://getstream.io/video/docs/reactnative/core/camera-and-microphone/#speaker-management for more details',
|
|
100
|
+
);
|
|
89
101
|
}
|
|
90
102
|
if (volume && (volume < 0 || volume > 1)) {
|
|
91
103
|
throw new Error('Volume must be between 0 and 1, or undefined');
|