advanced-features: azure-recording-tutorials - more changes to the S3 references
This commit is contained in:
parent
75076678a5
commit
4e90828d80
@ -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
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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(
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user