From c7f58cf2e959899657398dd915600e667e1c0fb4 Mon Sep 17 00:00:00 2001 From: Kevin Pham Date: Thu, 29 Jul 2021 14:32:26 +1000 Subject: [PATCH] Add handling to fetch the video path, and redirect to it directly This avoids it landing on another HTML page, and the user can choose to save the resulting video file if they wish. --- bbb_view.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/bbb_view.php b/bbb_view.php index b9647562b..ac21d0eee 100644 --- a/bbb_view.php +++ b/bbb_view.php @@ -234,6 +234,22 @@ $overrides = array('meetingid' => $bbbsession['meetingid']); bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_PLAYED, $overrides); + // For captures, return the direct recording link (will need to grab response HTML and fetch direct url). + // Note: Needs to happen before proxy handling. + if ($rtype === 'capture') { + $curl = new curl(); + $curlresults = $curl->get($href); + // Fetch video source url, and if matches, append the url to the + // link, removing all new lines to ensure the tags are more + // consistently placed. + $curlresults = str_replace(["\r\n", "\r", "\n"], ' ', $curlresults); + preg_match_all('/