Rename openvidu-recording-node to openvidu-recording-basic-node

This commit is contained in:
juancarmore 2024-09-19 12:47:25 +02:00
parent b5bd0f0412
commit e360ae456e
13 changed files with 646 additions and 632 deletions

View File

@ -1,8 +1,8 @@
# OpenVidu Recording
# OpenVidu Recording Basic Node
Simple video-call application with recording capabilities. It includes a backend built with Node.js with Express and a frontend built with plain HTML, CSS and JavaScript.
For further information, check the [tutorial documentation](https://livekit-tutorials.openvidu.io/tutorials/advanced-tutorials/openvidu-recording/).
For further information, check the [tutorial documentation](https://livekit-tutorials.openvidu.io/tutorials/advanced-features/recording-basic/).
## Prerequisites
@ -14,7 +14,7 @@ For further information, check the [tutorial documentation](https://livekit-tuto
```bash
git clone https://github.com/OpenVidu/openvidu-livekit-tutorials.git
cd openvidu-livekit-tutorials/advanced-features/openvidu-recording-node
cd openvidu-livekit-tutorials/advanced-features/openvidu-recording-basic-node
```
2. Install dependencies

View File

@ -1,5 +1,5 @@
{
"name": "openvidu-recording",
"name": "openvidu-recording-basic-node",
"version": "1.0.0",
"description": "Simple video-call application with recording capabilities",
"main": "src/index.js",
@ -8,10 +8,10 @@
"start": "node src/index.js"
},
"dependencies": {
"@aws-sdk/client-s3": "3.635.0",
"@aws-sdk/client-s3": "3.654.0",
"cors": "2.8.5",
"dotenv": "16.4.5",
"express": "4.19.2",
"livekit-server-sdk": "2.6.1"
"express": "4.21.0",
"livekit-server-sdk": "2.6.2"
}
}

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -111,7 +111,7 @@ app.post("/recordings/stop", async (req, res) => {
}
try {
// Stop the Egress to finish the recording
// Stop the egress to finish the recording
const egressInfo = await egressClient.stopEgress(activeRecording);
const file = egressInfo.fileResults[0];
const recording = {
@ -146,7 +146,7 @@ app.get("/recordings", async (req, res) => {
const keyEnd = ".mp4.json";
const regex = new RegExp(`^${keyStart}.*${keyEnd}$`);
// List all Egress metadata files in the recordings path that match the regex
// List all egress metadata files in the recordings path that match the regex
const payloadKeys = await s3Service.listObjects(RECORDINGS_PATH, regex);
const recordings = await Promise.all(payloadKeys.map((payloadKey) => getRecordingInfo(payloadKey)));
res.json({ recordings });
@ -157,7 +157,7 @@ app.get("/recordings", async (req, res) => {
});
const getRecordingInfo = async (payloadKey) => {
// Get the Egress metadata file as JSON
// Get the egress metadata file as JSON
const data = await s3Service.getObjectAsJson(payloadKey);
// Get the recording file size