From 6d0f778e849635d2e22eedf9653e504c04bde842 Mon Sep 17 00:00:00 2001 From: Fred Dixon Date: Thu, 13 Jun 2019 19:34:35 -0500 Subject: [PATCH] Reverted rap scripts for presentation --- bigbluebutton-config/bigbluebutton-release | 2 +- .../scripts/process/presentation.rb | 23 ++++--------------- .../scripts/publish/presentation.rb | 18 --------------- 3 files changed, 5 insertions(+), 38 deletions(-) diff --git a/bigbluebutton-config/bigbluebutton-release b/bigbluebutton-config/bigbluebutton-release index 522ced7df4..7d81d9da89 100644 --- a/bigbluebutton-config/bigbluebutton-release +++ b/bigbluebutton-config/bigbluebutton-release @@ -1 +1 @@ -BIGBLUEBUTTON_RELEASE=2.2.0-beta-10 +BIGBLUEBUTTON_RELEASE=2.2.0-beta-11 diff --git a/record-and-playback/presentation/scripts/process/presentation.rb b/record-and-playback/presentation/scripts/process/presentation.rb index 4a8e140547..d7d594eb83 100755 --- a/record-and-playback/presentation/scripts/process/presentation.rb +++ b/record-and-playback/presentation/scripts/process/presentation.rb @@ -47,10 +47,6 @@ recording_dir = props['recording_dir'] raw_archive_dir = "#{recording_dir}/raw/#{meeting_id}" log_dir = props['log_dir'] -BigBlueButton.logger.info("setting captions dir") -captions_dir = props['captions_dir'] -captions_meeting_dir = "#{captions_dir}/#{meeting_id}" - target_dir = "#{recording_dir}/process/presentation/#{meeting_id}" if not FileTest.directory?(target_dir) FileUtils.mkdir_p "#{log_dir}/presentation" @@ -202,22 +198,11 @@ if not FileTest.directory?(target_dir) FileUtils.cp_r("#{pres_dir}/thumbnails", "#{target_pres_dir}/thumbnails") end - BigBlueButton.logger.info("Copying closed captions") - - captions = JSON.load(File.new("#{captions_meeting_dir}/captions.json")) - captions_json = [] - captions.each do |track| - caption = {} - caption[:localeName] = track['label'] - caption[:locale] = track['lang'] - captions_json << caption - FileUtils.cp("#{captions_meeting_dir}/caption_" + track['lang'] + ".vtt", target_dir) + BigBlueButton.logger.info("Generating closed captions") + ret = BigBlueButton.exec_ret('utils/gen_webvtt', '-i', raw_archive_dir, '-o', target_dir) + if ret != 0 + raise "Generating closed caption files failed" end - - File.open("#{target_dir}/captions.json", "w") do |f| - f.write(captions_json.to_json) - end - captions = JSON.load(File.new("#{target_dir}/captions.json", 'r')) if not presentation_text.empty? diff --git a/record-and-playback/presentation/scripts/publish/presentation.rb b/record-and-playback/presentation/scripts/publish/presentation.rb index 072b2f3d69..f347eb3394 100755 --- a/record-and-playback/presentation/scripts/publish/presentation.rb +++ b/record-and-playback/presentation/scripts/publish/presentation.rb @@ -1185,9 +1185,6 @@ begin $process_dir = "#{recording_dir}/process/presentation/#{$meeting_id}" BigBlueButton.logger.info("setting publish dir") publish_dir = $presentation_props['publish_dir'] - BigBlueButton.logger.info("setting captions dir") - captions_dir = bbb_props['captions_dir'] - captions_meeting_dir = "#{captions_dir}/#{$meeting_id}" BigBlueButton.logger.info("setting playback url info") playback_protocol = bbb_props['playback_protocol'] playback_host = bbb_props['playback_host'] @@ -1228,21 +1225,6 @@ begin BigBlueButton.logger.info("Copied audio.ogg file") end - BigBlueButton.logger.info("Copying caption files to #{target_dir}") - captions = JSON.load(File.new("#{captions_meeting_dir}/captions.json")) - captions_json = [] - captions.each do |track| - caption = {} - caption[:localeName] = track['label'] - caption[:locale] = track['lang'] - captions_json << caption - FileUtils.cp("#{captions_meeting_dir}/caption_" + track['lang'] + ".vtt", target_dir) - end - - File.open("#{target_dir}/captions.json", "w") do |f| - f.write(captions_json.to_json) - end - if File.exist?("#{$process_dir}/captions.json") BigBlueButton.logger.info("Copying caption files") FileUtils.cp("#{$process_dir}/captions.json", package_dir)