floating-live 0.8.1 → 0.8.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.
package/package.json
CHANGED
package/src/controller/Room.js
CHANGED
package/src/controller/index.js
CHANGED
|
@@ -22,13 +22,13 @@ class Controller {
|
|
|
22
22
|
start() {
|
|
23
23
|
this.started = true;
|
|
24
24
|
this.timestamp = new Date().valueOf();
|
|
25
|
-
this.main.emit("start");
|
|
25
|
+
this.main.emit("start", this.timestamp);
|
|
26
26
|
}
|
|
27
27
|
/** 结束 */
|
|
28
28
|
end() {
|
|
29
29
|
this.closeAllRooms();
|
|
30
30
|
this.started = false;
|
|
31
|
-
this.main.emit("end");
|
|
31
|
+
this.main.emit("end", this.timestamp);
|
|
32
32
|
this.timestamp = 0;
|
|
33
33
|
}
|
|
34
34
|
/** 添加房间 */
|
|
@@ -52,7 +52,7 @@ class Controller {
|
|
|
52
52
|
}
|
|
53
53
|
/** 关闭房间 */
|
|
54
54
|
closeRoom(roomKey) {
|
|
55
|
-
this.room.
|
|
55
|
+
this.room.close(roomKey);
|
|
56
56
|
}
|
|
57
57
|
/** 打开所有房间 */
|
|
58
58
|
openAllRooms() {
|