openrtc-tauri 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/README.md +10 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/runtime/ipc.d.ts +2 -2
- package/dist/runtime/ipc.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
First-party Tauri adapter package for [`openrtc`](https://www.npmjs.com/package/openrtc).
|
|
4
4
|
|
|
5
|
-
Use this package with `
|
|
5
|
+
Use this package with `OpenRTC(...)` or a native IPC runtime in a
|
|
6
6
|
Tauri desktop or mobile application.
|
|
7
7
|
|
|
8
8
|
This package pairs with the first-party Rust crate `openrtc-tauri-plugin`. The
|
|
9
|
-
TypeScript bridge invokes only the registered
|
|
9
|
+
TypeScript bridge invokes only the registered plugin command namespace
|
|
10
10
|
(`plugin:openrtc-tauri-plugin|...`). It does not probe legacy plugin namespaces
|
|
11
11
|
or bare Tauri commands. Without the Rust plugin, `OpenRTC.native(...)` fails
|
|
12
12
|
closed by design instead of silently selecting another lifecycle owner.
|
|
@@ -23,7 +23,7 @@ In your Tauri Rust crate:
|
|
|
23
23
|
[dependencies]
|
|
24
24
|
# Use the published crate after the native release path is cut.
|
|
25
25
|
# Until then, workspace consumers may use a path dependency.
|
|
26
|
-
openrtc-tauri-plugin = "2.0
|
|
26
|
+
openrtc-tauri-plugin = "2.2.0"
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
```rust
|
|
@@ -35,20 +35,20 @@ tauri::Builder::default()
|
|
|
35
35
|
## Usage
|
|
36
36
|
|
|
37
37
|
```ts
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
38
|
+
import { OpenRTC } from 'openrtc';
|
|
39
|
+
import { createBridge } from 'openrtc-tauri/ipc';
|
|
40
40
|
|
|
41
|
-
const client =
|
|
41
|
+
const client = OpenRTC.native({
|
|
42
42
|
apiKey: 'pk_live_...',
|
|
43
43
|
auth: {
|
|
44
44
|
getAssertion: ({ forceRefresh }) => appAuth.openRtcAssertion({ forceRefresh }),
|
|
45
45
|
},
|
|
46
|
-
},
|
|
46
|
+
}, createBridge());
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
The package root and `openrtc-tauri/ipc` expose the same lightweight
|
|
49
|
+
The package root and `openrtc-tauri/ipc` expose the same lightweight bridge.
|
|
50
50
|
Connection, authentication, capability, and retry behavior remains in the
|
|
51
|
-
OpenRTC
|
|
51
|
+
OpenRTC client and Rust plugin rather than a second Tauri adapter.
|
|
52
52
|
|
|
53
53
|
## Rust Plugin
|
|
54
54
|
|
|
@@ -56,7 +56,7 @@ OpenRTC 2.0 client and Rust plugin rather than a second Tauri adapter.
|
|
|
56
56
|
|
|
57
57
|
- provider-neutral `openrtc::client::Client` construction from an API key and
|
|
58
58
|
avenue-scoped grant provider
|
|
59
|
-
-
|
|
59
|
+
- current identity/grant relay without Firebase project configuration
|
|
60
60
|
- native device identity, Iroh startup, endpoint tickets, presence, auto-connect,
|
|
61
61
|
connection state, device/session subscriptions, and peer streams
|
|
62
62
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { createBridge, type BridgeOptions } from './runtime/ipc.js';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { createBridge } from './runtime/ipc.js';
|
package/dist/runtime/ipc.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PlutoIpcBridge } from 'openrtc/runtime';
|
|
2
|
-
export interface
|
|
2
|
+
export interface BridgeOptions {
|
|
3
3
|
commandNamespace?: string;
|
|
4
4
|
}
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function createBridge(options?: BridgeOptions): PlutoIpcBridge;
|
package/dist/runtime/ipc.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const DEFAULT_COMMAND_NAMESPACE = 'plugin:openrtc-tauri-plugin|';
|
|
2
|
-
export function
|
|
2
|
+
export function createBridge(options = {}) {
|
|
3
3
|
const commandNamespace = options.commandNamespace ?? DEFAULT_COMMAND_NAMESPACE;
|
|
4
4
|
const resolveCommand = (command) => command.startsWith('plugin:') ? command : `${commandNamespace}${command}`;
|
|
5
5
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openrtc-tauri",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"prepublishOnly": "pnpm run build && pnpm run test:import"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"openrtc": "^2.0
|
|
32
|
+
"openrtc": "^2.2.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@tauri-apps/api": "^2.0.0"
|