@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.
@@ -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, if not provided a unique random value is used
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: this method is not supported in React Native
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: this method is not supported in React Native
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: this method is not supported in React Native
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: this method is not supported in React Native.
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-client",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
@@ -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, if not provided a unique random value is used
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: this method is not supported in React Native
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('This method is not supported in React Native');
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: this method is not supported in React Native
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('This feature is not supported in React Native');
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: this method is not supported in React Native
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('This feature is not supported in React Native');
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: this method is not supported in React Native.
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('This feature is not supported in React Native');
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');