diff --git a/app/api/swagger.yaml b/app/api/swagger.yaml
index 41e7835f..84038a14 100644
--- a/app/api/swagger.yaml
+++ b/app/api/swagger.yaml
@@ -128,10 +128,16 @@ definitions:
StatsResponse:
type: object
properties:
- meetings:
- type: array
- items:
- $ref: '#/definitions/Stats'
+ success:
+ type: boolean
+ timestamp:
+ type: string
+ format: date-time
+ example: "2024-12-21T12:00:00Z"
+ totalRooms:
+ type: integer
+ totalPeers:
+ type: integer
MeetingsResponse:
type: object
properties:
@@ -218,15 +224,6 @@ definitions:
browser:
type: string
- Stats:
- type: object
- properties:
- success:
- type: boolean
- totalRooms:
- type: integer
- totalUser:
- type: integer
Meeting:
type: object
properties:
diff --git a/app/src/Server.js b/app/src/Server.js
index 6f3902cb..3ca369f5 100644
--- a/app/src/Server.js
+++ b/app/src/Server.js
@@ -55,7 +55,7 @@ dev dependencies: {
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
- * @version 1.6.54
+ * @version 1.6.55
*
*/
@@ -945,10 +945,11 @@ function startServer() {
return res.status(403).json({ error: 'Unauthorized!' });
}
- const { totalRooms, totalUsers } = api.getStats(roomList);
+ const { timestamp, totalRooms, totalUsers } = api.getStats(roomList);
res.json({
success: true,
+ timestamp,
totalRooms,
totalUsers,
});
@@ -957,6 +958,7 @@ function startServer() {
log.debug('MiroTalk get stats - Authorized', {
header: req.headers,
body: req.body,
+ timestamp,
totalRooms,
totalUsers,
});
diff --git a/app/src/ServerApi.js b/app/src/ServerApi.js
index 9ab43d2b..693d7922 100644
--- a/app/src/ServerApi.js
+++ b/app/src/ServerApi.js
@@ -21,10 +21,10 @@ module.exports = class ServerApi {
return true;
}
- getStats(roomList) {
+ getStats(roomList, timestamp = new Date().toISOString()) {
const totalUsers = Array.from(roomList.values()).reduce((total, room) => total + room.peers.size, 0);
const totalRooms = roomList.size;
- return { totalRooms, totalUsers };
+ return { timestamp, totalRooms, totalUsers };
}
getMeetings(roomList) {
diff --git a/package.json b/package.json
index 49ced38d..0a8614d0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "mirotalksfu",
- "version": "1.6.54",
+ "version": "1.6.55",
"description": "WebRTC SFU browser-based video calls",
"main": "Server.js",
"scripts": {
diff --git a/public/js/Room.js b/public/js/Room.js
index 0c882477..80cc2f26 100644
--- a/public/js/Room.js
+++ b/public/js/Room.js
@@ -11,7 +11,7 @@ if (location.href.substr(0, 5) !== 'https') location.href = 'https' + location.h
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
- * @version 1.6.54
+ * @version 1.6.55
*
*/
@@ -4619,7 +4619,7 @@ function showAbout() {
imageUrl: image.about,
customClass: { image: 'img-about' },
position: 'center',
- title: 'WebRTC SFU v1.6.54',
+ title: 'WebRTC SFU v1.6.55',
html: `