Added support for protected recordings (#2907)

This commit is contained in:
Ahmad Farhat
2021-09-19 14:14:53 -04:00
committed by GitHub
parent e0972efc40
commit 3987a8b913
4 changed files with 32 additions and 0 deletions

View File

@ -119,6 +119,20 @@ module BbbServer
bbb_server.publish_recordings(record_id, false)
end
# Protect a recording
def protect_recording(record_id, meta = {})
meta[:recordID] = record_id
meta[:protect] = true
bbb_server.send_api_request("updateRecordings", meta)
end
# Unprotect a recording
def unprotect_recording(record_id, meta = {})
meta[:recordID] = record_id
meta[:protect] = false
bbb_server.send_api_request("updateRecordings", meta)
end
# Deletes a recording from a room.
def delete_recording(record_id)
bbb_server.delete_recordings(record_id)

View File

@ -28,6 +28,12 @@ class RecordingsController < ApplicationController
"meta_#{META_LISTED}" => (params[:state] == "public"),
}
if params[:state] == "protected"
protect_recording(params[:record_id])
else
unprotect_recording(params[:record_id])
end
if params[:state] == "inaccessible"
unpublish_recording(params[:record_id])
else