Skip to content

Commit

Permalink
upgrade to support bigbluebutton 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fuji246 committed Jun 25, 2017
1 parent 17bb532 commit 9610ff0
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 67 deletions.
5 changes: 3 additions & 2 deletions bbb_django/bbb/local_settings.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# local_settings.py
# Edit this file to customize the private settings

SALT = ""
BBB_API_URL = "http://yourhost/bigbluebutton/api/"
SALT=""
BBB_API_URL = ""

ENABLE_EMAIL_NOTIFICATION = False
EMAIL_HOST = "smtp.youhost.com"
EMAIL_PORT = 25
EMAIL_HOST_USER = ""
Expand Down
2 changes: 1 addition & 1 deletion bbb_django/bbb/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def get_recordings(self, meeting_id=None):
record['end_time'] = session.find('endTime').text
playbacks = session.find('playback')
for f in playbacks.findall('format'):
if f.find('type').text == 'slides':
if f.find('type').text == 'presentation':
record['playback_url'] = f.find('url').text
record['length'] = f.find('length').text
records.append(record)
Expand Down
3 changes: 2 additions & 1 deletion bbb_django/bbb/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ def create_meeting(request):
msg = _('Successfully schdulered meeting %s') % meeting.name
messages.success(request, msg)
join_url = request.build_absolute_uri(reverse('join',args=[meeting.id]))
send_invitation(request, data.get('recipients'), meeting, join_url)
if settings.ENABLE_EMAIL_NOTIFICATION:
send_invitation(request, data.get('recipients'), meeting, join_url)
return HttpResponseRedirect(reverse('meetings'))
'''
try:
Expand Down
120 changes: 60 additions & 60 deletions bbb_django/bigbluebutton.nginx
Original file line number Diff line number Diff line change
Expand Up @@ -6,76 +6,76 @@ server {

# Handle RTMPT (RTMP Tunneling). Forwards requests
# to Red5 on port 5080
location ~ (/open/|/close/|/idle/|/send/) {
proxy_pass http://127.0.0.1:5080;
proxy_redirect off;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
location ~ (/open/|/close/|/idle/|/send/) {
proxy_pass http://127.0.0.1:5080;
proxy_redirect off;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

client_max_body_size 10m;
client_body_buffer_size 128k;
client_max_body_size 10m;
client_body_buffer_size 128k;

proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;

proxy_buffering off;
}
proxy_buffering off;
}

# Handle desktop sharing tunneling. Forwards
# requests to Red5 on port 5080.
location /deskshare {
proxy_pass http://127.0.0.1:5080;
proxy_redirect default;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
include fastcgi_params;
}
# Handle desktop sharing tunneling. Forwards
# requests to Red5 on port 5080.
location /deskshare {
proxy_pass http://127.0.0.1:5080;
proxy_redirect default;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
include fastcgi_params;
}


# BigBlueButton landing page.
#location /bbbdemo {
# alias /var/www/bigbluebutton-default;
# index index.html index.htm;
# expires 1m;
#}
# BigBlueButton landing page.
#location /bbbdemo {
# alias /var/www/bigbluebutton-default;
# index index.html index.htm;
# expires 1m;
#}


location / {
# host and port to fastcgi server
fastcgi_pass 127.0.0.1:9090;
#rewrite "^/bbb_demo/(.*)" / break;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_PROTOCOL $server_protocol;
#fastcgi_param SCRIPT_NAME /bbb_demo;
#fastcgi_param PATH_INFO /login;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_pass_header Authorization;
fastcgi_intercept_errors off;
}
location / {
# host and port to fastcgi server
fastcgi_pass 127.0.0.1:9090;
#rewrite "^/bbb_demo/(.*)" / break;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_PROTOCOL $server_protocol;
#fastcgi_param SCRIPT_NAME /bbb_demo;
#fastcgi_param PATH_INFO /login;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_pass_header Authorization;
fastcgi_intercept_errors off;
}

# Include specific rules for record and playback
include /etc/bigbluebutton/nginx/*.nginx;
# Include specific rules for record and playback
include /etc/bigbluebutton/nginx/*.nginx;

#error_page 404 /404.html;
#error_page 404 /404.html;

# Redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/nginx-default;
}
# Redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/nginx-default;
}
}

8 changes: 6 additions & 2 deletions bbb_django/initial.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/bin/bash
`which python` manage.py syncdb
`which python` manage.py schemamigration bbb --initial
sudo apt-get install language-pack-zh-base
echo 'Please update the "SALT" and "BBB_API_URL" in "bbb/local_settings.py"'
echo 'updating "SALT" and "BBB_API_URL" in "bbb/local_settings.py"'

OUTPUT=(`bbb-conf --salt`)
BBB_API_URL=${OUTPUT[1]}
SALT=${OUTPUT[3]}
sed -i "s|SALT = \"\"|SALT=\"${SALT}\"|g" bbb/local_settings.py
sed -i "s|BBB_API_URL = \"\"|BBB_API_URL = \"${BBB_API_URL}\"|g" bbb/local_settings.py
#use manage.py convert_to_south myapp to convert the old app
4 changes: 3 additions & 1 deletion bbb_django/start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash

sudo kill -9 `cat /var/run/django.pid`
if [ -f /var/run/django.pid ]; then
sudo kill -9 `cat /var/run/django.pid`
fi
sudo `which python` manage.py runfcgi host=127.0.0.1 port=9090 pidfile=/var/run/django.pid minspare=1 maxspare=2

0 comments on commit 9610ff0

Please sign in to comment.