@4players/odin-common 2.12.2 → 2.13.1
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/cjs/index.js +1 -0
- package/lib/cjs/utility/environment.js +2 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/utility/environment.js +2 -0
- package/lib/index.d.ts +1 -0
- package/lib/plugin/api.d.ts +24 -0
- package/package.json +2 -2
package/lib/cjs/index.js
CHANGED
|
@@ -25,6 +25,8 @@ function isFirefoxBrowser() {
|
|
|
25
25
|
return (typeof window !== 'undefined' && pattern.test(window.navigator.userAgent));
|
|
26
26
|
}
|
|
27
27
|
function isSafariBrowser() {
|
|
28
|
+
if (isBlinkBrowser())
|
|
29
|
+
return false;
|
|
28
30
|
const pattern = /safari|applewebkit/i;
|
|
29
31
|
return (typeof window !== 'undefined' && pattern.test(window.navigator.userAgent));
|
|
30
32
|
}
|
package/lib/esm/index.js
CHANGED
|
@@ -17,6 +17,8 @@ export function isFirefoxBrowser() {
|
|
|
17
17
|
return (typeof window !== 'undefined' && pattern.test(window.navigator.userAgent));
|
|
18
18
|
}
|
|
19
19
|
export function isSafariBrowser() {
|
|
20
|
+
if (isBlinkBrowser())
|
|
21
|
+
return false;
|
|
20
22
|
const pattern = /safari|applewebkit/i;
|
|
21
23
|
return (typeof window !== 'undefined' && pattern.test(window.navigator.userAgent));
|
|
22
24
|
}
|
package/lib/index.d.ts
CHANGED
package/lib/plugin/api.d.ts
CHANGED
|
@@ -35,6 +35,18 @@ export declare namespace Backend {
|
|
|
35
35
|
isSilent: boolean;
|
|
36
36
|
rmsDBFS: number;
|
|
37
37
|
}
|
|
38
|
+
interface JitterStats {
|
|
39
|
+
avgDecodingTime: number;
|
|
40
|
+
packetsSeen: number;
|
|
41
|
+
packetsInvalid: number;
|
|
42
|
+
packetsTooLate: number;
|
|
43
|
+
packetsTooEarly: number;
|
|
44
|
+
packetsRepeated: number;
|
|
45
|
+
packetsProcessed: number;
|
|
46
|
+
packetsLost: number;
|
|
47
|
+
rewinds: number;
|
|
48
|
+
cacheLength: number;
|
|
49
|
+
}
|
|
38
50
|
interface JoinRoomParameters {
|
|
39
51
|
readonly gateway: string | undefined;
|
|
40
52
|
readonly token: string;
|
|
@@ -45,9 +57,20 @@ export declare namespace Backend {
|
|
|
45
57
|
readonly onEvent: OnEvent;
|
|
46
58
|
readonly transport?: Transport;
|
|
47
59
|
}
|
|
60
|
+
interface ConnectionStats {
|
|
61
|
+
bytesSend: number;
|
|
62
|
+
bytesReceived: number;
|
|
63
|
+
packetsSend: number;
|
|
64
|
+
packetsReceived: number;
|
|
65
|
+
packetsLost: number;
|
|
66
|
+
roundTripTime: number;
|
|
67
|
+
congestionEvents: number;
|
|
68
|
+
congestionWindow: number;
|
|
69
|
+
}
|
|
48
70
|
interface Room {
|
|
49
71
|
readonly token: string;
|
|
50
72
|
readonly cipher: Cipher | undefined;
|
|
73
|
+
connectionStats: ConnectionStats;
|
|
51
74
|
request(method: string, properties: unknown): Promise<unknown>;
|
|
52
75
|
link(media: Media): Promise<void>;
|
|
53
76
|
unlink(media: Media): void;
|
|
@@ -73,6 +96,7 @@ export declare namespace Backend {
|
|
|
73
96
|
}
|
|
74
97
|
interface AudioPlayback extends AudioMedia {
|
|
75
98
|
readonly uid: UID;
|
|
99
|
+
jitterStats: JitterStats;
|
|
76
100
|
}
|
|
77
101
|
interface CreateAudioCaptureParameters extends Partial<DeviceParameters> {
|
|
78
102
|
readonly volume?: Volume;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4players/odin-common",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.1",
|
|
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",
|
|
@@ -44,4 +44,4 @@
|
|
|
44
44
|
"testyts": "~1.5.0",
|
|
45
45
|
"typescript": "~5.5.0"
|
|
46
46
|
}
|
|
47
|
-
}
|
|
47
|
+
}
|