@4players/odin-common 2.6.0 → 2.8.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.
@@ -4,6 +4,11 @@ exports.Backend = exports.MinDBFS = void 0;
4
4
  exports.MinDBFS = -758.596;
5
5
  var Backend;
6
6
  (function (Backend) {
7
+ let Transport;
8
+ (function (Transport) {
9
+ Transport["H3"] = "h3";
10
+ Transport["WebRTC"] = "webrtc";
11
+ })(Transport = Backend.Transport || (Backend.Transport = {}));
7
12
  let PeerCipherStatus;
8
13
  (function (PeerCipherStatus) {
9
14
  PeerCipherStatus[PeerCipherStatus["InvalidPassword"] = -1] = "InvalidPassword";
@@ -1,6 +1,11 @@
1
1
  export const MinDBFS = -758.596;
2
2
  export var Backend;
3
3
  (function (Backend) {
4
+ let Transport;
5
+ (function (Transport) {
6
+ Transport["H3"] = "h3";
7
+ Transport["WebRTC"] = "webrtc";
8
+ })(Transport = Backend.Transport || (Backend.Transport = {}));
4
9
  let PeerCipherStatus;
5
10
  (function (PeerCipherStatus) {
6
11
  PeerCipherStatus[PeerCipherStatus["InvalidPassword"] = -1] = "InvalidPassword";
@@ -3,10 +3,15 @@ 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 = '2';
6
+ type Version = '3';
7
+ enum Transport {
8
+ H3 = "h3",
9
+ WebRTC = "webrtc"
10
+ }
7
11
  interface Plugin {
8
12
  readonly version: Version;
9
13
  readonly playbackVolume: Volume;
14
+ readonly supportedTransports: (Transport.WebRTC | Transport.H3)[];
10
15
  joinRoom(parameters: JoinRoomParameters): Room;
11
16
  createAudioPlayback(parameters: CreateAudioPlaybackParameters): Promise<AudioPlayback>;
12
17
  createAudioCapture(parameters: CreateAudioCaptureParameters): Promise<AudioCapture>;
@@ -38,6 +43,7 @@ export declare namespace Backend {
38
43
  readonly position?: [number, number, number];
39
44
  readonly cipher?: SetupCipherSettings;
40
45
  readonly onEvent: OnEvent;
46
+ readonly transport?: Transport;
41
47
  }
42
48
  interface Room {
43
49
  readonly token: string;
@@ -46,8 +52,6 @@ export declare namespace Backend {
46
52
  link(media: Media): Promise<void>;
47
53
  unlink(media: Media): void;
48
54
  close(): void;
49
- configureCipher(settings: CipherSettings): void;
50
- getPeerCipherStatus(peerId: number): PeerCipherStatus;
51
55
  }
52
56
  interface Media {
53
57
  readonly customType?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@4players/odin-common",
3
- "version": "2.6.0",
3
+ "version": "2.8.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",