@4players/odin-common 2.4.12 → 2.5.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.
@@ -1,12 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Backend = exports.MinDBFS = void 0;
3
+ exports.MinDBFS = void 0;
4
4
  exports.MinDBFS = -758.596;
5
- var Backend;
6
- (function (Backend) {
7
- let Transport;
8
- (function (Transport) {
9
- Transport["H3"] = "h3";
10
- Transport["WebRTC"] = "webrtc";
11
- })(Transport = Backend.Transport || (Backend.Transport = {}));
12
- })(Backend || (exports.Backend = Backend = {}));
@@ -1,9 +1 @@
1
1
  export const MinDBFS = -758.596;
2
- export var Backend;
3
- (function (Backend) {
4
- let Transport;
5
- (function (Transport) {
6
- Transport["H3"] = "h3";
7
- Transport["WebRTC"] = "webrtc";
8
- })(Transport = Backend.Transport || (Backend.Transport = {}));
9
- })(Backend || (Backend = {}));
@@ -3,7 +3,7 @@ export declare namespace Backend {
3
3
  type UID = string;
4
4
  type OnStatusChanged = (status: 'started' | 'stopped') => void;
5
5
  type OnEvent = (method: string, properties: unknown) => void;
6
- type Version = '1';
6
+ type Version = '2';
7
7
  interface Plugin {
8
8
  readonly version: Version;
9
9
  readonly playbackVolume: Volume;
@@ -30,10 +30,6 @@ export declare namespace Backend {
30
30
  isSilent: boolean;
31
31
  rmsDBFS: number;
32
32
  }
33
- enum Transport {
34
- H3 = "h3",
35
- WebRTC = "webrtc"
36
- }
37
33
  interface JoinRoomParameters {
38
34
  readonly gateway: string | undefined;
39
35
  readonly token: string;
@@ -42,7 +38,6 @@ export declare namespace Backend {
42
38
  readonly position?: [number, number, number];
43
39
  readonly cipher?: Cipher;
44
40
  readonly onEvent: OnEvent;
45
- readonly transport?: Transport;
46
41
  }
47
42
  interface Room {
48
43
  readonly token: string;
@@ -58,7 +53,7 @@ export declare namespace Backend {
58
53
  interface AudioMedia extends Media {
59
54
  readonly volume: Volume;
60
55
  readonly activity: Activity;
61
- setVolume(value: Volume): void;
56
+ setVolume(value: Volume): Promise<void>;
62
57
  }
63
58
  interface CreateAudioPlaybackParameters {
64
59
  readonly uid: UID;
@@ -81,8 +76,8 @@ export declare namespace Backend {
81
76
  readonly vad?: VadConfig;
82
77
  readonly apm?: ApmConfig;
83
78
  setVad(config: VadConfig): void;
84
- setApm(config: ApmConfig): void;
85
- setDevice(device: DeviceParameters): void;
79
+ setApm(config: ApmConfig): Promise<void>;
80
+ setDevice(device: DeviceParameters): Promise<void>;
86
81
  }
87
82
  interface VideoCapture extends Media {
88
83
  mediaStream?: MediaStream;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@4players/odin-common",
3
- "version": "2.4.12",
3
+ "version": "2.5.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",