From 84af0bc0cc27ac9e9cdeab568226f0aee2aeabc4 Mon Sep 17 00:00:00 2001
From: KDSBrowne <kert.browne85@gmail.com>
Date: Wed, 5 Aug 2020 17:08:57 +0000
Subject: [PATCH] improve panoptoMATCH_URL regex (more generic)

---
 .../external-video-player/custom-players/panopto.jsx          | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bigbluebutton-html5/imports/ui/components/external-video-player/custom-players/panopto.jsx b/bigbluebutton-html5/imports/ui/components/external-video-player/custom-players/panopto.jsx
index 46fd20b4d0..b1305869af 100644
--- a/bigbluebutton-html5/imports/ui/components/external-video-player/custom-players/panopto.jsx
+++ b/bigbluebutton-html5/imports/ui/components/external-video-player/custom-players/panopto.jsx
@@ -1,4 +1,4 @@
-const MATCH_URL = /https?\:\/\/(([a-zA-Z]+\.)?hosted\.panopto\.com\/Panopto)\/Pages\/Viewer\.aspx\?id=([-a-zA-Z0-9]+)/;
+const MATCH_URL = /https?\:\/\/(([a-zA-Z]+\.)?([a-zA-Z]+\.panopto\.[a-zA-Z]+\/Panopto))\/Pages\/Viewer\.aspx\?id=([-a-zA-Z0-9]+)/;
 
 export class Panopto {
 
@@ -8,7 +8,7 @@ export class Panopto {
 
   static getSocialUrl(url) {
     const m = url.match(MATCH_URL);
-    return 'https://' + m[1] + '/Podcast/Social/' + m[3] + '.mp4';
+    return 'https://' + m[1] + '/Podcast/Social/' + m[4] + '.mp4';
   }
 }
 
-- 
GitLab