@4players/odin-common 3.0.0 → 3.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.
@@ -10,7 +10,7 @@ export declare namespace Backend {
10
10
  }
11
11
  interface Plugin {
12
12
  readonly version: Version;
13
- readonly playbackVolume: Volume;
13
+ readonly playbackVolume: PlaybackVolume;
14
14
  readonly supportedTransports: (Transport.WebRTC | Transport.H3)[];
15
15
  joinRoom(parameters: JoinRoomParameters): Room;
16
16
  createAudioPlayback(parameters: CreateAudioPlaybackParameters): Promise<AudioPlayback>;
@@ -18,7 +18,7 @@ export declare namespace Backend {
18
18
  createVideoCapture(ms: MediaStream, options?: VideoInputOptions): Promise<VideoCapture>;
19
19
  createVideoPlayback(parameters: CreateVideoPlaybackParameters): Promise<VideoPlayback>;
20
20
  enumerateDevices(): Promise<Array<Device>>;
21
- setOutputVolume(volume: Volume): void;
21
+ setOutputVolume(volume: PlaybackVolume): void;
22
22
  setOutputDevice(device: DeviceParameters): Promise<void>;
23
23
  close(): void;
24
24
  }
@@ -77,13 +77,13 @@ export declare namespace Backend {
77
77
  close(): void;
78
78
  }
79
79
  interface AudioMedia extends Media {
80
- readonly volume: Volume;
80
+ readonly volume: PlaybackVolume | CaptureVolume;
81
81
  readonly activity: Activity;
82
- setVolume(value: Volume): Promise<void>;
82
+ setVolume(value: PlaybackVolume | CaptureVolume): Promise<void>;
83
83
  }
84
84
  interface CreateAudioPlaybackParameters {
85
85
  readonly uid: UID;
86
- readonly volume?: Volume;
86
+ readonly volume?: PlaybackVolume;
87
87
  readonly customType?: string;
88
88
  }
89
89
  interface CreateVideoPlaybackParameters {
@@ -95,7 +95,7 @@ export declare namespace Backend {
95
95
  jitterStats: JitterStats;
96
96
  }
97
97
  interface CreateAudioCaptureParameters extends Partial<DeviceParameters> {
98
- readonly volume?: Volume;
98
+ readonly volume?: CaptureVolume;
99
99
  readonly vad?: VadConfig;
100
100
  readonly apm?: ApmConfig;
101
101
  }
@@ -114,7 +114,8 @@ export declare namespace Backend {
114
114
  readonly mediaStream?: MediaStream;
115
115
  readonly uid: UID;
116
116
  }
117
- type Volume = 'muted' | [number, number];
117
+ type PlaybackVolume = [number, number];
118
+ type CaptureVolume = 'muted' | number;
118
119
  interface VadConfig {
119
120
  voiceActivity?: SensitivityRange;
120
121
  volumeGate?: SensitivityRange;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@4players/odin-common",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "A collection of commonly used type definitions and utility functions across ODIN web projects",
5
5
  "author": "Josho Bleicker <josho.bleicker@4players.io> (https://www.4players.io)",
6
6
  "homepage": "https://www.4players.io",