Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add handling to fetch the video path, and redirect to it directly #47

Draft
wants to merge 1 commit into
base: master-catalyst
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions bbb_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -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('/<source src="([^"]*?)" type="video/', $curlresults, $matches);
$videofile = $matches[1][0] ?? '';
if (!empty($videofile)) {
$href .= $videofile;
}
}

if ((bool)\mod_bigbluebuttonbn\locallib\config::get('recordings_proxy_playback')) {
$parseurl = parse_url($href);

Expand Down