Skip to content

Commit

Permalink
Merge branch 'v2.2.x-release' of github.com:bigbluebutton/bigbluebutt…
Browse files Browse the repository at this point in the history
…on into merge-2.2-into-2.3-july-6
  • Loading branch information
antobinary committed Jul 7, 2020
2 parents 420f8bf + a6eda3d commit b0e1dc8
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 14 deletions.
9 changes: 6 additions & 3 deletions bbb-webhooks/callback_emitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ module.exports = class CallbackEmitter extends EventEmitter {
}

_emitMessage(callback) {
let data,requestOptions;
let data, requestOptions;
const serverDomain = config.get("bbb.serverDomain");
const sharedSecret = config.get("bbb.sharedSecret");
const bearerAuth = config.get("bbb.auth2_0");
const timeout = config.get('hooks.requestTimeout');

// data to be sent
// note: keep keys in alphabetical order
Expand All @@ -85,7 +86,8 @@ module.exports = class CallbackEmitter extends EventEmitter {
form: data,
auth: {
bearer: sharedSecret
}
},
timeout
};
}
else {
Expand All @@ -103,7 +105,8 @@ module.exports = class CallbackEmitter extends EventEmitter {
maxRedirects: 10,
uri: callbackURL,
method: "POST",
form: data
form: data,
timeout
};
}

Expand Down
3 changes: 3 additions & 0 deletions bbb-webhooks/config/custom-environment-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ hooks:
permanentURLs:
__name: PERMANENT_HOOKS
__format: json
requestTimeout:
__name: REQUEST_TIMEOUT
__format: json
redis:
host: REDIS_HOST
port: REDIS_PORT
4 changes: 3 additions & 1 deletion bbb-webhooks/config/default.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ hooks:
- 60000
# Reset permanent interval when exceeding maximum attemps
permanentIntervalReset: 8
# Hook's request module timeout for socket conn establishment and/or responses (ms)
requestTimeout: 5000

# Mappings of internal to external meeting IDs
mappings:
Expand All @@ -64,4 +66,4 @@ redis:
mappingPrefix: bigbluebutton:webhooks:mapping
eventsPrefix: bigbluebutton:webhooks:events
userMaps: bigbluebutton:webhooks:userMaps
userMapPrefix: bigbluebutton:webhooks:userMap
userMapPrefix: bigbluebutton:webhooks:userMap
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ def self.get_num_participants(events)
userId = joinEvent.at_xpath("userId").text

#removing "_N" at the end of userId
userId.gsub(/_\d*$/, "")
userId.gsub!(/_\d*$/, "")

participants_ids.add(userId)
end
return participants_ids.length
participants_ids.length
end

# Get the meeting metadata
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
end

# Copy thumbnails from raw files
FileUtils.cp_r("#{pres_dir}/thumbnails", "#{target_pres_dir}/thumbnails")
FileUtils.cp_r("#{pres_dir}/thumbnails", "#{target_pres_dir}/thumbnails") if File.exist?("#{pres_dir}/thumbnails")
end

BigBlueButton.logger.info("Generating closed captions")
Expand Down
17 changes: 10 additions & 7 deletions record-and-playback/presentation/scripts/publish/presentation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -805,17 +805,20 @@ def events_get_image_info(slide)
slide[:text] = "presentation/#{slide[:presentation]}/textfiles/slide-#{slide[:slide] + 1}.txt"
end
image_path = "#{$process_dir}/#{slide[:src]}"
if !File.exist?(image_path)

unless File.exist?(image_path)
BigBlueButton.logger.warn("Missing image file #{image_path}!")
# Emergency last-ditch blank image creation
FileUtils.mkdir_p(File.dirname(image_path))
if slide[:deskshare]
command = "convert -size #{$presentation_props['deskshare_output_width']}x#{$presentation_props['deskshare_output_height']} xc:transparent -background transparent #{image_path}"
else
command = "convert -size 1600x1200 xc:transparent -background transparent -quality 90 +dither -depth 8 -colors 256 #{image_path}"
end
BigBlueButton.execute(command)
command = \
if slide[:deskshare]
['convert', '-size', "#{$presentation_props['deskshare_output_width']}x#{$presentation_props['deskshare_output_height']}", 'xc:transparent', '-background', 'transparent', image_path]
else
['convert', '-size', '1600x1200', 'xc:transparent', '-background', 'transparent', '-quality', '90', '+dither', '-depth', '8', '-colors', '256', image_path]
end
BigBlueButton.exec_ret(*command) || raise("Unable to generate blank image for #{image_path}")
end

slide[:width], slide[:height] = FastImage.size(image_path)
BigBlueButton.logger.info("Image size is #{slide[:width]}x#{slide[:height]}")
end
Expand Down

0 comments on commit b0e1dc8

Please sign in to comment.