To reduce the Docker image size a seperate build Dockerfile is
introduced. This Docker image produces a tarball of the released and
compiled software which can when be piped into the Dockerfile.run build
process. The result is a minimal image only containing Spreed WebRTC and
the gear to run OpenSSL.
First create the builder image:
```
docker build -t spreed-webrtc-builder -f Dockerfile.build .
```
Next run the builder container, piping its output into the creation of
the runner container:
```
docker run --rm spreed-webrtc-builder | docker build -t spreed-webrtc -f
Dockerfile.run -
```
Afterwards run the container like this:
```
docker run --rm --name my-spreed-webrtc -p 8080:8080 -p 8443:8443 \
-v `pwd`:/srv/extra -i -t spreed-webrtc
```
To avoid issues with existing environment variables while building Go
sources the Makefile now removes existing GOROOT and GOBIN environment
variables. This should fix issues like #324 where the environment
already contains some sort of Go settings.
To use local AMD modules within extra.d plugins, the relative URL for
the global requireJS configuration makes this a bit difficult. To solve
this the following code can be added to plugin files, before the first
define call.
```
require.config({
paths: {
'extra.d': '../../../extra.d',
}
})
define(['./local-module'], function(localModule) { /* ... */ });
```
This change adds this configuration by default, so it is no longer
required to have it in each plugin which want to use './local-module'
syntax in require or define. As all plugins loaded via `extra.d` folder
are inside `extra.d` this automatically means that the URLs are resolved
correctly from the extra.d base URL as defined by the plugin itself.
To allow muliple plugins, sorted plugin load and general extensibility
of the web client, the server now supports to load an extra.d folder on
startup.
Sub folders inside extra.d, are loaded in alphabetic order and searched
for head.html and body.html, making it possible to append additional
html code into the <head> and <body> elements for the web client.
Example:
```
extra.d/
└── my-plugin
├── body.html
├── head.html
└── static
├── css
│ └── my-plugin.css
└── js
└── my-plugin.js
```
Example head.html:
```
<link rel="stylesheet" href="<%.S%>/css/my-plugin.css">
```
Example body.html:
```
<script data-plugin="<%.S%>/js/my-plugin.js"></script>
```
This makes it possible to extend the web client with additional
components and/or overwrite existing.
For source tarballs, the `.git/hooks` folder does not exist, so an error
is shown when running `autogen.sh`. With this change, the hook is not
installed in such cases.
Previously, each user broadcasted the status after a "Room" event was
received. This caused a short time for all other participants where
the buddy list showed "Participant X" instead of the real user name.
When the ICE connection state changes to "disconnected"/"failed",
these calls are marked and get re-called for conferences once the
connection is back and are allowed to send an "Offer" again.
This works in cases where the complete connectivity is lost for one
client while being in a conference once it comes back afterwards
for him.
Doesn't work reliably on Firefox as no "disconnected"/"failed" is
triggered there.
Removed difference between single peer-to-peer calls and conferences
with multiple peers. There is only a single code path now that creates
calls and stores them in a conference (which holds all active calls).
With this also fixed some timing issues that could cause conference
peers to not send or receive media streams.
Should help with some of the issues reported in #276.