Reverted rap scripts for presentation

This commit is contained in:
Fred Dixon 2019-06-13 19:34:35 -05:00
parent bf2e222027
commit 6d0f778e84
3 changed files with 5 additions and 38 deletions

View File

@ -1 +1 @@
BIGBLUEBUTTON_RELEASE=2.2.0-beta-10
BIGBLUEBUTTON_RELEASE=2.2.0-beta-11

View File

@ -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?

View File

@ -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)