@4players/odin-plugin-web 1.19.0 → 1.20.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.
package/lib/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Backend, Logger, OnLogMessage } from '@4players/odin-common';
2
+ import { JsonValue } from '@4players/odin-common/api';
2
3
 
3
4
  type AudioContextFactory = (sampleRate: number | undefined) => Promise<AudioContext>;
4
5
  export type DeviceInfo = {
@@ -40,6 +41,13 @@ export interface WebPlugin extends Backend.Plugin {
40
41
  joinRoom(parameters: Backend.JoinRoomParameters): WebRoom;
41
42
  enumerateDevices(): Promise<WebDevice[]>;
42
43
  setOutputDevice(device: WebDeviceParameters): Promise<void>;
44
+ /**
45
+ * A snapshot of the internal state of the plugin for bug reports: its
46
+ * connections, its medias and the audio threads. Its shape is not part of
47
+ * the API and may change with any version. The addresses of ICE candidates
48
+ * are left out.
49
+ */
50
+ dump(): Promise<JsonValue>;
43
51
  }
44
52
  export interface WebRoom extends Backend.Room {
45
53
  /**
@@ -50,6 +58,11 @@ export interface WebRoom extends Backend.Room {
50
58
  * Note: transport connections are pooled, so the returned stats reflect the
51
59
  * connection as a whole, which may be shared with other rooms joined on the
52
60
  * same server.
61
+ *
62
+ * `trackIdentifier` of an `inbound-rtp` entry is the id of the track the
63
+ * stream is played from, in every browser. Where the browser reports
64
+ * another id there (WebKit), the report is a map with corrected entries
65
+ * instead of the browser's own object; it is read the same way.
53
66
  */
54
67
  getRtcStats(): Promise<RTCStatsReport | undefined>;
55
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@4players/odin-plugin-web",
3
- "version": "1.19.0",
3
+ "version": "1.20.0",
4
4
  "description": "A backend plugin providing the custom WebAssembly audio processing module for ODIN web clients",
5
5
  "homepage": "https://www.4players.io",
6
6
  "repository": {
@@ -35,6 +35,7 @@
35
35
  "test:unit": "tsx --test 'src/**/*.test.ts'",
36
36
  "test:install": "npm --prefix test install",
37
37
  "test:start": "npm --prefix test start",
38
+ "check:video-cipher": "tsx test/video-cipher/serve.ts",
38
39
  "format": "npm-run-all -s format:cpp format:tsc",
39
40
  "format:cpp": "find wasm -iname '*.hpp' -o -iname '*.cpp' | xargs clang-format -i",
40
41
  "format:tsc": "prettier 'src/**/*.ts' --write",