openrtc-netcode-react 2.0.1 → 2.2.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/dist/index.d.ts +3 -3
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type PropsWithChildren } from 'react';
|
|
2
|
-
import { type NetVarOptions, type NetcodeClient, type NetcodeEventName, type NetcodeEvents, type NetcodeLobby, type NetcodeMessage, type
|
|
2
|
+
import { type NetVarOptions, type NetcodeClient, type NetcodeEventName, type NetcodeEvents, type NetcodeLobby, type NetcodeMessage, type MessageHandler, type NetcodeObjectChange, type NetcodeObjectState, type NetcodeOptions, type NetcodePeer, type NetcodePeerStats, type NetcodeVoicePeer } from 'openrtc-netcode';
|
|
3
3
|
export interface NetcodeProviderProps extends PropsWithChildren {
|
|
4
4
|
client?: NetcodeClient;
|
|
5
5
|
options?: NetcodeOptions;
|
|
@@ -14,5 +14,5 @@ export declare function useNetVar<T>(key: string, initial: T, options?: NetVarOp
|
|
|
14
14
|
export declare function useNetworkObjects(kind?: string): NetcodeObjectState[];
|
|
15
15
|
export declare function useNetcodeVoicePeers(): NetcodeVoicePeer[];
|
|
16
16
|
export declare function useNetcodeEvent<K extends NetcodeEventName>(event: K, handler: (payload: NetcodeEvents[K]) => void): void;
|
|
17
|
-
export declare function useNetcodeMessage<T = unknown>(type: string, handler:
|
|
18
|
-
export type { NetVarOptions, NetcodeClient, NetcodeEventName, NetcodeEvents, NetcodeLobby, NetcodeMessage,
|
|
17
|
+
export declare function useNetcodeMessage<T = unknown>(type: string, handler: MessageHandler<T>): void;
|
|
18
|
+
export type { NetVarOptions, NetcodeClient, NetcodeEventName, NetcodeEvents, NetcodeLobby, NetcodeMessage, MessageHandler, NetcodeObjectChange, NetcodeObjectState, NetcodeOptions, NetcodePeer, NetcodePeerStats, NetcodeVoicePeer, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openrtc-netcode-react",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"test:watch": "vitest"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"openrtc-netcode": "^2.0
|
|
43
|
+
"openrtc-netcode": "^2.2.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": "^18.2.0 || ^19.0.0"
|