Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(service-providers): add RTM 2.0 #2126

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions desktop/renderer-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@netless/flat-service-provider-agora-cloud-recording": "workspace:*",
"@netless/flat-service-provider-agora-rtc-electron": "workspace:*",
"@netless/flat-service-provider-agora-rtm": "workspace:*",
"@netless/flat-service-provider-agora-rtm2": "workspace:*",
"@netless/flat-service-provider-fastboard": "workspace:*",
"@netless/flat-service-provider-file-convert-h5": "workspace:*",
"@netless/flat-service-provider-file-convert-netless": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions desktop/renderer-app/src/tasks/init-flat-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ export function initFlatServices(): void {
});

flatServices.register("textChat", async () => {
const { AgoraRTM } = await import("@netless/flat-service-provider-agora-rtm");
return new AgoraRTM(config.agora.appId);
const { AgoraRTM2 } = await import("@netless/flat-service-provider-agora-rtm2");
return new AgoraRTM2(config.agora.appId);
});

flatServices.register("whiteboard", async () => {
Expand Down
1 change: 1 addition & 0 deletions packages/flat-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@netless/flat-server-api": "workspace:*",
"@netless/flat-service-provider-agora-rtc-web": "workspace:*",
"@netless/flat-service-provider-agora-rtm": "workspace:*",
"@netless/flat-service-provider-agora-rtm2": "workspace:*",
"@netless/flat-services": "workspace:*",
"@netless/flat-stores": "workspace:*",
"@netless/sync-player": "^1.0.7",
Expand Down
1 change: 1 addition & 0 deletions packages/flat-stores/src/classroom-store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,7 @@ export class ClassroomStore {

public async destroy(): Promise<void> {
this.sideEffect.flushAll();
(window as any).classroomStore = null;

await this.stopRecording();

Expand Down
163 changes: 153 additions & 10 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion service-providers/agora-rtc/agora-rtc-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@netless/flat-services": "workspace:*",
"agora-rtc-sdk-ng": "4.16.0",
"agora-rtc-sdk-ng": "^4.20.0",
"side-effect-manager": "^1.2.1",
"value-enhancer": "^1.3.2"
}
Expand Down
3 changes: 3 additions & 0 deletions service-providers/agora-rtm2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @netless/flat-service-provider-agora-rtm2

Implements the `textChat` Flat service.
22 changes: 22 additions & 0 deletions service-providers/agora-rtm2/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@netless/flat-service-provider-agora-rtm2",
"version": "0.1.0",
"description": "Agora Realtime Messaging 2.0",
"main": "src/index.ts",
"private": true,
"license": "MIT",
"scripts": {
"build": "tsc"
},
"devDependencies": {
"prettier": "^3.2.4",
"typescript": "^4.8.3"
},
"dependencies": {
"@netless/flat-server-api": "workspace:*",
"@netless/flat-services": "workspace:*",
"agora-rtm": "^2.1.10",
"side-effect-manager": "^1.2.1",
"uuid": "^9.0.0"
}
}
1 change: 1 addition & 0 deletions service-providers/agora-rtm2/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./rtm2";
Loading
Loading