Skip to content

Commit

Permalink
feat(protocol): Experimental WebRTC Support (#826)
Browse files Browse the repository at this point in the history
Co-authored-by: zccz14 <[email protected]>
  • Loading branch information
Thrimbda and zccz14 authored Sep 14, 2024
1 parent 9432340 commit c8b2891
Show file tree
Hide file tree
Showing 7 changed files with 466 additions and 32 deletions.
10 changes: 10 additions & 0 deletions common/changes/@yuants/protocol/2024-07-28-07-57.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@yuants/protocol",
"comment": "experimental webrtc support",
"type": "minor"
}
],
"packageName": "@yuants/protocol"
}
96 changes: 96 additions & 0 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions libraries/protocol/etc/protocol.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export interface IService {
export interface ITerminalInfo {
channelIdSchemas?: JSONSchema7[];
created_at?: number;
enable_WebRTC?: boolean;
name?: string;
serviceInfo?: Record<string, {
method: string;
Expand Down
7 changes: 5 additions & 2 deletions libraries/protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
"rxjs": "~7.5.6",
"url": "~0.11.0",
"ws": "~8.11.0",
"@yuants/prometheus-client": "workspace:*"
"@yuants/prometheus-client": "workspace:*",
"simple-peer": "~9.11.1",
"@roamhq/wrtc": "~0.8.0"
},
"devDependencies": {
"@microsoft/api-extractor": "~7.30.0",
Expand All @@ -31,7 +33,8 @@
"@types/json-schema": "~7.0.11",
"@types/node": "18",
"@yuants/tool-kit": "workspace:*",
"typescript": "~4.7.4"
"typescript": "~4.7.4",
"@types/simple-peer": "~9.11.8"
},
"publishConfig": {
"access": "public",
Expand Down
5 changes: 5 additions & 0 deletions libraries/protocol/src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ export interface ITerminalInfo {
/** Provider Channel ID Schema */
channelIdSchemas?: JSONSchema7[];

/**
* A flag to indicate whether the terminal enables WebRTC messaging tunnel
*/
enable_WebRTC?: boolean;

/**
* Status text
* 状态文字
Expand Down
Loading

0 comments on commit c8b2891

Please sign in to comment.