Merge branch 'master' into refactor-chat-client

This commit is contained in:
Richard Alam 2011-12-07 21:52:17 +00:00
commit 9224107ec2
8 changed files with 46 additions and 51 deletions

View File

@ -31,6 +31,7 @@
uri="rtmp://HOST/bigbluebutton"
recordingHost="http://HOST"
windowVisible="true"
position="bottom-left"
/>
<module name="DeskShareModule"

View File

@ -33,6 +33,7 @@
public static const TOP_2_3:String = "top-two-thirds";
public static const BOTTOM_1_3:String = "bottom-one-third";
public static const BOTTOM_1_3_RIGHT:String = "bottom-one-third-right";
public static const TOP_LEFT:String = "top-left";
public static const BOTTOM_LEFT:String = "bottom-left";
public static const MIDDLE:String = "middle";
@ -109,9 +110,15 @@
case BOTTOM_1_3:
x = 1;
y = (this.height/3) * 2 + 2;
win.width = this.width;
win.width = this.width - leftWindowWidth;
win.height = (this.height/3) - 2;
break
break;
case BOTTOM_1_3_RIGHT:
x = this.width - leftWindowWidth;
y = (this.height/3) * 2 + 2;
win.width = leftWindowWidth;
win.height = (this.height/3) - 2;
break;
case TOP_LEFT:
x = 1;
y = 1;

View File

@ -28,8 +28,7 @@ package org.bigbluebutton.modules.listeners.managers
import org.bigbluebutton.modules.listeners.views.ListenersWindow;
public class ListenersManager
{
{
private var dispatcher:Dispatcher;
private var listenersWindow:ListenersWindow;
@ -38,16 +37,11 @@ package org.bigbluebutton.modules.listeners.managers
public function ListenersManager(){
dispatcher = new Dispatcher();
listenerOptions = new ListenerOptions();
var vxml:XML = BBB.getConfigForModule("ListenersModule");
if (vxml != null) {
listenerOptions.windowVisible = (vxml.@windowVisible.toString().toUpperCase() == "TRUE") ? true : false;
}
}
public function moduleStarted(event:StartListenersModuleEvent):void{
if (listenersWindow == null){
listenerOptions = new ListenerOptions();
listenersWindow = new ListenersWindow();
listenersWindow.listenerOptions = listenerOptions;

View File

@ -1,12 +1,24 @@
package org.bigbluebutton.modules.listeners.model
{
import org.bigbluebutton.core.BBB;
public class ListenerOptions
{
[Bindable]
public var windowVisible:Boolean = true;
[Bindable]
public var position:String = "bottom-left";
public function ListenerOptions()
{
var vxml:XML = BBB.getConfigForModule("ListenersModule");
if (vxml != null) {
windowVisible = (vxml.@windowVisible.toString().toUpperCase() == "TRUE") ? true : false;
}
if (vxml.@position != undefined) {
position = vxml.@position.toString();
}
}
}

View File

@ -115,7 +115,7 @@
}
public function getPrefferedPosition():String{
return MainCanvas.BOTTOM_LEFT;
return listenerOptions.position;
}
public function setMuteState(mute:Boolean):void{
@ -204,7 +204,7 @@
<mx:ControlBar width="100%">
<flc:CanvasButton id="pushToTalkBtn" visible="{showPushToTalkBtn}"
toolTip="{UserManager.getInstance().getConference().voiceMuted ? ResourceUtil.getInstance().getString('bbb.listeners.pushToTalk.toolTip') : ResourceUtil.getInstance().getString('bbb.listeners.pushToMute.toolTip')}"
click="toggleMuteMeState()" width="60" height="30">
click="toggleMuteMeState()" height="30" maxWidth="180">
<mx:HBox verticalAlign="middle" horizontalGap="0" paddingLeft="5" paddingTop="5" paddingRight="5" paddingBottom="5">
<mx:Image source="{UserManager.getInstance().getConference().voiceMuted ? images.sound_mute : images.sound_none}" />
<mx:Label text="{UserManager.getInstance().getConference().voiceMuted ? ResourceUtil.getInstance().getString('bbb.listeners.talk') : ResourceUtil.getInstance().getString('bbb.listeners.mute')}" />

View File

@ -119,11 +119,15 @@ package org.bigbluebutton.util.i18n
public function setPreferredLocale(locale:String):void {
LogUtil.debug("Setting up preferred locale " + locale);
if (isPreferredLocaleAvailable(preferredLocale)) {
LogUtil.debug("The locale " + preferredLocale + " is available");
preferredLocale = locale;
localeIndex = getIndexForLocale(preferredLocale);
LogUtil.debug("Setting up preferred locale index " + localeIndex);
changeLocale(preferredLocale);
}else{
LogUtil.debug("The locale " + preferredLocale + " isn't available. Default will be: " + MASTER_LOCALE);
preferredLocale = MASTER_LOCALE;
}
localeIndex = getIndexForLocale(preferredLocale);
LogUtil.debug("Setting up preferred locale index " + localeIndex);
changeLocale(preferredLocale);
}
private function loadMasterLocale(locale:String):void {

View File

@ -65,7 +65,18 @@ module BigBlueButton
xml.event(:timestamp => res[TIMESTAMP], :module => res[MODULE], :eventname => res[EVENTNAME]) {
res.each do |key, val|
if not [TIMESTAMP, MODULE, EVENTNAME, MEETINGID].include?(key)
xml.method_missing(key, val)
# a temporary solution for enable a good display of the xml in the presentation module and for add CDATA to chat
if res[MODULE] == "PRESENTATION" && key == "slidesInfo"
xml.method_missing(key){
xml << val
}
elsif res[MODULE] == "CHAT" && res[EVENTNAME] == "PublicChatEvent" && key == "message"
xml.method_missing(key){
xml.cdata!(val)
}
else
xml.method_missing(key, val)
end
end
end
}

View File

@ -122,39 +122,5 @@ if (playback == "slides")
end
FileUtils.cp_r(package_dir, publish_dir)
# Create index.html
dir_list = Dir.entries(publish_dir) - ['.', '..']
recordings = []
dir_list.each do |d|
if File::directory?("#{publish_dir}/#{d}")
rec_time = File.ctime("#{publish_dir}/#{d}")
play_link = "http://#{playback_host}/playback/slides/playback.html?meetingId=#{d}"
metadata = BigBlueButton::Events.get_meeting_metadata("#{publish_dir}/#{d}/events.xml")
recordings << {:rec_time => rec_time, :link => play_link, :title => metadata['title'].nil? ? metadata['meetingId'] : metadata['title']}
end
end
b = Builder::XmlMarkup.new(:indent => 2)
html = b.html {
b.head {
b.title "Slides Playback Recordings"
}
b.body {
b.h1 "Slides Playback Recordings"
recordings.each do |r|
b.p { |y|
y << r[:rec_time].to_s
b.a({:href => r[:link]}, r[:title])
}
end
}
}
index_html = File.new("#{publish_dir}/index.html","w")
index_html.write(html)
index_html.close
File.chmod(0644, "#{publish_dir}/index.html")
end
end