From c112780113387b08d95c687e743df3f831f7f550 Mon Sep 17 00:00:00 2001 From: Juan Leyva Date: Tue, 1 Mar 2022 12:16:53 +0100 Subject: [PATCH] MDL-74042 vimeo: Support security hash for restricted videos --- media/player/vimeo/wsplayer.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/media/player/vimeo/wsplayer.php b/media/player/vimeo/wsplayer.php index 89a5dc00ce946..8aef88ebabdc1 100644 --- a/media/player/vimeo/wsplayer.php +++ b/media/player/vimeo/wsplayer.php @@ -40,6 +40,7 @@ $video = required_param('video', PARAM_ALPHANUM); // Video ids are numeric, but it's more solid to expect things like 00001. $width = optional_param('width', 0, PARAM_INT); $height = optional_param('height', 0, PARAM_INT); +$h = optional_param('h', '', PARAM_ALPHANUM); // Security hash for restricted videos. // Authenticate the user. $webservicelib = new webservice(); @@ -52,6 +53,10 @@ $display = "width=\"$width\" height=\"$height\""; } +if (!empty($h)) { + $video .= '?h=' . $h; +} + $output = <<