@4players/odin-common 2.4.10 → 2.4.12

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,4 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MinDBFS = void 0;
3
+ exports.Backend = 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 = {}));
@@ -66,8 +66,10 @@ class Logger {
66
66
  }
67
67
  }
68
68
  _filterByTag(tags) {
69
- for (const tag of tags) {
70
- if (this.filters.tags.includes(tag)) {
69
+ if (this.filters.tags.includes('All'))
70
+ return true;
71
+ for (const filterTags of this.filters.tags) {
72
+ if (tags.includes(filterTags)) {
71
73
  return true;
72
74
  }
73
75
  }
@@ -1 +1,9 @@
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 = {}));
@@ -61,8 +61,10 @@ export class Logger {
61
61
  }
62
62
  }
63
63
  _filterByTag(tags) {
64
- for (const tag of tags) {
65
- if (this.filters.tags.includes(tag)) {
64
+ if (this.filters.tags.includes('All'))
65
+ return true;
66
+ for (const filterTags of this.filters.tags) {
67
+ if (tags.includes(filterTags)) {
66
68
  return true;
67
69
  }
68
70
  }
@@ -30,6 +30,10 @@ export declare namespace Backend {
30
30
  isSilent: boolean;
31
31
  rmsDBFS: number;
32
32
  }
33
+ enum Transport {
34
+ H3 = "h3",
35
+ WebRTC = "webrtc"
36
+ }
33
37
  interface JoinRoomParameters {
34
38
  readonly gateway: string | undefined;
35
39
  readonly token: string;
@@ -38,6 +42,7 @@ export declare namespace Backend {
38
42
  readonly position?: [number, number, number];
39
43
  readonly cipher?: Cipher;
40
44
  readonly onEvent: OnEvent;
45
+ readonly transport?: Transport;
41
46
  }
42
47
  interface Room {
43
48
  readonly token: string;
@@ -1,11 +1,12 @@
1
1
  export type LogType = 'debug' | 'info' | 'warn' | 'error' | 'log';
2
+ export type Tags = string | 'Connection' | 'WebRTC' | 'Other' | 'Video' | 'All';
2
3
  export type LogOptions = {
3
- tags: string[];
4
+ tags: Tags[];
4
5
  project: string;
5
6
  type?: LogType;
6
7
  };
7
8
  export type LogFilters = {
8
- tags: string[];
9
+ tags: Tags[];
9
10
  };
10
11
  export declare class OdinError extends Error {
11
12
  message: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@4players/odin-common",
3
- "version": "2.4.10",
3
+ "version": "2.4.12",
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",