openrtc-tauri 1.0.1 → 1.0.3

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.
Files changed (2) hide show
  1. package/README.md +9 -13
  2. package/package.json +6 -2
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  First-party Tauri adapter package for [`openrtc`](https://www.npmjs.com/package/openrtc).
4
4
 
5
- Use this package when you want `OpenRTC.native(...)` or a native IPC runtime in a
5
+ Use this package with `createNativeOpenRTC(...)` 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
@@ -26,7 +26,7 @@ In your Tauri Rust crate:
26
26
  [dependencies]
27
27
  # Use the published crate after the native release path is cut.
28
28
  # Until then, workspace consumers may use a path dependency.
29
- openrtc-tauri-plugin = "0.1"
29
+ openrtc-tauri-plugin = "1.0.3"
30
30
  ```
31
31
 
32
32
  ```rust
@@ -38,22 +38,18 @@ tauri::Builder::default()
38
38
  ## Usage
39
39
 
40
40
  ```ts
41
- import { OpenRTC } from 'openrtc';
41
+ import { createNativeOpenRTC } from 'openrtc/native';
42
+ import { createTauriIpcBridge } from 'openrtc-tauri/ipc';
42
43
 
43
- const client = OpenRTC.native({
44
+ const client = createNativeOpenRTC({
44
45
  apiKey: 'pk_live_...',
45
46
  authMode: 'external',
46
- });
47
+ }, createTauriIpcBridge());
47
48
  ```
48
49
 
49
- For browser-only or WebView-only prototypes, use `OpenRTC(...)`. For Tauri
50
- desktop/mobile production apps, centralize platform selection in your app:
51
-
52
- ```ts
53
- const client = isTauriEnvironment()
54
- ? OpenRTC.native(options)
55
- : OpenRTC(options);
56
- ```
50
+ The bridge-only `openrtc-tauri/ipc` entrypoint excludes the optional adapter
51
+ export and browser/runtime compatibility graph from shipped WebView bundles.
52
+ Use the package root only when `TauriRuntimeAdapter` is required.
57
53
 
58
54
  For lower-level native runtime wiring:
59
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openrtc-tauri",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -17,6 +17,10 @@
17
17
  ".": {
18
18
  "types": "./dist/index.d.ts",
19
19
  "import": "./dist/index.js"
20
+ },
21
+ "./ipc": {
22
+ "types": "./dist/runtime/ipc.d.ts",
23
+ "import": "./dist/runtime/ipc.js"
20
24
  }
21
25
  },
22
26
  "scripts": {
@@ -25,7 +29,7 @@
25
29
  "prepublishOnly": "pnpm run build && pnpm run test:import"
26
30
  },
27
31
  "dependencies": {
28
- "openrtc": "^1.0.3"
32
+ "openrtc": "^1.0.7"
29
33
  },
30
34
  "peerDependencies": {
31
35
  "@tauri-apps/api": "^2.0.0"