From 47af1a391b53a04681ed585f308ef4c47466015d Mon Sep 17 00:00:00 2001
From: Felipe Cecagno <fcecagno@gmail.com>
Date: Sun, 20 Dec 2020 21:43:54 -0300
Subject: [PATCH] publish presentation format to use the new bbb-playback;
 redirect 2.0 to 2.3 by default

---
 .../presentation/scripts/presentation.nginx   | 20 +++++++++++--------
 .../scripts/publish/presentation.rb           |  3 +--
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/record-and-playback/presentation/scripts/presentation.nginx b/record-and-playback/presentation/scripts/presentation.nginx
index 20ed5b4820..a2d0e1a926 100644
--- a/record-and-playback/presentation/scripts/presentation.nginx
+++ b/record-and-playback/presentation/scripts/presentation.nginx
@@ -16,14 +16,18 @@
 # with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
 #
 
-	location /playback/presentation/playback.html {
-		return 301 /playback/presentation/0.81/playback.html?$query_string;
-		# If you have recordings from 0.9.0 beta versions and are sure
-		# that you will never want to play recordings made with
-		# BigBlueButton 0.81, comment the line above and uncomment the
-		# following line:
-		#return 301 /playback/presentation/0.9.0/playback.html?$query_string;
-	}
+        location /playback/presentation/playback.html {
+                return 301 /playback/presentation/0.81/playback.html?$query_string;
+                # If you have recordings from 0.9.0 beta versions and are sure
+                # that you will never want to play recordings made with
+                # BigBlueButton 0.81, comment the line above and uncomment the
+                # following line:
+                #return 301 /playback/presentation/0.9.0/playback.html?$query_string;
+        }
+
+        location /playback/presentation/2.0/playback.html {
+                return 301 /playback/presentation/2.3/$arg_meetingId?$query_string;
+        }
 
         location /playback/presentation {
                 root    /var/bigbluebutton;
diff --git a/record-and-playback/presentation/scripts/publish/presentation.rb b/record-and-playback/presentation/scripts/publish/presentation.rb
index 855530be61..50f6c37f96 100755
--- a/record-and-playback/presentation/scripts/publish/presentation.rb
+++ b/record-and-playback/presentation/scripts/publish/presentation.rb
@@ -1268,7 +1268,7 @@ begin
         metadata_with_playback = Nokogiri::XML::Builder.with(metadata.at('recording')) do |xml|
             xml.playback {
               xml.format("presentation")
-              xml.link("#{playback_protocol}://#{playback_host}/playback/presentation/2.0/playback.html?meetingId=#{$meeting_id}")
+              xml.link("#{playback_protocol}://#{playback_host}/playback/presentation/2.3/#{$meeting_id}")
               xml.processing_time("#{processing_time}")
               xml.duration("#{recording_time}")
               unless presentation.empty?
@@ -1370,4 +1370,3 @@ rescue Exception => e
 
   exit 1
 end
-
-- 
GitLab