Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 7 additions & 40 deletions _posts/2.5/2021-09-22-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,56 +321,23 @@ You can deploy locally your modified version of the HTML5 client source using th

When you are running bbb-html5 from package (i.e. in production mode) NginX needs to be able to point client sessions to a bbb-html5-frontend instance from the pool. However, in development mode (i.e. running Meteor via `npm start`), we only have one process, rather than a pool. We need to tweak the NginX configuration so that client sessions are only pointed to port `4100` where Meteor is running.

You would want to make a change in `/etc/bigbluebutton/nginx/bbb-html5.nginx` to use 4100 port rather than the pool.

The default - used for production mode:

```
location ~ ^/html5client/ {
# proxy_pass http://127.0.0.1:4100; # use for development
proxy_pass http://poolhtml5servers; # use for production
...
```

Development mode, only port 4100 is used.

```
location ~ ^/html5client/ {
proxy_pass http://127.0.0.1:4100; # use for development
# proxy_pass http://poolhtml5servers; # use for production
...
```

After this change, reload NginX's configuration with `sudo systemctl reload nginx`

A symptom of running `npm start` with the incompatible `poolhtml5servers` NginX configuration is seeing `It looks like you are trying to access MongoDB over HTTP on the native driver port.` and `Uncaught SyntaxError: Unexpected Identifier`

When you switch back to running the `bbb-html5` packaged version you would want to revert your change so the `poolhtml5servers` are used for spreading the load of the client sessions.

### Switch NginX static resource requests to Meteor

Locales requests are served by NginX by default, but you may want to disable that feature in development mode (if you want to be able to edit the files located in `/public/locales` and see the changes being applied).

You would want to make a change in `/etc/bigbluebutton/nginx/bbb-html5.nginx` in the lines related to locales.

The default - used for production mode (locales files will be served by NginX):
Locales requests are also served by NginX by default, so you need to disable that feature in development mode in order to edit the files located in `/public/locales` and see the changes being applied.

To enable development mode:
```
location /html5client/locales {
alias /usr/share/meteor/bundle/programs/web.browser/app/locales;
}
cd ~/dev/bigbluebutton/bigbluebutton-html5
./set-nginx-mode.sh
```

Development mode (locales files will be served by Meteor):
When you switch back to running the `bbb-html5` packaged version you would want to revert your change, by running the script with the optional parameter `-m` set to `prod`:

```
#location /html5client/locales {
# alias /usr/share/meteor/bundle/programs/web.browser/app/locales;
#}
cd ~/dev/bigbluebutton/bigbluebutton-html5
./set-nginx-mode.sh -m prod
```

After this change, reload NginX's configuration with `sudo systemctl reload nginx`

## Audio configuration for development environment

You may see the error "Call timeout (Error 1006)" during the microphone echo test after starting the developing HTML5 client by "npm start". A misconfiguration of Freeswitch may account for it, especially when BigBlueButton is set up with bbb-install.sh script. Try changing "sipjsHackViaWs" true in bigbluebutton-html5/private/config/settings.yml.
Expand Down