Rename openvidu-recording-node to openvidu-recording-basic-node
This commit is contained in:
parent
b5bd0f0412
commit
e360ae456e
@ -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.
|
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
|
## Prerequisites
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ For further information, check the [tutorial documentation](https://livekit-tuto
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/OpenVidu/openvidu-livekit-tutorials.git
|
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
|
2. Install dependencies
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "openvidu-recording",
|
"name": "openvidu-recording-basic-node",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Simple video-call application with recording capabilities",
|
"description": "Simple video-call application with recording capabilities",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
@ -8,10 +8,10 @@
|
|||||||
"start": "node src/index.js"
|
"start": "node src/index.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-s3": "3.635.0",
|
"@aws-sdk/client-s3": "3.654.0",
|
||||||
"cors": "2.8.5",
|
"cors": "2.8.5",
|
||||||
"dotenv": "16.4.5",
|
"dotenv": "16.4.5",
|
||||||
"express": "4.19.2",
|
"express": "4.21.0",
|
||||||
"livekit-server-sdk": "2.6.1"
|
"livekit-server-sdk": "2.6.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@ -111,7 +111,7 @@ app.post("/recordings/stop", async (req, res) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Stop the Egress to finish the recording
|
// Stop the egress to finish the recording
|
||||||
const egressInfo = await egressClient.stopEgress(activeRecording);
|
const egressInfo = await egressClient.stopEgress(activeRecording);
|
||||||
const file = egressInfo.fileResults[0];
|
const file = egressInfo.fileResults[0];
|
||||||
const recording = {
|
const recording = {
|
||||||
@ -146,7 +146,7 @@ app.get("/recordings", async (req, res) => {
|
|||||||
const keyEnd = ".mp4.json";
|
const keyEnd = ".mp4.json";
|
||||||
const regex = new RegExp(`^${keyStart}.*${keyEnd}$`);
|
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 payloadKeys = await s3Service.listObjects(RECORDINGS_PATH, regex);
|
||||||
const recordings = await Promise.all(payloadKeys.map((payloadKey) => getRecordingInfo(payloadKey)));
|
const recordings = await Promise.all(payloadKeys.map((payloadKey) => getRecordingInfo(payloadKey)));
|
||||||
res.json({ recordings });
|
res.json({ recordings });
|
||||||
@ -157,7 +157,7 @@ app.get("/recordings", async (req, res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const getRecordingInfo = async (payloadKey) => {
|
const getRecordingInfo = async (payloadKey) => {
|
||||||
// Get the Egress metadata file as JSON
|
// Get the egress metadata file as JSON
|
||||||
const data = await s3Service.getObjectAsJson(payloadKey);
|
const data = await s3Service.getObjectAsJson(payloadKey);
|
||||||
|
|
||||||
// Get the recording file size
|
// Get the recording file size
|
||||||
Loading…
x
Reference in New Issue
Block a user