advanced-features: azure-recording-tutorials - more changes to the S3 references

This commit is contained in:
Piwccle 2025-06-03 17:22:54 +02:00
parent 75076678a5
commit 4e90828d80
3 changed files with 6 additions and 5 deletions

View File

@ -10,6 +10,6 @@ RECORDINGS_PATH=recordings/
RECORDING_PLAYBACK_STRATEGY=AZURE
# Azure Blob Storage configuration
AZURE_ACCOUNT_NAME=yourstorageaccountname
AZURE_ACCOUNT_KEY=youraccountkey
AZURE_ACCOUNT_NAME=your_account_name
AZURE_ACCOUNT_KEY=your_account_key
AZURE_CONTAINER_NAME=openvidu-appdata

View File

@ -102,6 +102,7 @@ recordingController.get("/:recordingName", async (req, res) => {
});
recordingController.get("/:recordingName/url", async (req, res) => {
console.log("Getting recording URL...");
const { recordingName } = req.params;
const exists = await recordingService.existsRecording(recordingName);

View File

@ -81,7 +81,7 @@ export class AzureBlobService {
downloadResponse = await blobClient.download();
}
if (!downloadResponse.readableStreamBody) {
throw new Error("No se pudo obtener el stream del blob");
throw new Error("Could not obtain the blob stream");
}
return downloadResponse.readableStreamBody;
}
@ -89,10 +89,10 @@ export class AzureBlobService {
// Generates a valid SAS URL for 24 hours
async getObjectUrl(key) {
if (!AZURE_ACCOUNT_NAME || !AZURE_ACCOUNT_KEY) {
throw new Error("Credenciales de cuenta de Azure no están definidas para generar SAS");
throw new Error("Azure account credentials are not defined to generate SAS");
}
const blobClient = this.containerClient.getBlobClient(key);
const expiresOn = new Date(new Date().valueOf() + 24 * 60 * 60 * 1000); // 24 horas
const expiresOn = new Date(new Date().valueOf() + 24 * 60 * 60 * 1000); // 24 hours
const sasPermissions = BlobSASPermissions.parse("r");
const sasToken = generateBlobSASQueryParameters(
{