diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 6426eb7..f79b37d 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -58,6 +58,7 @@ jobs:
- name: Build with NodeJS
run: |
npm install
- npm run dev
+ # 不能直接运行
+ # npm run dev
working-directory: ./taoyao-client-media
\ No newline at end of file
diff --git a/taoyao-client-web/src/App.vue b/taoyao-client-web/src/App.vue
index a3f203d..f30dcd3 100644
--- a/taoyao-client-web/src/App.vue
+++ b/taoyao-client-web/src/App.vue
@@ -1,27 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 连接信令
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 进入
+ 创建
+
+
+
+
+
+
+
-
-
diff --git a/taoyao-client-web/src/components/SettingRoom.vue b/taoyao-client-web/src/components/SettingRoom.vue
deleted file mode 100644
index 000123b..0000000
--- a/taoyao-client-web/src/components/SettingRoom.vue
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 进入
- 创建
-
-
-
-
-
diff --git a/taoyao-client-web/src/components/SettingSignal.vue b/taoyao-client-web/src/components/SettingSignal.vue
deleted file mode 100644
index 6c3747b..0000000
--- a/taoyao-client-web/src/components/SettingSignal.vue
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 连接
-
-
-
-
-
diff --git a/taoyao-client-web/src/components/Taoyao.js b/taoyao-client-web/src/components/Taoyao.js
index beff486..fe19d8d 100644
--- a/taoyao-client-web/src/components/Taoyao.js
+++ b/taoyao-client-web/src/components/Taoyao.js
@@ -414,13 +414,13 @@ class Taoyao {
}
/**
- * 打开信令通道
+ * 连接信令
*
* @param {*} callback
*
* @returns
*/
- async buildSignal(callback) {
+ async connectSignal(callback) {
const self = this;
self.callback = callback;
self.signalChannel = signalChannel;
@@ -450,22 +450,41 @@ class Taoyao {
}
}
// 错误回调
+ const errorMessage = protocol.buildMessage("platform::error", { message }, -9999);
+ errorMessage.code = "-9999";
+ errorMessage.message = message;
self.callback(
- protocol.buildMessage("platform::error", { message }, -9999),
+ errorMessage,
error
);
}
+ async roomList() {
+ const response = await this.request(
+ protocol.buildMessage("room::list")
+ );
+ return response.body;
+ }
+ async mediaList() {
+ const response = await this.request(
+ protocol.buildMessage("client::list", { clientType: "MEDIA" })
+ );
+ return response.body;
+ }
/**
* 创建房间
*/
- async create(room) {
+ async createRoom(room) {
const self = this;
+ if (!room) {
+ this.callbackError("无效房间");
+ return;
+ }
const response = await self.request(
protocol.buildMessage("room::create", room)
);
return response.body;
}
- async enter(roomId) {
+ async enterRoom(roomId) {
const self = this;
if (!roomId) {
this.callbackError("无效房间");