Compare commits
287 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
288fbff677 | ||
|
|
bdca07be17 | ||
|
|
5f48e4cf9d | ||
|
|
bff9648abc | ||
|
|
7874e09a7e | ||
|
|
311df7ec7f | ||
|
|
93648f361b | ||
|
|
8380a7bb9d | ||
|
|
a6c8d0787a | ||
|
|
3f9b220ee9 | ||
|
|
15db9ca7e4 | ||
|
|
224dff7481 | ||
|
|
643b2024c0 | ||
|
|
f378d43e31 | ||
|
|
23f1dc174e | ||
|
|
b038d276c9 | ||
|
|
797036e888 | ||
|
|
a426b65969 | ||
|
|
1d57cb9dae | ||
|
|
be64bd883c | ||
|
|
497c60375c | ||
|
|
7f616fc823 | ||
|
|
8a4c341512 | ||
|
|
c65343b2c5 | ||
|
|
d0efa6a77b | ||
|
|
01deadf078 | ||
|
|
6eaa3cd45d | ||
|
|
b0d2a79873 | ||
|
|
d94f001f25 | ||
|
|
afb85e2fd9 | ||
|
|
fffb5801c5 | ||
|
|
d81cd20ee6 | ||
|
|
3e7a9228bc | ||
|
|
835e199135 | ||
|
|
1d660e1883 | ||
|
|
5746261961 | ||
|
|
cbeae8eb30 | ||
|
|
95b2752d2a | ||
|
|
e3da472e7a | ||
|
|
43f60ca336 | ||
|
|
118a61c416 | ||
|
|
bf99a129bd | ||
|
|
fb6ad8cffd | ||
|
|
21fef57bc4 | ||
|
|
777422c87d | ||
|
|
ee6fd63c25 | ||
|
|
b9f00b71b2 | ||
|
|
099e3340bc | ||
|
|
172c2d3d71 | ||
|
|
854c8e5f2f | ||
|
|
b2cff193a9 | ||
|
|
ad1772178d | ||
|
|
0959b3d5b8 | ||
|
|
36f91f7f1e | ||
|
|
2c9d0606c3 | ||
|
|
1ce22fb8c9 | ||
|
|
e0cba855a6 | ||
|
|
8af3a65d37 | ||
|
|
667f67376e | ||
|
|
ce7b6be024 | ||
|
|
57cd2647f3 | ||
|
|
efcfe99707 | ||
|
|
cc1ad1bc13 | ||
|
|
29f06829e7 | ||
|
|
0fdf5e0102 | ||
|
|
5b7083f5f7 | ||
|
|
adb1c572ed | ||
|
|
5d17cd0bcc | ||
|
|
134d89a3d6 | ||
|
|
0efcbdcd37 | ||
|
|
878713a15d | ||
|
|
e01713f6f8 | ||
|
|
b6155c04ad | ||
|
|
8075d0a0fd | ||
|
|
029851fe3f | ||
|
|
886fb2ac43 | ||
|
|
99b1a51df0 | ||
|
|
795ec24246 | ||
|
|
ecf9c6fc6b | ||
|
|
68bc819b89 | ||
|
|
80c5779de9 | ||
|
|
d175dfdef7 | ||
|
|
93c13f5a11 | ||
|
|
ff8b880948 | ||
|
|
5b550c8a5b | ||
|
|
ce7d3c5c81 | ||
|
|
c99350308c | ||
|
|
e98c8ada6a | ||
|
|
ce8aa961ea | ||
|
|
fbd08ba3a6 | ||
|
|
61594cb877 | ||
|
|
520e655100 | ||
|
|
58d1697b00 | ||
|
|
f902b99287 | ||
|
|
d25a9b0e41 | ||
|
|
0e0f7d7ccb | ||
|
|
58cc21d417 | ||
|
|
8ac44491d0 | ||
|
|
a093b455b3 | ||
|
|
58494d45db | ||
|
|
f98621173f | ||
|
|
dbcfc92dc4 | ||
|
|
b9bd1d599b | ||
|
|
99b0be91ed | ||
|
|
f2ae29d8e4 | ||
|
|
4c3d415a07 | ||
|
|
7b65798758 | ||
|
|
c1c5a305c6 | ||
|
|
291211c029 | ||
|
|
a3a9e8d951 | ||
|
|
3a0ee11ccd | ||
|
|
2568b07075 | ||
|
|
e5fa02a1d4 | ||
|
|
fb5550bc38 | ||
|
|
bc5565251c | ||
|
|
4f548ce748 | ||
|
|
0faeb450c0 | ||
|
|
e12ffd7a24 | ||
|
|
d4c78617a7 | ||
|
|
db2296953d | ||
|
|
cd19c0e9e3 | ||
|
|
44e558e5a0 | ||
|
|
0da2547360 | ||
|
|
f3274ea42e | ||
|
|
0848283f6d | ||
|
|
6e99286bd0 | ||
|
|
588c2d9e4b | ||
|
|
7c201573fb | ||
|
|
581ffec5ed | ||
|
|
c296940fd4 | ||
|
|
f48633fa1d | ||
|
|
66a53c7dc0 | ||
|
|
09f53c6b21 | ||
|
|
b3a17040e5 | ||
|
|
774a7b41e4 | ||
|
|
062e671290 | ||
|
|
90d979b69d | ||
|
|
9d50084b98 | ||
|
|
e1d71a41f7 | ||
|
|
e781eb6423 | ||
|
|
15f4f03ba3 | ||
|
|
4f9b6f7180 | ||
|
|
b36ec5fd01 | ||
|
|
ac95ea03fe | ||
|
|
ae535fcb7d | ||
|
|
957cc6afc1 | ||
|
|
16fdd59617 | ||
|
|
fabf8f42c6 | ||
|
|
c98a56dc37 | ||
|
|
deb68dd420 | ||
|
|
0fd1a7fa08 | ||
|
|
c6ff8aa5dd | ||
|
|
06f025e92a | ||
|
|
f14329f2cd | ||
|
|
53e525597a | ||
|
|
54b3cbcf94 | ||
|
|
2852740e71 | ||
|
|
5322ba086b | ||
|
|
d2f95f3c81 | ||
|
|
3747251821 | ||
|
|
159ba82167 | ||
|
|
e34a8e6b60 | ||
|
|
17a6e360a2 | ||
|
|
b690f5d4a1 | ||
|
|
30f3168bf7 | ||
|
|
115f2e4663 | ||
|
|
fa15a75928 | ||
|
|
4db75446f3 | ||
|
|
d9f7b8b6cc | ||
|
|
05bbfda5bb | ||
|
|
e465b3ed90 | ||
|
|
1825f47ef2 | ||
|
|
169d613ac4 | ||
|
|
3dac5eeff5 | ||
|
|
f79651f806 | ||
|
|
6048d0a325 | ||
|
|
6f12446c99 | ||
|
|
af682f8727 | ||
|
|
9123923818 | ||
|
|
aee7a8e1bd | ||
|
|
5b44edb3cc | ||
|
|
806d4ea443 | ||
|
|
1e35ca5e4d | ||
|
|
d4f00d76ab | ||
|
|
37282e63b3 | ||
|
|
4b218499ae | ||
|
|
f16a1cdf44 | ||
|
|
702f02568d | ||
|
|
b6808d87bc | ||
|
|
8042bd2aa6 | ||
|
|
053b2d5af2 | ||
|
|
222164333b | ||
|
|
db50810e4b | ||
|
|
720851dcb9 | ||
|
|
d7203b8b1a | ||
|
|
204ca29ed7 | ||
|
|
fdada53a4a | ||
|
|
81eb3754a0 | ||
|
|
d260f1db61 | ||
|
|
74f078f166 | ||
|
|
e16cee4187 | ||
|
|
a904e35c67 | ||
|
|
b87cd9f842 | ||
|
|
fed34e7671 | ||
|
|
ed57f72117 | ||
|
|
4d39d4ccc3 | ||
|
|
79cdd94833 | ||
|
|
e0645b41d3 | ||
|
|
aa7f0c8a0b | ||
|
|
2362770cce | ||
|
|
8334036cf4 | ||
|
|
eec513e9e3 | ||
|
|
f2a7a43ba7 | ||
|
|
9e6e23ce97 | ||
|
|
61bbbaf6eb | ||
|
|
3519a6ec7b | ||
|
|
d21f994eee | ||
|
|
b32acf0dfb | ||
|
|
71a56e13d9 | ||
|
|
0f6d0a0439 | ||
|
|
3032ea7684 | ||
|
|
04cfbafc33 | ||
|
|
57fcee676a | ||
|
|
2f5d090ca5 | ||
|
|
8d796f328b | ||
|
|
ffb1d6ea17 | ||
|
|
4447e5dac6 | ||
|
|
dbed14db5e | ||
|
|
254103e21f | ||
|
|
d0b39e1c97 | ||
|
|
4bb555e4b2 | ||
|
|
8d0ee3ded9 | ||
|
|
98d1ca8505 | ||
|
|
e766bad4ce | ||
|
|
9eb2873cfa | ||
|
|
c7e2331284 | ||
|
|
02ca5e5732 | ||
|
|
bc2d72638b | ||
|
|
40de181959 | ||
|
|
70bc071cb8 | ||
|
|
567ac23c2c | ||
|
|
af50bd5b94 | ||
|
|
899f0ee83d | ||
|
|
29b3ea07e0 | ||
|
|
c0a316c7df | ||
|
|
f624833f1f | ||
|
|
4c661ffca6 | ||
|
|
0819f23049 | ||
|
|
1e9a463245 | ||
|
|
447d8f5677 | ||
|
|
d2453b1f1f | ||
|
|
9460138cc3 | ||
|
|
0063461858 | ||
|
|
248d7a3173 | ||
|
|
51277270fe | ||
|
|
394738394d | ||
|
|
6c4a5bd2bc | ||
|
|
6347730dc7 | ||
|
|
3da8e39745 | ||
|
|
f4acf97b00 | ||
|
|
e4e66a03d7 | ||
|
|
ed78c0053c | ||
|
|
398fd18b8e | ||
|
|
d3003d4fcd | ||
|
|
ee94eca733 | ||
|
|
0696fb2c5a | ||
|
|
e6fbb0934e | ||
|
|
faaf24d3c4 | ||
|
|
fcf785f32c | ||
|
|
0508628871 | ||
|
|
27502d3fa8 | ||
|
|
1057ff36cd | ||
|
|
8d5e50c0ca | ||
|
|
8db602c8bd | ||
|
|
06494cf821 | ||
|
|
0fe6a55700 | ||
|
|
e20274c2f7 | ||
|
|
b77106f61a | ||
|
|
4d25b139cc | ||
|
|
6ce48a5b7b | ||
|
|
69b0e2ad32 | ||
|
|
cd0c9393d8 | ||
|
|
2494444ca4 | ||
|
|
c76b78eb46 | ||
|
|
78fcc8b72c | ||
|
|
652412cd4f | ||
|
|
78801aa9e5 |
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.bundle.js -text -diff
|
||||
4
.gitignore
vendored
@@ -1 +1,5 @@
|
||||
node_modules
|
||||
*.swp
|
||||
.idea/
|
||||
*.iml
|
||||
.*.tmp
|
||||
|
||||
26
Makefile
@@ -1,22 +1,24 @@
|
||||
NPM = npm
|
||||
BROWSERIFY = browserify
|
||||
GLOBAL_FLAGS = -e
|
||||
MODULE_DIR = modules
|
||||
MODULE_SUBDIRS = $(wildcard $(MODULE_DIR)/*/)
|
||||
MODULES = $(MODULE_SUBDIRS:$(MODULE_DIR)/%/=%)
|
||||
GLOBAL_FLAGS = -x jquery -e
|
||||
OUTPUT_DIR = .
|
||||
DEPLOY_DIR = libs/modules
|
||||
DEPLOY_DIR = libs
|
||||
|
||||
all:FLAGS = $(GLOBAL_FLAGS)
|
||||
all:$(MODULES)
|
||||
all: compile deploy clean
|
||||
|
||||
debug:FLAGS = -d $(GLOBAL_FLAGS)
|
||||
debug:$(MODULES)
|
||||
compile:FLAGS = $(GLOBAL_FLAGS)
|
||||
compile: app
|
||||
|
||||
$(MODULES): *.js
|
||||
$(BROWSERIFY) $(FLAGS) $(MODULE_DIR)/$@/$@.js -s $@ -o $(OUTPUT_DIR)/$@.bundle.js
|
||||
debug: compile-debug deploy clean
|
||||
|
||||
compile-debug:FLAGS = -d $(GLOBAL_FLAGS)
|
||||
compile-debug: app
|
||||
|
||||
app:
|
||||
$(NPM) update && $(BROWSERIFY) $(FLAGS) app.js -s APP -o $(OUTPUT_DIR)/app.bundle.js
|
||||
|
||||
clean:
|
||||
@rm -f $(OUTPUT_DIR)/*.bundle.js
|
||||
|
||||
deploy:
|
||||
@mkdir -p $(DEPLOY_DIR) && cp $(OUTPUT_DIR)/*.bundle.js $(DEPLOY_DIR)
|
||||
@mkdir -p $(DEPLOY_DIR) && cp $(OUTPUT_DIR)/*.bundle.js $(DEPLOY_DIR) && ./bump-js-versions.sh
|
||||
|
||||
17
README.md
@@ -10,12 +10,25 @@ Jitsi Meet allows for very efficient collaboration. It allows users to stream th
|
||||
|
||||
Installing Jitsi Meet is quite a simple experience. For Debian-based systems, we recommend following the [quick-install](https://github.com/jitsi/jitsi-meet/blob/master/doc/quick-install.md) document, which uses the package system.
|
||||
|
||||
For other systems, or if you wish to install all components manually, see the [detailed installation instructions](https://github.com/jitsi/jitsi-meet/blob/master/doc/manual-install.md).
|
||||
For other systems, or if you wish to install all components manually, see the [detailed manual installation instructions](https://github.com/jitsi/jitsi-meet/blob/master/doc/manual-install.md).
|
||||
|
||||
## Development tools
|
||||
## Building the sources
|
||||
|
||||
Jitsi Meet uses [Browserify](http://browserify.org). If you want to make changes in the code you need to [install Browserify](http://browserify.org/#install). Browserify requires [nodejs](http://nodejs.org).
|
||||
|
||||
On Debian/Ubuntu systems, the required packages can be installed with:
|
||||
```
|
||||
sudo apt-get install npm
|
||||
sudo npm install -g browserify
|
||||
cd jitsi-meet
|
||||
npm install
|
||||
```
|
||||
|
||||
To build the Jitsi Meet application, just type
|
||||
```
|
||||
make
|
||||
```
|
||||
|
||||
## Discuss
|
||||
Please use the [Jitsi dev mailing list](http://lists.jitsi.org/pipermail/dev/) to discuss feature requests before opening an issue on github.
|
||||
|
||||
|
||||
202
api_connector.js
@@ -1,202 +0,0 @@
|
||||
/**
|
||||
* Implements API class that communicates with external api class
|
||||
* and provides interface to access Jitsi Meet features by external
|
||||
* applications that embed Jitsi Meet
|
||||
*/
|
||||
var APIConnector = (function () {
|
||||
|
||||
function APIConnector() { }
|
||||
|
||||
/**
|
||||
* List of the available commands.
|
||||
* @type {{
|
||||
* displayName: inputDisplayNameHandler,
|
||||
* muteAudio: toggleAudio,
|
||||
* muteVideo: toggleVideo,
|
||||
* filmStrip: toggleFilmStrip
|
||||
* }}
|
||||
*/
|
||||
var commands =
|
||||
{
|
||||
displayName: VideoLayout.inputDisplayNameHandler,
|
||||
muteAudio: toggleAudio,
|
||||
muteVideo: toggleVideo,
|
||||
toggleFilmStrip: BottomToolbar.toggleFilmStrip,
|
||||
toggleChat: BottomToolbar.toggleChat,
|
||||
toggleContactList: BottomToolbar.toggleContactList
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Maps the supported events and their status
|
||||
* (true it the event is enabled and false if it is disabled)
|
||||
* @type {{
|
||||
* incomingMessage: boolean,
|
||||
* outgoingMessage: boolean,
|
||||
* displayNameChange: boolean,
|
||||
* participantJoined: boolean,
|
||||
* participantLeft: boolean
|
||||
* }}
|
||||
*/
|
||||
var events =
|
||||
{
|
||||
incomingMessage: false,
|
||||
outgoingMessage:false,
|
||||
displayNameChange: false,
|
||||
participantJoined: false,
|
||||
participantLeft: false
|
||||
};
|
||||
|
||||
/**
|
||||
* Check whether the API should be enabled or not.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
APIConnector.isEnabled = function () {
|
||||
var hash = location.hash;
|
||||
if(hash && hash.indexOf("external") > -1 && window.postMessage)
|
||||
return true;
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Initializes the APIConnector. Setups message event listeners that will
|
||||
* receive information from external applications that embed Jitsi Meet.
|
||||
* It also sends a message to the external application that APIConnector
|
||||
* is initialized.
|
||||
*/
|
||||
APIConnector.init = function () {
|
||||
if (window.addEventListener)
|
||||
{
|
||||
window.addEventListener('message',
|
||||
APIConnector.processMessage, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
window.attachEvent('onmessage', APIConnector.processMessage);
|
||||
}
|
||||
APIConnector.sendMessage({type: "system", loaded: true});
|
||||
};
|
||||
|
||||
/**
|
||||
* Sends message to the external application.
|
||||
* @param object
|
||||
*/
|
||||
APIConnector.sendMessage = function (object) {
|
||||
window.parent.postMessage(JSON.stringify(object), "*");
|
||||
};
|
||||
|
||||
/**
|
||||
* Processes a message event from the external application
|
||||
* @param event the message event
|
||||
*/
|
||||
APIConnector.processMessage = function(event)
|
||||
{
|
||||
var message;
|
||||
try {
|
||||
message = JSON.parse(event.data);
|
||||
} catch (e) {}
|
||||
|
||||
if(!message.type)
|
||||
return;
|
||||
switch (message.type)
|
||||
{
|
||||
case "command":
|
||||
APIConnector.processCommand(message);
|
||||
break;
|
||||
case "event":
|
||||
APIConnector.processEvent(message);
|
||||
break;
|
||||
default:
|
||||
console.error("Unknown type of the message");
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Processes commands from external applicaiton.
|
||||
* @param message the object with the command
|
||||
*/
|
||||
APIConnector.processCommand = function (message)
|
||||
{
|
||||
if(message.action != "execute")
|
||||
{
|
||||
console.error("Unknown action of the message");
|
||||
return;
|
||||
}
|
||||
for(var key in message)
|
||||
{
|
||||
if(commands[key])
|
||||
commands[key].apply(null, message[key]);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Processes events objects from external applications
|
||||
* @param event the event
|
||||
*/
|
||||
APIConnector.processEvent = function (event) {
|
||||
if(!event.action)
|
||||
{
|
||||
console.error("Event with no action is received.");
|
||||
return;
|
||||
}
|
||||
|
||||
switch(event.action)
|
||||
{
|
||||
case "add":
|
||||
for(var i = 0; i < event.events.length; i++)
|
||||
{
|
||||
events[event.events[i]] = true;
|
||||
}
|
||||
break;
|
||||
case "remove":
|
||||
for(var i = 0; i < event.events.length; i++)
|
||||
{
|
||||
events[event.events[i]] = false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
console.error("Unknown action for event.");
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks whether the event is enabled ot not.
|
||||
* @param name the name of the event.
|
||||
* @returns {*}
|
||||
*/
|
||||
APIConnector.isEventEnabled = function (name) {
|
||||
return events[name];
|
||||
};
|
||||
|
||||
/**
|
||||
* Sends event object to the external application that has been subscribed
|
||||
* for that event.
|
||||
* @param name the name event
|
||||
* @param object data associated with the event
|
||||
*/
|
||||
APIConnector.triggerEvent = function (name, object) {
|
||||
APIConnector.sendMessage({
|
||||
type: "event", action: "result", event: name, result: object});
|
||||
};
|
||||
|
||||
/**
|
||||
* Removes the listeners.
|
||||
*/
|
||||
APIConnector.dispose = function () {
|
||||
if(window.removeEventListener)
|
||||
{
|
||||
window.removeEventListener("message",
|
||||
APIConnector.processMessage, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
window.detachEvent('onmessage', APIConnector.processMessage);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
return APIConnector;
|
||||
})();
|
||||
34
bump-js-versions.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
if ! which git > /dev/null 2>&1 ;then
|
||||
echo "Cannot find git executable, not bumping js versions."
|
||||
exit
|
||||
fi
|
||||
if ! git status > /dev/null 2>&1 ;then
|
||||
echo "Not a git repository, not bumping js versions."
|
||||
exit
|
||||
fi
|
||||
|
||||
# This script finds all js files included from index.html which have been
|
||||
# modified and bumps their version (the value of the "v" parameter used
|
||||
# in index.html)
|
||||
|
||||
# contents of index.html at HEAD (excluding not-committed changes)
|
||||
index=`git show HEAD:index.html`
|
||||
|
||||
# js files included from index.html. The sort needed for comm
|
||||
jsfiles=.bump-js-versions-jsfiles.tmp
|
||||
echo "$index" | grep '<script src=".*"' -o | sed -e 's/<script src="//' | sed -e 's/\?.*//' | tr -d \" | sort > $jsfiles
|
||||
|
||||
# modified files since the last commit
|
||||
gitmodified=.bump-js-versions-gitmodified.tmp
|
||||
git ls-files -m | sort > $gitmodified
|
||||
|
||||
for file in `comm -12 $jsfiles $gitmodified` ;do
|
||||
old_version=`echo "$index" | grep "<script src=\"${file}?v=[0-9]*" -o | sed -e 's/.*v=//'| tr -d \"`
|
||||
new_version=$((1+$old_version))
|
||||
echo Bumping version of $file from $old_version to $new_version
|
||||
sed -i.tmp -e "s%script src=\"${file}\?v=.*\"%script src=\"$file?v=$new_version\"%" index.html
|
||||
done
|
||||
|
||||
rm -f $jsfiles $gitmodified index.html.tmp
|
||||
343
chat.js
@@ -1,343 +0,0 @@
|
||||
/* global $, Util, connection, nickname:true, getVideoSize, getVideoPosition, showToolbar, processReplacements */
|
||||
/**
|
||||
* Chat related user interface.
|
||||
*/
|
||||
var Chat = (function (my) {
|
||||
var notificationInterval = false;
|
||||
var unreadMessages = 0;
|
||||
|
||||
/**
|
||||
* Initializes chat related interface.
|
||||
*/
|
||||
my.init = function () {
|
||||
var storedDisplayName = window.localStorage.displayname;
|
||||
if (storedDisplayName) {
|
||||
nickname = storedDisplayName;
|
||||
|
||||
Chat.setChatConversationMode(true);
|
||||
}
|
||||
|
||||
$('#nickinput').keydown(function (event) {
|
||||
if (event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
var val = Util.escapeHtml(this.value);
|
||||
this.value = '';
|
||||
if (!nickname) {
|
||||
nickname = val;
|
||||
window.localStorage.displayname = nickname;
|
||||
|
||||
connection.emuc.addDisplayNameToPresence(nickname);
|
||||
connection.emuc.sendPresence();
|
||||
|
||||
Chat.setChatConversationMode(true);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#usermsg').keydown(function (event) {
|
||||
if (event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
var value = this.value;
|
||||
$('#usermsg').val('').trigger('autosize.resize');
|
||||
this.focus();
|
||||
var command = new CommandsProcessor(value);
|
||||
if(command.isCommand())
|
||||
{
|
||||
command.processCommand();
|
||||
}
|
||||
else
|
||||
{
|
||||
var message = Util.escapeHtml(value);
|
||||
connection.emuc.sendMessage(message, nickname);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var onTextAreaResize = function () {
|
||||
resizeChatConversation();
|
||||
Chat.scrollChatToBottom();
|
||||
};
|
||||
$('#usermsg').autosize({callback: onTextAreaResize});
|
||||
|
||||
$("#chatspace").bind("shown",
|
||||
function () {
|
||||
unreadMessages = 0;
|
||||
setVisualNotification(false);
|
||||
});
|
||||
|
||||
addSmileys();
|
||||
};
|
||||
|
||||
/**
|
||||
* Appends the given message to the chat conversation.
|
||||
*/
|
||||
my.updateChatConversation = function (from, displayName, message) {
|
||||
var divClassName = '';
|
||||
|
||||
if (connection.emuc.myroomjid === from) {
|
||||
divClassName = "localuser";
|
||||
}
|
||||
else {
|
||||
divClassName = "remoteuser";
|
||||
|
||||
if (!Chat.isVisible()) {
|
||||
unreadMessages++;
|
||||
Util.playSoundNotification('chatNotification');
|
||||
setVisualNotification(true);
|
||||
}
|
||||
}
|
||||
|
||||
//replace links and smileys
|
||||
var escMessage = message.replace(/</g, '<').replace(/>/g, '>').replace(/\n/g, '<br/>'); //Strophe already escapes special symbols on sending, so we escape here only tags to avoid double &
|
||||
var escDisplayName = Util.escapeHtml(displayName);
|
||||
message = processReplacements(escMessage);
|
||||
|
||||
var messageContainer =
|
||||
'<div class="chatmessage">'+
|
||||
'<img src="../images/chatArrow.svg" class="chatArrow">' +
|
||||
'<div class="username ' + divClassName +'">' + escDisplayName + '</div>' +
|
||||
'<div class="timestamp">' + getCurrentTime() + '</div>' +
|
||||
'<div class="usermessage">' + message + '</div>' +
|
||||
'</div>';
|
||||
|
||||
$('#chatconversation').append(messageContainer);
|
||||
$('#chatconversation').animate(
|
||||
{ scrollTop: $('#chatconversation')[0].scrollHeight}, 1000);
|
||||
};
|
||||
|
||||
/**
|
||||
* Appends error message to the conversation
|
||||
* @param errorMessage the received error message.
|
||||
* @param originalText the original message.
|
||||
*/
|
||||
my.chatAddError = function(errorMessage, originalText)
|
||||
{
|
||||
errorMessage = Util.escapeHtml(errorMessage);
|
||||
originalText = Util.escapeHtml(originalText);
|
||||
|
||||
$('#chatconversation').append('<div class="errorMessage"><b>Error: </b>'
|
||||
+ 'Your message' + (originalText? (' \"'+ originalText + '\"') : "")
|
||||
+ ' was not sent.' + (errorMessage? (' Reason: ' + errorMessage) : '')
|
||||
+ '</div>');
|
||||
$('#chatconversation').animate(
|
||||
{ scrollTop: $('#chatconversation')[0].scrollHeight}, 1000);
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the subject to the UI
|
||||
* @param subject the subject
|
||||
*/
|
||||
my.chatSetSubject = function(subject)
|
||||
{
|
||||
if(subject)
|
||||
subject = subject.trim();
|
||||
$('#subject').html(linkify(Util.escapeHtml(subject)));
|
||||
if(subject == "")
|
||||
{
|
||||
$("#subject").css({display: "none"});
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#subject").css({display: "block"});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets the chat conversation mode.
|
||||
*/
|
||||
my.setChatConversationMode = function (isConversationMode) {
|
||||
if (isConversationMode) {
|
||||
$('#nickname').css({visibility: 'hidden'});
|
||||
$('#chatconversation').css({visibility: 'visible'});
|
||||
$('#usermsg').css({visibility: 'visible'});
|
||||
$('#smileysarea').css({visibility: 'visible'});
|
||||
$('#usermsg').focus();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Resizes the chat area.
|
||||
*/
|
||||
my.resizeChat = function () {
|
||||
var chatSize = PanelToggler.getPanelSize();
|
||||
|
||||
$('#chatspace').width(chatSize[0]);
|
||||
$('#chatspace').height(chatSize[1]);
|
||||
|
||||
resizeChatConversation();
|
||||
};
|
||||
|
||||
/**
|
||||
* Indicates if the chat is currently visible.
|
||||
*/
|
||||
my.isVisible = function () {
|
||||
return $('#chatspace').is(":visible");
|
||||
};
|
||||
/**
|
||||
* Shows and hides the window with the smileys
|
||||
*/
|
||||
my.toggleSmileys = function() {
|
||||
var smileys = $('#smileysContainer');
|
||||
if(!smileys.is(':visible')) {
|
||||
smileys.show("slide", { direction: "down", duration: 300});
|
||||
} else {
|
||||
smileys.hide("slide", { direction: "down", duration: 300});
|
||||
}
|
||||
$('#usermsg').focus();
|
||||
};
|
||||
|
||||
/**
|
||||
* Scrolls chat to the bottom.
|
||||
*/
|
||||
my.scrollChatToBottom = function() {
|
||||
setTimeout(function () {
|
||||
$('#chatconversation').scrollTop(
|
||||
$('#chatconversation')[0].scrollHeight);
|
||||
}, 5);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds the smileys container to the chat
|
||||
*/
|
||||
function addSmileys() {
|
||||
var smileysContainer = document.createElement('div');
|
||||
smileysContainer.id = 'smileysContainer';
|
||||
function addClickFunction(smiley, number) {
|
||||
smiley.onclick = function addSmileyToMessage() {
|
||||
var usermsg = $('#usermsg');
|
||||
var message = usermsg.val();
|
||||
message += smileys['smiley' + number];
|
||||
usermsg.val(message);
|
||||
usermsg.get(0).setSelectionRange(message.length, message.length);
|
||||
Chat.toggleSmileys();
|
||||
usermsg.focus();
|
||||
};
|
||||
}
|
||||
for(var i = 1; i <= 21; i++) {
|
||||
var smileyContainer = document.createElement('div');
|
||||
smileyContainer.id = 'smiley' + i;
|
||||
smileyContainer.className = 'smileyContainer';
|
||||
var smiley = document.createElement('img');
|
||||
smiley.src = 'images/smileys/smiley' + i + '.svg';
|
||||
smiley.className = 'smiley';
|
||||
addClickFunction(smiley, i);
|
||||
smileyContainer.appendChild(smiley);
|
||||
smileysContainer.appendChild(smileyContainer);
|
||||
}
|
||||
|
||||
$("#chatspace").append(smileysContainer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resizes the chat conversation.
|
||||
*/
|
||||
function resizeChatConversation() {
|
||||
var msgareaHeight = $('#usermsg').outerHeight();
|
||||
var chatspace = $('#chatspace');
|
||||
var width = chatspace.width();
|
||||
var chat = $('#chatconversation');
|
||||
var smileys = $('#smileysarea');
|
||||
|
||||
smileys.height(msgareaHeight);
|
||||
$("#smileys").css('bottom', (msgareaHeight - 26) / 2);
|
||||
$('#smileysContainer').css('bottom', msgareaHeight);
|
||||
chat.width(width - 10);
|
||||
chat.height(window.innerHeight - 15 - msgareaHeight);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows/hides a visual notification, indicating that a message has arrived.
|
||||
*/
|
||||
function setVisualNotification(show) {
|
||||
var unreadMsgElement = document.getElementById('unreadMessages');
|
||||
var unreadMsgBottomElement = document.getElementById('bottomUnreadMessages');
|
||||
|
||||
var glower = $('#chatButton');
|
||||
var bottomGlower = $('#chatBottomButton');
|
||||
|
||||
if (unreadMessages) {
|
||||
unreadMsgElement.innerHTML = unreadMessages.toString();
|
||||
unreadMsgBottomElement.innerHTML = unreadMessages.toString();
|
||||
|
||||
ToolbarToggler.dockToolbar(true);
|
||||
|
||||
var chatButtonElement
|
||||
= document.getElementById('chatButton').parentNode;
|
||||
var leftIndent = (Util.getTextWidth(chatButtonElement) -
|
||||
Util.getTextWidth(unreadMsgElement)) / 2;
|
||||
var topIndent = (Util.getTextHeight(chatButtonElement) -
|
||||
Util.getTextHeight(unreadMsgElement)) / 2 - 3;
|
||||
|
||||
unreadMsgElement.setAttribute(
|
||||
'style',
|
||||
'top:' + topIndent +
|
||||
'; left:' + leftIndent + ';');
|
||||
|
||||
var chatBottomButtonElement
|
||||
= document.getElementById('chatBottomButton').parentNode;
|
||||
var bottomLeftIndent = (Util.getTextWidth(chatBottomButtonElement) -
|
||||
Util.getTextWidth(unreadMsgBottomElement)) / 2;
|
||||
var bottomTopIndent = (Util.getTextHeight(chatBottomButtonElement) -
|
||||
Util.getTextHeight(unreadMsgBottomElement)) / 2 - 2;
|
||||
|
||||
unreadMsgBottomElement.setAttribute(
|
||||
'style',
|
||||
'top:' + bottomTopIndent +
|
||||
'; left:' + bottomLeftIndent + ';');
|
||||
|
||||
|
||||
if (!glower.hasClass('icon-chat-simple')) {
|
||||
glower.removeClass('icon-chat');
|
||||
glower.addClass('icon-chat-simple');
|
||||
}
|
||||
}
|
||||
else {
|
||||
unreadMsgElement.innerHTML = '';
|
||||
unreadMsgBottomElement.innerHTML = '';
|
||||
glower.removeClass('icon-chat-simple');
|
||||
glower.addClass('icon-chat');
|
||||
}
|
||||
|
||||
if (show && !notificationInterval) {
|
||||
notificationInterval = window.setInterval(function () {
|
||||
glower.toggleClass('active');
|
||||
bottomGlower.toggleClass('active glowing');
|
||||
}, 800);
|
||||
}
|
||||
else if (!show && notificationInterval) {
|
||||
window.clearInterval(notificationInterval);
|
||||
notificationInterval = false;
|
||||
glower.removeClass('active');
|
||||
bottomGlower.removeClass('glowing');
|
||||
bottomGlower.addClass('active');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the current time in the format it is shown to the user
|
||||
* @returns {string}
|
||||
*/
|
||||
function getCurrentTime() {
|
||||
var now = new Date();
|
||||
var hour = now.getHours();
|
||||
var minute = now.getMinutes();
|
||||
var second = now.getSeconds();
|
||||
if(hour.toString().length === 1) {
|
||||
hour = '0'+hour;
|
||||
}
|
||||
if(minute.toString().length === 1) {
|
||||
minute = '0'+minute;
|
||||
}
|
||||
if(second.toString().length === 1) {
|
||||
second = '0'+second;
|
||||
}
|
||||
return hour+':'+minute+':'+second;
|
||||
}
|
||||
|
||||
return my;
|
||||
}(Chat || {}));
|
||||
@@ -1,20 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Jitsi Meet: Unsupported Browser</title>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="css/chromeonly.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- wrap starts here -->
|
||||
<div id="wrap">
|
||||
<a href="http://google.com/chrome"><div id="left"></div></a>
|
||||
<div id="middle"></div>
|
||||
<div id="text">
|
||||
<p>This application is currently only supported by <a href="http://google.com/chrome">Chrome</a>, <a href="http://www.chromium.org/">Chromium</a> and <a href="http://www.opera.com">Opera</a></p>
|
||||
<p><a href="http://google.com/chrome">Download Chrome</a></p>
|
||||
<p class="firefox">We are hoping that <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=977864">multistream support</a> for Firefox would not be long so that we could all use this application with our favorite browser.</p>
|
||||
</div>
|
||||
<!-- wrap ends here -->
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
98
commands.js
@@ -1,98 +0,0 @@
|
||||
/**
|
||||
* Handles commands received via chat messages.
|
||||
*/
|
||||
var CommandsProcessor = (function()
|
||||
{
|
||||
/**
|
||||
* Constructs new CommandProccessor instance from a message.
|
||||
* @param message the message
|
||||
* @constructor
|
||||
*/
|
||||
function CommandsPrototype(message)
|
||||
{
|
||||
/**
|
||||
* Extracts the command from the message.
|
||||
* @param message the received message
|
||||
* @returns {string} the command
|
||||
*/
|
||||
function getCommand(message)
|
||||
{
|
||||
if(message)
|
||||
{
|
||||
for(var command in commands)
|
||||
{
|
||||
if(message.indexOf("/" + command) == 0)
|
||||
return command;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
};
|
||||
|
||||
var command = getCommand(message);
|
||||
|
||||
/**
|
||||
* Returns the name of the command.
|
||||
* @returns {String} the command
|
||||
*/
|
||||
this.getCommand = function()
|
||||
{
|
||||
return command;
|
||||
}
|
||||
|
||||
|
||||
var messageArgument = message.substr(command.length + 2);
|
||||
|
||||
/**
|
||||
* Returns the arguments of the command.
|
||||
* @returns {string}
|
||||
*/
|
||||
this.getArgument = function()
|
||||
{
|
||||
return messageArgument;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether this instance is valid command or not.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
CommandsPrototype.prototype.isCommand = function()
|
||||
{
|
||||
if(this.getCommand())
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes the command.
|
||||
*/
|
||||
CommandsPrototype.prototype.processCommand = function()
|
||||
{
|
||||
if(!this.isCommand())
|
||||
return;
|
||||
|
||||
commands[this.getCommand()](this.getArgument());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes the data for topic command.
|
||||
* @param commandArguments the arguments of the topic command.
|
||||
*/
|
||||
var processTopic = function(commandArguments)
|
||||
{
|
||||
var topic = Util.escapeHtml(commandArguments);
|
||||
connection.emuc.setSubject(topic);
|
||||
}
|
||||
|
||||
/**
|
||||
* List with supported commands. The keys are the names of the commands and
|
||||
* the value is the function that processes the message.
|
||||
* @type {{String: function}}
|
||||
*/
|
||||
var commands = {
|
||||
"topic" : processTopic
|
||||
};
|
||||
|
||||
return CommandsPrototype;
|
||||
})();
|
||||
19
config.js
@@ -20,17 +20,22 @@ var config = {
|
||||
chromeExtensionId: 'diibjkoicjeejcmhdnailmkgecihlobk', // Id of desktop streamer Chrome extension
|
||||
desktopSharingSources: ['screen', 'window'],
|
||||
minChromeExtVersion: '0.1', // Required version of Chrome extension
|
||||
enableRtpStats: true, // Enables RTP stats processing
|
||||
openSctp: true, // Toggle to enable/disable SCTP channels
|
||||
disableStats: false,
|
||||
disableAudioLevels: false,
|
||||
channelLastN: -1, // The default value of the channel attribute last-n.
|
||||
adaptiveLastN: false,
|
||||
adaptiveSimulcast: false,
|
||||
useRtcpMux: true,
|
||||
useBundle: true,
|
||||
useRtcpMux: true, // required for FF support
|
||||
useBundle: true, // required for FF support
|
||||
enableRecording: false,
|
||||
enableWelcomePage: true,
|
||||
enableSimulcast: false,
|
||||
enableFirefoxSupport: false, //firefox support is still experimental, only one-to-one conferences with chrome focus
|
||||
// will work when simulcast, bundle, mux, lastN and SCTP are disabled.
|
||||
logStats: false // Enable logging of PeerConnection stats via the focus
|
||||
enableSimulcast: false, // blocks FF support
|
||||
logStats: false, // Enable logging of PeerConnection stats via the focus
|
||||
// startAudioMuted: 10, //every participant after the Nth will start audio muted
|
||||
// startVideoMuted: 10, //every participant after the Nth will start video muted
|
||||
// defaultLanguage: "en",
|
||||
/*noticeMessage: 'Service update is scheduled for 16th March 2015. ' +
|
||||
'During that time service will not be available. ' +
|
||||
'Apologise for inconvenience.'*/
|
||||
};
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
var ConnectionQuality = (function () {
|
||||
|
||||
/**
|
||||
* Constructs new ConnectionQuality object
|
||||
* @constructor
|
||||
*/
|
||||
function ConnectionQuality() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* local stats
|
||||
* @type {{}}
|
||||
*/
|
||||
var stats = {};
|
||||
|
||||
/**
|
||||
* remote stats
|
||||
* @type {{}}
|
||||
*/
|
||||
var remoteStats = {};
|
||||
|
||||
/**
|
||||
* Interval for sending statistics to other participants
|
||||
* @type {null}
|
||||
*/
|
||||
var sendIntervalId = null;
|
||||
|
||||
/**
|
||||
* Updates the local statistics
|
||||
* @param data new statistics
|
||||
*/
|
||||
ConnectionQuality.updateLocalStats = function (data) {
|
||||
stats = data;
|
||||
VideoLayout.updateLocalConnectionStats(100 - stats.packetLoss.total,stats);
|
||||
if(sendIntervalId == null)
|
||||
{
|
||||
startSendingStats();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Start statistics sending.
|
||||
*/
|
||||
function startSendingStats() {
|
||||
sendStats();
|
||||
sendIntervalId = setInterval(sendStats, 10000);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends statistics to other participants
|
||||
*/
|
||||
function sendStats() {
|
||||
connection.emuc.addConnectionInfoToPresence(convertToMUCStats(stats));
|
||||
connection.emuc.sendPresence();
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts statistics to format for sending through XMPP
|
||||
* @param stats the statistics
|
||||
* @returns {{bitrate_donwload: *, bitrate_uplpoad: *, packetLoss_total: *, packetLoss_download: *, packetLoss_upload: *}}
|
||||
*/
|
||||
function convertToMUCStats(stats) {
|
||||
return {
|
||||
"bitrate_download": stats.bitrate.download,
|
||||
"bitrate_upload": stats.bitrate.upload,
|
||||
"packetLoss_total": stats.packetLoss.total,
|
||||
"packetLoss_download": stats.packetLoss.download,
|
||||
"packetLoss_upload": stats.packetLoss.upload
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts statitistics to format used by VideoLayout
|
||||
* @param stats
|
||||
* @returns {{bitrate: {download: *, upload: *}, packetLoss: {total: *, download: *, upload: *}}}
|
||||
*/
|
||||
function parseMUCStats(stats) {
|
||||
return {
|
||||
bitrate: {
|
||||
download: stats.bitrate_download,
|
||||
upload: stats.bitrate_upload
|
||||
},
|
||||
packetLoss: {
|
||||
total: stats.packetLoss_total,
|
||||
download: stats.packetLoss_download,
|
||||
upload: stats.packetLoss_upload
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates remote statistics
|
||||
* @param jid the jid associated with the statistics
|
||||
* @param data the statistics
|
||||
*/
|
||||
ConnectionQuality.updateRemoteStats = function (jid, data) {
|
||||
if(data == null || data.packetLoss_total == null)
|
||||
{
|
||||
VideoLayout.updateConnectionStats(jid, null, null);
|
||||
return;
|
||||
}
|
||||
remoteStats[jid] = parseMUCStats(data);
|
||||
|
||||
VideoLayout.updateConnectionStats(jid, 100 - data.packetLoss_total,remoteStats[jid]);
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Stops statistics sending.
|
||||
*/
|
||||
ConnectionQuality.stopSendingStats = function () {
|
||||
clearInterval(sendIntervalId);
|
||||
sendIntervalId = null;
|
||||
//notify UI about stopping statistics gathering
|
||||
VideoLayout.onStatsStop();
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the local statistics.
|
||||
*/
|
||||
ConnectionQuality.getStats = function () {
|
||||
return stats;
|
||||
}
|
||||
|
||||
return ConnectionQuality;
|
||||
})();
|
||||
186
contact_list.js
@@ -1,186 +0,0 @@
|
||||
/**
|
||||
* Contact list.
|
||||
*/
|
||||
var ContactList = (function (my) {
|
||||
|
||||
var numberOfContacts = 0;
|
||||
var notificationInterval;
|
||||
|
||||
/**
|
||||
* Indicates if the chat is currently visible.
|
||||
*
|
||||
* @return <tt>true</tt> if the chat is currently visible, <tt>false</tt> -
|
||||
* otherwise
|
||||
*/
|
||||
my.isVisible = function () {
|
||||
return $('#contactlist').is(":visible");
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds a contact for the given peerJid if such doesn't yet exist.
|
||||
*
|
||||
* @param peerJid the peerJid corresponding to the contact
|
||||
* @param id the user's email or userId used to get the user's avatar
|
||||
*/
|
||||
my.ensureAddContact = function(peerJid, id) {
|
||||
var resourceJid = Strophe.getResourceFromJid(peerJid);
|
||||
|
||||
var contact = $('#contactlist>ul>li[id="' + resourceJid + '"]');
|
||||
|
||||
if (!contact || contact.length <= 0)
|
||||
ContactList.addContact(peerJid,id);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds a contact for the given peer jid.
|
||||
*
|
||||
* @param peerJid the jid of the contact to add
|
||||
* @param id the email or userId of the user
|
||||
*/
|
||||
my.addContact = function(peerJid, id) {
|
||||
var resourceJid = Strophe.getResourceFromJid(peerJid);
|
||||
|
||||
var contactlist = $('#contactlist>ul');
|
||||
|
||||
var newContact = document.createElement('li');
|
||||
// XXX(gp) contact click event handling is now in videolayout.js. Is the
|
||||
// following statement (newContact.id = resourceJid) still relevant?
|
||||
newContact.id = resourceJid;
|
||||
newContact.className = "clickable";
|
||||
newContact.onclick = function(event) {
|
||||
if(event.currentTarget.className === "clickable") {
|
||||
$(ContactList).trigger('contactclicked', [peerJid]);
|
||||
}
|
||||
};
|
||||
|
||||
newContact.appendChild(createAvatar(id));
|
||||
newContact.appendChild(createDisplayNameParagraph("Participant"));
|
||||
|
||||
var clElement = contactlist.get(0);
|
||||
|
||||
if (resourceJid === Strophe.getResourceFromJid(connection.emuc.myroomjid)
|
||||
&& $('#contactlist>ul .title')[0].nextSibling.nextSibling)
|
||||
{
|
||||
clElement.insertBefore(newContact,
|
||||
$('#contactlist>ul .title')[0].nextSibling.nextSibling);
|
||||
}
|
||||
else {
|
||||
clElement.appendChild(newContact);
|
||||
}
|
||||
updateNumberOfParticipants(1);
|
||||
};
|
||||
|
||||
/**
|
||||
* Removes a contact for the given peer jid.
|
||||
*
|
||||
* @param peerJid the peerJid corresponding to the contact to remove
|
||||
*/
|
||||
my.removeContact = function(peerJid) {
|
||||
var resourceJid = Strophe.getResourceFromJid(peerJid);
|
||||
|
||||
var contact = $('#contactlist>ul>li[id="' + resourceJid + '"]');
|
||||
|
||||
if (contact && contact.length > 0) {
|
||||
var contactlist = $('#contactlist>ul');
|
||||
|
||||
contactlist.get(0).removeChild(contact.get(0));
|
||||
|
||||
updateNumberOfParticipants(-1);
|
||||
}
|
||||
};
|
||||
|
||||
my.setVisualNotification = function(show, stopGlowingIn) {
|
||||
var glower = $('#contactListButton');
|
||||
function stopGlowing() {
|
||||
window.clearInterval(notificationInterval);
|
||||
notificationInterval = false;
|
||||
glower.removeClass('glowing');
|
||||
if(!ContactList.isVisible()) {
|
||||
glower.removeClass('active');
|
||||
}
|
||||
}
|
||||
|
||||
if (show && !notificationInterval) {
|
||||
notificationInterval = window.setInterval(function () {
|
||||
glower.toggleClass('active glowing');
|
||||
}, 800);
|
||||
}
|
||||
else if (!show && notificationInterval) {
|
||||
stopGlowing();
|
||||
}
|
||||
if(stopGlowingIn) {
|
||||
setTimeout(stopGlowing, stopGlowingIn);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates the number of participants in the contact list button and sets
|
||||
* the glow
|
||||
* @param delta indicates whether a new user has joined (1) or someone has
|
||||
* left(-1)
|
||||
*/
|
||||
function updateNumberOfParticipants(delta) {
|
||||
//when the user is alone we don't show the number of participants
|
||||
if(numberOfContacts === 0) {
|
||||
$("#numberOfParticipants").text('');
|
||||
numberOfContacts += delta;
|
||||
} else if(numberOfContacts !== 0 && !ContactList.isVisible()) {
|
||||
ContactList.setVisualNotification(true);
|
||||
numberOfContacts += delta;
|
||||
$("#numberOfParticipants").text(numberOfContacts);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the avatar element.
|
||||
*
|
||||
* @return the newly created avatar element
|
||||
*/
|
||||
function createAvatar(id) {
|
||||
var avatar = document.createElement('img');
|
||||
avatar.className = "icon-avatar avatar";
|
||||
avatar.src = "https://www.gravatar.com/avatar/" + id + "?d=wavatar&size=30";
|
||||
|
||||
return avatar;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the display name paragraph.
|
||||
*
|
||||
* @param displayName the display name to set
|
||||
*/
|
||||
function createDisplayNameParagraph(displayName) {
|
||||
var p = document.createElement('p');
|
||||
p.innerText = displayName;
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Indicates that the display name has changed.
|
||||
*/
|
||||
$(document).bind( 'displaynamechanged',
|
||||
function (event, peerJid, displayName) {
|
||||
if (peerJid === 'localVideoContainer')
|
||||
peerJid = connection.emuc.myroomjid;
|
||||
|
||||
var resourceJid = Strophe.getResourceFromJid(peerJid);
|
||||
|
||||
var contactName = $('#contactlist #' + resourceJid + '>p');
|
||||
|
||||
if (contactName && displayName && displayName.length > 0)
|
||||
contactName.html(displayName);
|
||||
});
|
||||
|
||||
my.setClickable = function(resourceJid, isClickable) {
|
||||
var contact = $('#contactlist>ul>li[id="' + resourceJid + '"]');
|
||||
if(isClickable) {
|
||||
contact.addClass('clickable');
|
||||
} else {
|
||||
contact.removeClass('clickable');
|
||||
}
|
||||
};
|
||||
|
||||
return my;
|
||||
}(ContactList || {}));
|
||||
@@ -1,54 +0,0 @@
|
||||
body {
|
||||
width:100%;
|
||||
height:100%;
|
||||
background-color: white;
|
||||
color: #424242;
|
||||
font-family:'YanoneKaffeesatzLight',Verdana,Tahoma,Arial;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
#wrap{
|
||||
display: block;
|
||||
position: absolute;
|
||||
width:900px;
|
||||
height: 262px;
|
||||
overflow:hidden;
|
||||
text-align: center;
|
||||
margin: auto;
|
||||
top: 0; left: 0; bottom: 0; right: 0;
|
||||
}
|
||||
#left{
|
||||
display:inline-block;
|
||||
background-image:url(../images/chromelogo.png);
|
||||
background-repeat:no-repeat;
|
||||
width:246px;
|
||||
height:262px;
|
||||
float: left;
|
||||
}
|
||||
.firefox{
|
||||
font-size: 11pt;
|
||||
color: #c8c8c8;
|
||||
}
|
||||
#middle{
|
||||
display:inline-block;
|
||||
background-image:url(../images/chromepointer.png);
|
||||
background-repeat:no-repeat;
|
||||
width:53px;
|
||||
height:262px;
|
||||
float: left;
|
||||
}
|
||||
#text{
|
||||
display:inline-block;
|
||||
font-size: 18pt;
|
||||
width: 560px;
|
||||
vertical-align:middle;
|
||||
padding-top: 30px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #087dba;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -119,4 +119,8 @@
|
||||
|
||||
.icon-settings:before {
|
||||
content: "\e61b";
|
||||
}
|
||||
}
|
||||
|
||||
.icon-dialPad:before {
|
||||
content: "\e61c";
|
||||
}
|
||||
|
||||
@@ -99,5 +99,7 @@
|
||||
width: 90px;
|
||||
height: 16px;
|
||||
padding-top: 4px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin: 15px auto 0px auto;
|
||||
}
|
||||
|
||||
61
css/login_menu.css
Normal file
@@ -0,0 +1,61 @@
|
||||
/*Initialize*/
|
||||
ul.loginmenu {
|
||||
display:none;
|
||||
position: absolute;
|
||||
margin: 0;
|
||||
padding: 5px;
|
||||
padding-bottom: 7px;
|
||||
top: 45px;
|
||||
left: -5px;
|
||||
background-color: rgba(0,0,0,0.9);
|
||||
border: 1px solid rgba(256, 256, 256, 0.2);
|
||||
border-radius:8px;
|
||||
}
|
||||
|
||||
ul.loginmenu li {
|
||||
list-style-type: none;
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
ul.loginmenu li.identity {
|
||||
color: #fff;
|
||||
font-size: 11pt;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
ul.loginmenu:after {
|
||||
content: url('../images/dropdownPointer.png');
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: -7px;
|
||||
left: 18px;
|
||||
}
|
||||
|
||||
li a.authButton{
|
||||
background-color: #06a5df;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
padding-left: 29px;
|
||||
padding-right: 29px;
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
font-size: 11pt;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
span.authentication:hover ul.loginmenu, ul.loginmenu:hover {
|
||||
display:block !important;
|
||||
}
|
||||
|
||||
a.disabled {
|
||||
color: gray !important;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.loginmenuPadding {
|
||||
width: 50px;
|
||||
height: 30px;
|
||||
position: absolute;
|
||||
top: -30px;
|
||||
left: 0px;
|
||||
}
|
||||
@@ -29,10 +29,6 @@ html, body{
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
#settings {
|
||||
display:none;
|
||||
}
|
||||
|
||||
#nowebrtc {
|
||||
display:none;
|
||||
}
|
||||
|
||||
@@ -26,4 +26,9 @@
|
||||
|
||||
button.jqidefaultbutton #inviteLinkRef {
|
||||
color: #2c8ad2;
|
||||
}
|
||||
|
||||
#inviteLinkRef {
|
||||
-webkit-user-select: text;
|
||||
user-select: text;
|
||||
}
|
||||
11
css/notice.css
Normal file
@@ -0,0 +1,11 @@
|
||||
#notice {
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
margin-top: 6px;
|
||||
}
|
||||
#noticeText {
|
||||
background-color: #000000;
|
||||
color: white;
|
||||
padding: 3px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
color: #00ccff;
|
||||
}
|
||||
|
||||
#settingsmenu input {
|
||||
#settingsmenu input, select {
|
||||
margin-top: 10px;
|
||||
margin-left: 10%;
|
||||
width: 80%;
|
||||
@@ -27,8 +27,8 @@
|
||||
}
|
||||
|
||||
#settingsmenu button {
|
||||
width: 36%;
|
||||
left: 32%;
|
||||
width: 45%;
|
||||
left: 26%;
|
||||
padding: 0;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@@ -43,3 +43,26 @@
|
||||
#settingsmenu .icon-settings {
|
||||
padding: 34px;
|
||||
}
|
||||
|
||||
#languages_selectbox{
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
|
||||
#startMutedOptions {
|
||||
padding-left: 10%;
|
||||
text-indent: -10%;
|
||||
}
|
||||
|
||||
#startAudioMuted {
|
||||
width: 13px !important;
|
||||
}
|
||||
|
||||
#startVideoMuted {
|
||||
width: 13px !important;
|
||||
}
|
||||
|
||||
.startMutedLabel {
|
||||
width: 94%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
118
css/unsupported_browser.css
Normal file
@@ -0,0 +1,118 @@
|
||||
body {
|
||||
width:100%;
|
||||
height:100%;
|
||||
background-color: white;
|
||||
color: #424242;
|
||||
font-family:Helvetica,'YanoneKaffeesatzLight',Verdana,Tahoma,Arial;
|
||||
font-size: 28px;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
#wrap{
|
||||
display: block;
|
||||
position: absolute;
|
||||
width:900px;
|
||||
height: 365px;
|
||||
overflow:hidden;
|
||||
text-align: center;
|
||||
margin: auto;
|
||||
top: 0; left: 0; bottom: 0; right: 0;
|
||||
}
|
||||
.firefox{
|
||||
font-size: 11pt;
|
||||
color: #c8c8c8;
|
||||
width: 468px;
|
||||
text-align: center;
|
||||
margin: 30px auto 0px auto;
|
||||
padding-left: 15px;
|
||||
}
|
||||
#text{
|
||||
display:inline-block;
|
||||
font-size: 28px;
|
||||
width: 568px;
|
||||
vertical-align:middle;
|
||||
padding-top: 25px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #087dba;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
.browser {
|
||||
width: 138px;
|
||||
height: 163px;
|
||||
margin-top: 5px;
|
||||
background-color: #e8e8e8;
|
||||
border: 1px solid #cfcfcf;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.browser_wrapper
|
||||
{
|
||||
width: 138px;
|
||||
height: 188px;
|
||||
vertical-align: middle;
|
||||
color: #929391;
|
||||
font-size: 20px;
|
||||
float: left;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.supported_browsers
|
||||
{
|
||||
margin: 0px auto 0px auto;
|
||||
width: 660px;
|
||||
}
|
||||
|
||||
.clear
|
||||
{
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.button
|
||||
{
|
||||
background-color: #62c82a;
|
||||
border: 1px solid #3c8117;
|
||||
border-radius: 10px;
|
||||
color: #FFFFFF;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
width: 115px;
|
||||
height: 26px;
|
||||
padding-top: 13px;
|
||||
margin: 15px auto 0px auto;
|
||||
}
|
||||
|
||||
.logo
|
||||
{
|
||||
margin: 20px auto 0px auto;
|
||||
}
|
||||
|
||||
#chrome_logo
|
||||
{
|
||||
width: 78px;
|
||||
height: 78px;
|
||||
background-image: url('/images/chrome.png');
|
||||
}
|
||||
#chromium_logo
|
||||
{
|
||||
width: 77px;
|
||||
height: 79px;
|
||||
background-image: url('/images/chromium.png');
|
||||
}
|
||||
#firefox-nightly_logo
|
||||
{
|
||||
width: 73px;
|
||||
height: 79px;
|
||||
background-image: url('/images/firefox-nightly.png');
|
||||
}
|
||||
|
||||
#opera_logo
|
||||
{
|
||||
width: 73px;
|
||||
height: 78px;
|
||||
background-image: url('/images/opera.png');
|
||||
}
|
||||
|
||||
|
||||
@@ -415,3 +415,28 @@
|
||||
left: 35px;
|
||||
border-radius: 200px;
|
||||
}
|
||||
|
||||
.noMic {
|
||||
position: absolute;
|
||||
border-radius: 8px;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-image: url("../images/noMic.png");
|
||||
background-color: #000;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.noVideo {
|
||||
position: absolute;
|
||||
border-radius: 8px;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-image: url("../images/noVideo.png");
|
||||
background-color: #000;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
|
||||
6
debian/control
vendored
@@ -10,8 +10,7 @@ Homepage: https://jitsi.org/meet
|
||||
|
||||
Package: jitsi-meet
|
||||
Architecture: all
|
||||
Pre-Depends: jitsi-videobridge
|
||||
Depends: ${misc:Depends}, nginx, jitsi-meet-prosody, libjs-strophe (>= 1.1.3),
|
||||
Depends: ${misc:Depends}, jitsi-videobridge, nginx, jitsi-meet-prosody, libjs-strophe (>= 1.1.3),
|
||||
libjs-jquery, libjs-jquery-ui
|
||||
Description: WebRTC JavaScript video conferences
|
||||
Jitsi Meet is a WebRTC JavaScript application that uses Jitsi
|
||||
@@ -22,8 +21,7 @@ Description: WebRTC JavaScript video conferences
|
||||
|
||||
Package: jitsi-meet-prosody
|
||||
Architecture: all
|
||||
Pre-Depends: openssl, prosody | prosody-trunk, jitsi-videobridge
|
||||
Depends: ${misc:Depends}, jicofo
|
||||
Depends: ${misc:Depends}, openssl, prosody | prosody-trunk, jitsi-videobridge, jicofo
|
||||
Description: Prosody configuration for Jitsi Meet
|
||||
Jitsi Meet is a WebRTC JavaScript application that uses Jitsi
|
||||
Videobridge to provide high quality, scalable video conferences.
|
||||
|
||||
11
debian/jitsi-meet-prosody.postinst
vendored
@@ -28,6 +28,15 @@ case "$1" in
|
||||
# loading debconf
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
# detect dpkg-reconfigure, just delete old links
|
||||
db_get jitsi-meet-prosody/jvb-hostname
|
||||
JVB_HOSTNAME_OLD=$RET
|
||||
if [ -n "$RET" ] && [ ! "$JVB_HOSTNAME_OLD" = "$JVB_HOSTNAME" ] ; then
|
||||
rm -f /etc/prosody/conf.d/$JVB_HOSTNAME_OLD.cfg.lua
|
||||
rm -f /etc/prosody/certs/$JVB_HOSTNAME_OLD.key
|
||||
rm -f /etc/prosody/certs/$JVB_HOSTNAME_OLD.crt
|
||||
fi
|
||||
|
||||
# stores the hostname so we will reuse it later, like in purge
|
||||
db_set jitsi-meet-prosody/jvb-hostname $JVB_HOSTNAME
|
||||
|
||||
@@ -62,7 +71,7 @@ case "$1" in
|
||||
if [ -f $PROSODY_HOST_CONFIG ] && ! grep -q "VirtualHost \"auth.$JVB_HOSTNAME\"" $PROSODY_HOST_CONFIG; then
|
||||
echo -e "\nVirtualHost \"auth.$JVB_HOSTNAME\"" >> $PROSODY_HOST_CONFIG
|
||||
echo -e " authentication = \"internal_plain\"\n" >> $PROSODY_HOST_CONFIG
|
||||
echo -e "admins = { \"$JICOFO_AUTH_USER@auth.$JVB_HOSTNAME\" }\n" >> $PROSODY_HOST_CONFIG
|
||||
sed -i "s/Component \"conference.$JVB_HOSTNAME\" \"muc\"/Component \"conference.$JVB_HOSTNAME\" \"muc\"\nadmins = { \"$JICOFO_AUTH_USER@auth.$JVB_HOSTNAME\" }\n/g" $PROSODY_HOST_CONFIG
|
||||
echo -e "Component \"focus.$JVB_HOSTNAME\"" >> $PROSODY_HOST_CONFIG
|
||||
echo -e " component_secret=\"$JICOFO_SECRET\"\n" >> $PROSODY_HOST_CONFIG
|
||||
PROSODY_CREATE_JICOFO_USER="true"
|
||||
|
||||
2
debian/jitsi-meet-prosody.postrm
vendored
@@ -25,7 +25,7 @@ set -e
|
||||
case "$1" in
|
||||
remove)
|
||||
if [ -x "/etc/init.d/prosody" ]; then
|
||||
invoke-rc.d nginx reload
|
||||
invoke-rc.d prosody reload
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
4
debian/jitsi-meet.install
vendored
@@ -3,7 +3,9 @@
|
||||
*.html /usr/share/jitsi-meet/
|
||||
*.ico /usr/share/jitsi-meet/
|
||||
libs /usr/share/jitsi-meet/
|
||||
service /usr/share/jitsi-meet/
|
||||
css /usr/share/jitsi-meet/
|
||||
sounds /usr/share/jitsi-meet/
|
||||
fonts /usr/share/jitsi-meet/
|
||||
images /usr/share/jitsi-meet/
|
||||
images /usr/share/jitsi-meet/
|
||||
lang /usr/share/jitsi-meet/
|
||||
12
debian/jitsi-meet.postinst
vendored
@@ -25,6 +25,14 @@ case "$1" in
|
||||
# loading debconf
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
# detect dpkg-reconfigure, just delete old links
|
||||
db_get jitsi-meet/jvb-hostname
|
||||
JVB_HOSTNAME_OLD=$RET
|
||||
if [ -n "$RET" ] && [ ! "$JVB_HOSTNAME_OLD" = "$JVB_HOSTNAME" ] ; then
|
||||
rm -f /etc/nginx/sites-enabled/$JVB_HOSTNAME_OLD.conf
|
||||
rm -f /etc/jitsi/meet/$JVB_HOSTNAME_OLD-config.js
|
||||
fi
|
||||
|
||||
# stores the hostname so we will reuse it later, like in purge
|
||||
db_set jitsi-meet/jvb-hostname $JVB_HOSTNAME
|
||||
|
||||
@@ -37,10 +45,6 @@ case "$1" in
|
||||
sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" /etc/nginx/sites-available/$JVB_HOSTNAME.conf
|
||||
fi
|
||||
|
||||
if grep "# server_names_hash_bucket_size 64" /etc/nginx/nginx.conf > /dev/null; then
|
||||
sed -i "s/#\ server_names_hash_bucket_size\ 64/\ server_names_hash_bucket_size\ 64/" /etc/nginx/nginx.conf
|
||||
fi
|
||||
|
||||
# SSL for nginx
|
||||
db_get jitsi-meet/cert-choice
|
||||
CERT_CHOICE="$RET"
|
||||
|
||||
16
debian/patches/jquery-package
vendored
@@ -1,22 +1,20 @@
|
||||
Description: Update the used js files for jquery to generic ones, to be able to use local system installed version (through symlinks).
|
||||
Index: jitsi-meet/index.html
|
||||
===================================================================
|
||||
--- jitsi-meet.orig/index.html
|
||||
+++ jitsi-meet/index.html
|
||||
@@ -9,7 +9,7 @@
|
||||
@@ -9,12 +9,12 @@
|
||||
<meta itemprop="name" content="Jitsi Meet"/>
|
||||
<meta itemprop="description" content="Join a WebRTC video conference powered by the Jitsi Videobridge"/>
|
||||
<meta itemprop="image" content="/images/jitsilogo.png"/>
|
||||
- <script src="libs/jquery-2.1.1.min.js"></script>
|
||||
+ <script src="libs/jquery.min.js"></script>
|
||||
<script src="config.js?v=5"></script><!-- adapt to your needs, i.e. set hosts and bosh path -->
|
||||
<script src="simulcast.js?v=5"></script><!-- simulcast handling -->
|
||||
<script src="libs/strophe/strophe.jingle.adapter.js?v=2"></script><!-- strophe.jingle bundles -->
|
||||
@@ -24,7 +24,7 @@
|
||||
<script src="libs/strophe/strophe.util.js"></script>
|
||||
<script src="libs/colibri/colibri.focus.js?v=10"></script><!-- colibri focus implementation -->
|
||||
<script src="libs/colibri/colibri.session.js?v=1"></script>
|
||||
<script src="config.js?v=9"></script><!-- adapt to your needs, i.e. set hosts and bosh path -->
|
||||
<script src="libs/strophe/strophe.min.js?v=1"></script>
|
||||
<script src="libs/strophe/strophe.disco.min.js?v=1"></script>
|
||||
<script src="libs/strophe/strophe.caps.jsonly.min.js?v=1"></script>
|
||||
- <script src="libs/jquery-ui.js"></script>
|
||||
+ <script src="libs/jquery-ui.min.js"></script>
|
||||
<script src="libs/rayo.js?v=1"></script>
|
||||
<script src="libs/tooltip.js?v=1"></script><!-- bootstrap tooltip lib -->
|
||||
<script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
|
||||
<script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
|
||||
|
||||
12
debian/rules
vendored
@@ -1,10 +1,4 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
# Sample debian/rules that uses debhelper.
|
||||
# This file was originally written by Joey Hess and Craig Small.
|
||||
# As a special exception, when this file is copied by dh-make into a
|
||||
# dh-make output file, you may use that output file without restriction.
|
||||
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
@@ -19,7 +13,7 @@ override_dh_install:
|
||||
dh_installdirs
|
||||
dh_install -X/config.js
|
||||
yui-compressor -o debian/jitsi-meet/usr/share/jitsi-meet/libs/strophe/strophe.caps.jsonly.min.js \
|
||||
debian/patches/missing-source/libs/strophe/strophe.caps.jsonly.js
|
||||
debian/missing-source/libs/strophe/strophe.caps.jsonly.js
|
||||
yui-compressor -o debian/jitsi-meet/usr/share/jitsi-meet/libs/strophe/strophe.disco.min.js \
|
||||
debian/patches/missing-source/libs/strophe/sha1.js \
|
||||
debian/patches/missing-source/libs/strophe/strophe.disco.js
|
||||
debian/missing-source/libs/strophe/sha1.js \
|
||||
debian/missing-source/libs/strophe/strophe.disco.js
|
||||
|
||||
2
debian/watch
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
version=3
|
||||
opts="uversionmangle=s/^/1.0./" https://github.com/jitsi/jitsi-meet/releases/ /jitsi/jitsi-meet/archive/(\S+)\.tar\.gz
|
||||
@@ -1,317 +0,0 @@
|
||||
/* global $, alert, changeLocalVideo, chrome, config, connection, getConferenceHandler, getUserMediaWithConstraints, VideoLayout */
|
||||
/**
|
||||
* Indicates that desktop stream is currently in use(for toggle purpose).
|
||||
* @type {boolean}
|
||||
*/
|
||||
var isUsingScreenStream = false;
|
||||
/**
|
||||
* Indicates that switch stream operation is in progress and prevent from triggering new events.
|
||||
* @type {boolean}
|
||||
*/
|
||||
var switchInProgress = false;
|
||||
|
||||
/**
|
||||
* Method used to get screen sharing stream.
|
||||
*
|
||||
* @type {function (stream_callback, failure_callback}
|
||||
*/
|
||||
var obtainDesktopStream = null;
|
||||
|
||||
/**
|
||||
* Flag used to cache desktop sharing enabled state. Do not use directly as it can be <tt>null</tt>.
|
||||
* @type {null|boolean}
|
||||
*/
|
||||
var _desktopSharingEnabled = null;
|
||||
|
||||
/**
|
||||
* Method obtains desktop stream from WebRTC 'screen' source.
|
||||
* Flag 'chrome://flags/#enable-usermedia-screen-capture' must be enabled.
|
||||
*/
|
||||
function obtainWebRTCScreen(streamCallback, failCallback) {
|
||||
RTC.getUserMediaWithConstraints(
|
||||
['screen'],
|
||||
streamCallback,
|
||||
failCallback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs inline install URL for Chrome desktop streaming extension.
|
||||
* The 'chromeExtensionId' must be defined in config.js.
|
||||
* @returns {string}
|
||||
*/
|
||||
function getWebStoreInstallUrl()
|
||||
{
|
||||
return "https://chrome.google.com/webstore/detail/" + config.chromeExtensionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether extension update is required.
|
||||
* @param minVersion minimal required version
|
||||
* @param extVersion current extension version
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function isUpdateRequired(minVersion, extVersion)
|
||||
{
|
||||
try
|
||||
{
|
||||
var s1 = minVersion.split('.');
|
||||
var s2 = extVersion.split('.');
|
||||
|
||||
var len = Math.max(s1.length, s2.length);
|
||||
for (var i = 0; i < len; i++)
|
||||
{
|
||||
var n1 = 0,
|
||||
n2 = 0;
|
||||
|
||||
if (i < s1.length)
|
||||
n1 = parseInt(s1[i]);
|
||||
if (i < s2.length)
|
||||
n2 = parseInt(s2[i]);
|
||||
|
||||
if (isNaN(n1) || isNaN(n2))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (n1 !== n2)
|
||||
{
|
||||
return n1 > n2;
|
||||
}
|
||||
}
|
||||
|
||||
// will happen if boths version has identical numbers in
|
||||
// their components (even if one of them is longer, has more components)
|
||||
return false;
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
console.error("Failed to parse extension version", e);
|
||||
messageHandler.showError('Error',
|
||||
'Error when trying to detect desktopsharing extension.');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function checkExtInstalled(isInstalledCallback) {
|
||||
if (!chrome.runtime) {
|
||||
// No API, so no extension for sure
|
||||
isInstalledCallback(false);
|
||||
return;
|
||||
}
|
||||
chrome.runtime.sendMessage(
|
||||
config.chromeExtensionId,
|
||||
{ getVersion: true },
|
||||
function (response) {
|
||||
if (!response || !response.version) {
|
||||
// Communication failure - assume that no endpoint exists
|
||||
console.warn("Extension not installed?: " + chrome.runtime.lastError);
|
||||
isInstalledCallback(false);
|
||||
} else {
|
||||
// Check installed extension version
|
||||
var extVersion = response.version;
|
||||
console.log('Extension version is: ' + extVersion);
|
||||
var updateRequired = isUpdateRequired(config.minChromeExtVersion, extVersion);
|
||||
if (updateRequired) {
|
||||
alert(
|
||||
'Jitsi Desktop Streamer requires update. ' +
|
||||
'Changes will take effect after next Chrome restart.');
|
||||
}
|
||||
isInstalledCallback(!updateRequired);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function doGetStreamFromExtension(streamCallback, failCallback) {
|
||||
// Sends 'getStream' msg to the extension. Extension id must be defined in the config.
|
||||
chrome.runtime.sendMessage(
|
||||
config.chromeExtensionId,
|
||||
{ getStream: true, sources: config.desktopSharingSources },
|
||||
function (response) {
|
||||
if (!response) {
|
||||
failCallback(chrome.runtime.lastError);
|
||||
return;
|
||||
}
|
||||
console.log("Response from extension: " + response);
|
||||
if (response.streamId) {
|
||||
RTC.getUserMediaWithConstraints(
|
||||
['desktop'],
|
||||
function (stream) {
|
||||
streamCallback(stream);
|
||||
},
|
||||
failCallback,
|
||||
null, null, null,
|
||||
response.streamId);
|
||||
} else {
|
||||
failCallback("Extension failed to get the stream");
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Asks Chrome extension to call chooseDesktopMedia and gets chrome 'desktop' stream for returned stream token.
|
||||
*/
|
||||
function obtainScreenFromExtension(streamCallback, failCallback) {
|
||||
checkExtInstalled(
|
||||
function (isInstalled) {
|
||||
if (isInstalled) {
|
||||
doGetStreamFromExtension(streamCallback, failCallback);
|
||||
} else {
|
||||
chrome.webstore.install(
|
||||
getWebStoreInstallUrl(),
|
||||
function (arg) {
|
||||
console.log("Extension installed successfully", arg);
|
||||
// We need to reload the page in order to get the access to chrome.runtime
|
||||
window.location.reload(false);
|
||||
},
|
||||
function (arg) {
|
||||
console.log("Failed to install the extension", arg);
|
||||
failCallback(arg);
|
||||
messageHandler.showError('Error',
|
||||
'Failed to install desktop sharing extension');
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {boolean} <tt>true</tt> if desktop sharing feature is available and enabled.
|
||||
*/
|
||||
function isDesktopSharingEnabled() {
|
||||
if (_desktopSharingEnabled === null) {
|
||||
if (obtainDesktopStream === obtainScreenFromExtension) {
|
||||
// Parse chrome version
|
||||
var userAgent = navigator.userAgent.toLowerCase();
|
||||
// We can assume that user agent is chrome, because it's enforced when 'ext' streaming method is set
|
||||
var ver = parseInt(userAgent.match(/chrome\/(\d+)\./)[1], 10);
|
||||
console.log("Chrome version" + userAgent, ver);
|
||||
_desktopSharingEnabled = ver >= 34;
|
||||
} else {
|
||||
_desktopSharingEnabled = obtainDesktopStream === obtainWebRTCScreen;
|
||||
}
|
||||
}
|
||||
return _desktopSharingEnabled;
|
||||
}
|
||||
|
||||
function showDesktopSharingButton() {
|
||||
if (isDesktopSharingEnabled()) {
|
||||
$('#desktopsharing').css({display: "inline"});
|
||||
} else {
|
||||
$('#desktopsharing').css({display: "none"});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this method to toggle desktop sharing feature.
|
||||
* @param method pass "ext" to use chrome extension for desktop capture(chrome extension required),
|
||||
* pass "webrtc" to use WebRTC "screen" desktop source('chrome://flags/#enable-usermedia-screen-capture'
|
||||
* must be enabled), pass any other string or nothing in order to disable this feature completely.
|
||||
*/
|
||||
function setDesktopSharing(method) {
|
||||
// Check if we are running chrome
|
||||
if (!navigator.webkitGetUserMedia) {
|
||||
obtainDesktopStream = null;
|
||||
console.info("Desktop sharing disabled");
|
||||
} else if (method == "ext") {
|
||||
obtainDesktopStream = obtainScreenFromExtension;
|
||||
console.info("Using Chrome extension for desktop sharing");
|
||||
} else if (method == "webrtc") {
|
||||
obtainDesktopStream = obtainWebRTCScreen;
|
||||
console.info("Using Chrome WebRTC for desktop sharing");
|
||||
}
|
||||
|
||||
// Reset enabled cache
|
||||
_desktopSharingEnabled = null;
|
||||
|
||||
showDesktopSharingButton();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes <link rel=chrome-webstore-item /> with extension id set in config.js to support inline installs.
|
||||
* Host site must be selected as main website of published extension.
|
||||
*/
|
||||
function initInlineInstalls()
|
||||
{
|
||||
$("link[rel=chrome-webstore-item]").attr("href", getWebStoreInstallUrl());
|
||||
}
|
||||
|
||||
function getSwitchStreamFailed(error) {
|
||||
console.error("Failed to obtain the stream to switch to", error);
|
||||
switchInProgress = false;
|
||||
}
|
||||
|
||||
function streamSwitchDone() {
|
||||
//window.setTimeout(
|
||||
// function () {
|
||||
switchInProgress = false;
|
||||
Toolbar.changeDesktopSharingButtonState(isUsingScreenStream);
|
||||
// }, 100
|
||||
//);
|
||||
}
|
||||
|
||||
function newStreamCreated(stream) {
|
||||
|
||||
var oldStream = connection.jingle.localVideo;
|
||||
|
||||
connection.jingle.localVideo = stream;
|
||||
|
||||
VideoLayout.changeLocalVideo(stream, !isUsingScreenStream);
|
||||
|
||||
var conferenceHandler = getConferenceHandler();
|
||||
if (conferenceHandler) {
|
||||
// FIXME: will block switchInProgress on true value in case of exception
|
||||
conferenceHandler.switchStreams(stream, oldStream, streamSwitchDone);
|
||||
} else {
|
||||
// We are done immediately
|
||||
console.error("No conference handler");
|
||||
messageHandler.showError('Error',
|
||||
'Unable to switch video stream.');
|
||||
streamSwitchDone();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Toggles screen sharing.
|
||||
*/
|
||||
function toggleScreenSharing() {
|
||||
if (switchInProgress || !obtainDesktopStream) {
|
||||
console.warn("Switch in progress or no method defined");
|
||||
return;
|
||||
}
|
||||
switchInProgress = true;
|
||||
|
||||
if (!isUsingScreenStream)
|
||||
{
|
||||
// Switch to desktop stream
|
||||
obtainDesktopStream(
|
||||
function (stream) {
|
||||
// We now use screen stream
|
||||
isUsingScreenStream = true;
|
||||
// Hook 'ended' event to restore camera when screen stream stops
|
||||
stream.addEventListener('ended',
|
||||
function (e) {
|
||||
if (!switchInProgress && isUsingScreenStream) {
|
||||
toggleScreenSharing();
|
||||
}
|
||||
}
|
||||
);
|
||||
newStreamCreated(stream);
|
||||
},
|
||||
getSwitchStreamFailed);
|
||||
} else {
|
||||
// Disable screen stream
|
||||
RTC.getUserMediaWithConstraints(
|
||||
['video'],
|
||||
function (stream) {
|
||||
// We are now using camera stream
|
||||
isUsingScreenStream = false;
|
||||
newStreamCreated(stream);
|
||||
},
|
||||
getSwitchStreamFailed, config.resolution || '360'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
12
doc/adding-an-icon.md
Normal file
@@ -0,0 +1,12 @@
|
||||
### Adding an icon to the font file (e.g. for the floating menu)
|
||||
1. Go to https://icomoon.io/app/
|
||||
2. Go to "Manage Projects" from the menu on the top left.
|
||||
3. Use "Import project" and select <code>fonts/selection.json</code> from Jitsi Meet.
|
||||
4. Import icons (e.g. svg files) using the "import items" button.
|
||||
5. Go to "generate font" and make sure the identifiers for the new icons are correct.
|
||||
6. Download the result in a zip file using the "download" button.
|
||||
7. Copy <code>selection.json</code> and <code>fonts/jitsi.*</code> from the zip file to <code>fonts/</code> in Jitsi Meet
|
||||
8. Copy the class for the new icon from <code>style.css</code> in the zip file to <code>css/font.css</code> in Jitsi Meet (do *not* copy the whole file)
|
||||
|
||||
Sample commit: https://github.com/jitsi/jitsi-meet/commit/68bc819b89aec12364fcf07b81efa83a1900eed6
|
||||
|
||||
@@ -16,6 +16,7 @@ VirtualHost "jitmeet.example.com"
|
||||
}
|
||||
|
||||
Component "conference.jitmeet.example.com" "muc"
|
||||
admins = { "focusUser@auth.jitmeet.example.com" }
|
||||
|
||||
Component "jitsi-videobridge.jitmeet.example.com"
|
||||
component_secret = "jitmeetSecret"
|
||||
@@ -23,7 +24,5 @@ Component "jitsi-videobridge.jitmeet.example.com"
|
||||
VirtualHost "auth.jitmeet.example.com"
|
||||
authentication = "internal_plain"
|
||||
|
||||
admins = { "focusUser@auth.jitmeet.example.com" }
|
||||
|
||||
Component "focus.jitmeet.example.com"
|
||||
component_secret = "focusSecret"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
server_names_hash_bucket_size 64;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name jitsi-meet.example.com;
|
||||
@@ -17,7 +19,7 @@ server {
|
||||
alias /etc/jitsi/meet/jitsi-meet.example.com-config.js;
|
||||
}
|
||||
|
||||
location ~ ^/([a-zA-Z0-9]+)$ {
|
||||
location ~ ^/([a-zA-Z0-9=\?]+)$ {
|
||||
rewrite ^/(.*)$ / break;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ server {
|
||||
root /srv/jitsi.example.com;
|
||||
index index.html;
|
||||
|
||||
location ~ ^/([a-zA-Z0-9]+)$ {
|
||||
location ~ ^/([a-zA-Z0-9=\?]+)$ {
|
||||
rewrite ^/(.*)$ / break;
|
||||
}
|
||||
|
||||
|
||||
29
doc/influxdb.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Overview
|
||||
Jitsi Meet supports logging to an [InfluxDB](http://influxdb.com/) database.
|
||||
|
||||
# Configuration
|
||||
The following needs to be done to enable this functionality.
|
||||
|
||||
## Install InfluxDB
|
||||
The details are outside the scope of the document, see http://influxdb.com/download/ .
|
||||
|
||||
## Create an InfluxDB database
|
||||
Use the InfluxDB admin interface (running on port 8083) and create a database. In this example we name it <code>jitsi_database</code>
|
||||
|
||||
## Enable logging for Jitsi Videobridge
|
||||
Add the following properties to <code>/usr/share/jitsi-videobridge/.sip-communicator/sip-communicator.properties</code>.
|
||||
|
||||
- org.jitsi.videobridge.log.INFLUX_DB_ENABLED=true
|
||||
- org.jitsi.videobridge.log.INFLUX_URL_BASE=http://influxdb.example.com:8086
|
||||
- org.jitsi.videobridge.log.INFLUX_DATABASE=jitsi_database
|
||||
- org.jitsi.videobridge.log.INFLUX_USER=user
|
||||
- org.jitsi.videobridge.log.INFLUX_PASS=pass
|
||||
|
||||
## Enable logging for Jicofo
|
||||
Add the same properties as above to <code>/usr/share/jicofo/.sip-communicator/sip-communicator.properties</code>.
|
||||
|
||||
## Enable logging for Jitsi Meet itself
|
||||
Change "logStats" to "true" in <code>/etc/jitsi/meet/you-domain.config.js</code> or the <code>config.js</code> file used in your installation.
|
||||
|
||||
# User interface
|
||||
You can explore the database using the [Jiloin](https://github.com/jitsi/jiloin) web interface.
|
||||
@@ -1,39 +1,21 @@
|
||||
# Server Installation for Jitsi Meet
|
||||
|
||||
This describes configuring a server `jitsi.example.com`. You will need to
|
||||
This describes configuring a server `jitsi.example.com` running Debian or a Debian Derivative. You will need to
|
||||
change references to that to match your host, and generate some passwords for
|
||||
`YOURSECRET1`, `YOURSECRET2`, `YOURSECRET3` and `YOURSECRET4`.
|
||||
|
||||
There are also some complete [example config files](https://github.com/jitsi/jitsi-meet/tree/master/doc/example-config-files/) available, mentioned in each section.
|
||||
|
||||
## Install prosody and otalk modules
|
||||
## Install prosody
|
||||
```sh
|
||||
apt-get install lsb-release
|
||||
echo deb http://packages.prosody.im/debian $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list
|
||||
wget --no-check-certificate https://prosody.im/files/prosody-debian-packages.key -O- | sudo apt-key add -
|
||||
apt-get update
|
||||
apt-get install prosody-trunk
|
||||
apt-get install git lua-zlib lua-sec-prosody lua-dbi-sqlite3 liblua5.1-bitop-dev liblua5.1-bitop0
|
||||
git clone https://github.com/andyet/otalk-server.git
|
||||
cd otalk-server
|
||||
cp -r mod* /usr/lib/prosody/modules
|
||||
apt-get install prosody
|
||||
```
|
||||
|
||||
## Configure prosody
|
||||
Modify the config file in `/etc/prosody/prosody.cfg.lua` (see also the example config file):
|
||||
Add config file in `/etc/prosody/conf.avail/jitsi.example.com.cfg.lua` :
|
||||
|
||||
- add your domain virtual host section:
|
||||
|
||||
- modules to enable/add: compression, bosh, smacks, carbons, mam, lastactivity, offline, pubsub, adhoc, websocket, http_altconnect
|
||||
- comment out: `c2s_require_encryption = true`, and `s2s_secure_auth = false`
|
||||
- change `authentication = "internal_hashed"`
|
||||
- add this:
|
||||
```
|
||||
daemonize = true
|
||||
cross_domain_bosh = true;
|
||||
storage = {archive2 = "sql2"}
|
||||
sql = { driver = "SQLite3", database = "prosody.sqlite" }
|
||||
default_archive_policy = "roster"
|
||||
```
|
||||
- configure your domain by editing the example.com virtual host section section:
|
||||
```
|
||||
VirtualHost "jitsi.example.com"
|
||||
authentication = "anonymous"
|
||||
@@ -41,15 +23,15 @@ VirtualHost "jitsi.example.com"
|
||||
key = "/var/lib/prosody/jitsi.example.com.key";
|
||||
certificate = "/var/lib/prosody/jitsi.example.com.crt";
|
||||
}
|
||||
modules_enabled = {
|
||||
"bosh";
|
||||
"pubsub";
|
||||
}
|
||||
```
|
||||
- add domain with authentication for conference focus user:
|
||||
```
|
||||
VirtualHost "auth.jitsi.example.com"
|
||||
authentication = "internal_plain"
|
||||
ssl = {
|
||||
key = "/var/lib/prosody/jitsi.example.com.key";
|
||||
certificate = "/var/lib/prosody/jitsi.example.com.crt";
|
||||
}
|
||||
```
|
||||
- add focus user to server admins:
|
||||
```
|
||||
@@ -64,6 +46,11 @@ Component "focus.jitsi.example.com"
|
||||
component_secret = "YOURSECRET2"
|
||||
```
|
||||
|
||||
Add link for the added configuration
|
||||
```sh
|
||||
ln -s /etc/prosody/conf.avail/jitsi.example.com.cfg.lua /etc/prosody/conf.d/jitsi.example.com.cfg.lua
|
||||
```
|
||||
|
||||
Generate certs for the domain:
|
||||
```sh
|
||||
prosodyctl cert generate jitsi.example.com
|
||||
@@ -84,39 +71,28 @@ prosodyctl restart
|
||||
apt-get install nginx
|
||||
```
|
||||
|
||||
Add nginx config for domain in `/etc/nginx/nginx.conf`:
|
||||
```
|
||||
tcp_nopush on;
|
||||
types_hash_max_size 2048;
|
||||
server_names_hash_bucket_size 64;
|
||||
```
|
||||
|
||||
Add a new file `jitsi.example.com` in `/etc/nginx/sites-available` (see also the example config file):
|
||||
```
|
||||
server_names_hash_bucket_size 64;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name jitsi.example.com;
|
||||
# set the root
|
||||
root /srv/jitsi.example.com;
|
||||
index index.html;
|
||||
location ~ ^/([a-zA-Z0-9]+)$ {
|
||||
location ~ ^/([a-zA-Z0-9=\?]+)$ {
|
||||
rewrite ^/(.*)$ / break;
|
||||
}
|
||||
location / {
|
||||
ssi on;
|
||||
}
|
||||
# BOSH
|
||||
location /http-bind {
|
||||
proxy_pass http://localhost:5280/http-bind;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header Host $http_host;
|
||||
}
|
||||
# xmpp websockets
|
||||
location /xmpp-websocket {
|
||||
proxy_pass http://localhost:5280;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
tcp_nodelay on;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -126,12 +102,6 @@ cd /etc/nginx/sites-enabled
|
||||
ln -s ../sites-available/jitsi.example.com jitsi.example.com
|
||||
```
|
||||
|
||||
## Fix firewall if needed
|
||||
```sh
|
||||
ufw allow 80
|
||||
ufw allow 5222
|
||||
```
|
||||
|
||||
## Install Jitsi Videobridge
|
||||
```sh
|
||||
wget https://download.jitsi.org/jitsi-videobridge/linux/jitsi-videobridge-linux-{arch-buildnum}.zip
|
||||
@@ -143,6 +113,8 @@ Install JRE if missing:
|
||||
apt-get install default-jre
|
||||
```
|
||||
|
||||
_NOTE: When installing on older Debian releases keep in mind that you need JRE >= 1.7._
|
||||
|
||||
In the user home that will be starting Jitsi Videobridge create `.sip-communicator` folder and add the file `sip-communicator.properties` with one line in it:
|
||||
```
|
||||
org.jitsi.impl.neomedia.transform.srtp.SRTPCryptoContext.checkReplay=false
|
||||
@@ -157,7 +129,15 @@ Or autostart it by adding the line in `/etc/rc.local`:
|
||||
/bin/bash /root/jitsi-videobridge-linux-{arch-buildnum}/jvb.sh --host=localhost --domain=jitsi.example.com --port=5347 --secret=YOURSECRET1 </dev/null >> /var/log/jvb.log 2>&1
|
||||
```
|
||||
|
||||
## Install Jitsi Conference Focus(jicofo)
|
||||
## Install Jitsi Conference Focus (jicofo)
|
||||
|
||||
Install JDK and Ant if missing:
|
||||
```
|
||||
apt-get install default-jdk ant
|
||||
```
|
||||
|
||||
_NOTE: When installing on older Debian releases keep in mind that you need JDK >= 1.7._
|
||||
|
||||
Clone source from Github repo:
|
||||
```sh
|
||||
git clone https://github.com/jitsi/jicofo.git
|
||||
@@ -202,54 +182,6 @@ Restart nginx to get the new configuration:
|
||||
invoke-rc.d nginx restart
|
||||
```
|
||||
|
||||
|
||||
## Install [Turn server](https://github.com/andyet/otalk-server/tree/master/restund)
|
||||
```sh
|
||||
apt-get install make gcc
|
||||
wget http://creytiv.com/pub/re-0.4.7.tar.gz
|
||||
tar zxvf re-0.4.7.tar.gz
|
||||
ln -s re-0.4.7 re
|
||||
cd re-0.4.7
|
||||
sudo make install PREFIX=/usr
|
||||
cd ..
|
||||
wget http://creytiv.com/pub/restund-0.4.2.tar.gz
|
||||
wget https://raw.github.com/andyet/otalk-server/master/restund/restund-auth.patch
|
||||
tar zxvf restund-0.4.2.tar.gz
|
||||
cd restund-0.4.2/
|
||||
patch -p1 < ../restund-auth.patch
|
||||
sudo make install PREFIX=/usr
|
||||
cp debian/restund.init /etc/init.d/restund
|
||||
chmod +x /etc/init.d/restund
|
||||
cd /etc
|
||||
wget https://raw.github.com/andyet/otalk-server/master/restund/restund.conf
|
||||
```
|
||||
|
||||
Configure addresses and ports as desired, and the password to be configured in prosody:
|
||||
```
|
||||
realm jitsi.example.com
|
||||
# share this with your prosody server
|
||||
auth_shared YOURSECRET4
|
||||
|
||||
# modules
|
||||
module_path /usr/lib/restund/modules
|
||||
turn_relay_addr [turn ip address]
|
||||
```
|
||||
|
||||
Configure prosody to use it in `/etc/prosody/prosody.cfg.lua`. Add to your virtual host:
|
||||
```
|
||||
turncredentials_secret = "YOURSECRET4";
|
||||
turncredentials = {
|
||||
{ type = "turn", host = "turn.address.ip.configured", port = 3478, transport = "tcp" }
|
||||
}
|
||||
```
|
||||
|
||||
Add turncredentials module in the "modules_enabled" section
|
||||
|
||||
Reload prosody if needed
|
||||
```
|
||||
prosodyctl restart
|
||||
```
|
||||
|
||||
## Running behind NAT
|
||||
In case of videobridge being installed on a machine behind NAT, add the following extra lines to the file `~/.sip-communicator/sip-communicator.properties` (in the home of user running the videobridge):
|
||||
```
|
||||
|
||||
17
estos_log.js
@@ -1,17 +0,0 @@
|
||||
/* global Strophe */
|
||||
Strophe.addConnectionPlugin('logger', {
|
||||
// logs raw stanzas and makes them available for download as JSON
|
||||
connection: null,
|
||||
log: [],
|
||||
init: function (conn) {
|
||||
this.connection = conn;
|
||||
this.connection.rawInput = this.log_incoming.bind(this);
|
||||
this.connection.rawOutput = this.log_outgoing.bind(this);
|
||||
},
|
||||
log_incoming: function (stanza) {
|
||||
this.log.push([new Date().getTime(), 'incoming', stanza]);
|
||||
},
|
||||
log_outgoing: function (stanza) {
|
||||
this.log.push([new Date().getTime(), 'outgoing', stanza]);
|
||||
},
|
||||
});
|
||||
206
etherpad.js
@@ -1,206 +0,0 @@
|
||||
/* global $, config, connection, dockToolbar, Moderator, Prezi,
|
||||
setLargeVideoVisible, ToolbarToggler, Util, VideoLayout */
|
||||
var Etherpad = (function (my) {
|
||||
var etherpadName = null;
|
||||
var etherpadIFrame = null;
|
||||
var domain = null;
|
||||
var options = "?showControls=true&showChat=false&showLineNumbers=true&useMonospaceFont=false";
|
||||
|
||||
/**
|
||||
* Initializes the etherpad.
|
||||
*/
|
||||
my.init = function (name) {
|
||||
|
||||
if (config.etherpad_base && !etherpadName) {
|
||||
|
||||
domain = config.etherpad_base;
|
||||
|
||||
if (!name) {
|
||||
// In case we're the focus we generate the name.
|
||||
etherpadName = Math.random().toString(36).substring(7) +
|
||||
'_' + (new Date().getTime()).toString();
|
||||
shareEtherpad();
|
||||
}
|
||||
else
|
||||
etherpadName = name;
|
||||
|
||||
enableEtherpadButton();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Opens/hides the Etherpad.
|
||||
*/
|
||||
my.toggleEtherpad = function (isPresentation) {
|
||||
if (!etherpadIFrame)
|
||||
createIFrame();
|
||||
|
||||
var largeVideo = null;
|
||||
if (Prezi.isPresentationVisible())
|
||||
largeVideo = $('#presentation>iframe');
|
||||
else
|
||||
largeVideo = $('#largeVideo');
|
||||
|
||||
if ($('#etherpad>iframe').css('visibility') === 'hidden') {
|
||||
$('#activeSpeaker').css('visibility', 'hidden');
|
||||
largeVideo.fadeOut(300, function () {
|
||||
if (Prezi.isPresentationVisible()) {
|
||||
largeVideo.css({opacity: '0'});
|
||||
} else {
|
||||
VideoLayout.setLargeVideoVisible(false);
|
||||
}
|
||||
});
|
||||
|
||||
$('#etherpad>iframe').fadeIn(300, function () {
|
||||
document.body.style.background = '#eeeeee';
|
||||
$('#etherpad>iframe').css({visibility: 'visible'});
|
||||
$('#etherpad').css({zIndex: 2});
|
||||
});
|
||||
}
|
||||
else if ($('#etherpad>iframe')) {
|
||||
$('#etherpad>iframe').fadeOut(300, function () {
|
||||
$('#etherpad>iframe').css({visibility: 'hidden'});
|
||||
$('#etherpad').css({zIndex: 0});
|
||||
document.body.style.background = 'black';
|
||||
});
|
||||
|
||||
if (!isPresentation) {
|
||||
$('#largeVideo').fadeIn(300, function () {
|
||||
VideoLayout.setLargeVideoVisible(true);
|
||||
});
|
||||
}
|
||||
}
|
||||
resize();
|
||||
};
|
||||
|
||||
my.isVisible = function() {
|
||||
var etherpadIframe = $('#etherpad>iframe');
|
||||
return etherpadIframe && etherpadIframe.is(':visible');
|
||||
};
|
||||
|
||||
/**
|
||||
* Resizes the etherpad.
|
||||
*/
|
||||
function resize() {
|
||||
if ($('#etherpad>iframe').length) {
|
||||
var remoteVideos = $('#remoteVideos');
|
||||
var availableHeight
|
||||
= window.innerHeight - remoteVideos.outerHeight();
|
||||
var availableWidth = Util.getAvailableVideoWidth();
|
||||
|
||||
$('#etherpad>iframe').width(availableWidth);
|
||||
$('#etherpad>iframe').height(availableHeight);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Shares the Etherpad name with other participants.
|
||||
*/
|
||||
function shareEtherpad() {
|
||||
connection.emuc.addEtherpadToPresence(etherpadName);
|
||||
connection.emuc.sendPresence();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the Etherpad button and adds it to the toolbar.
|
||||
*/
|
||||
function enableEtherpadButton() {
|
||||
if (!$('#etherpadButton').is(":visible"))
|
||||
$('#etherpadButton').css({display: 'inline-block'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the IFrame for the etherpad.
|
||||
*/
|
||||
function createIFrame() {
|
||||
etherpadIFrame = document.createElement('iframe');
|
||||
etherpadIFrame.src = domain + etherpadName + options;
|
||||
etherpadIFrame.frameBorder = 0;
|
||||
etherpadIFrame.scrolling = "no";
|
||||
etherpadIFrame.width = $('#largeVideoContainer').width() || 640;
|
||||
etherpadIFrame.height = $('#largeVideoContainer').height() || 480;
|
||||
etherpadIFrame.setAttribute('style', 'visibility: hidden;');
|
||||
|
||||
document.getElementById('etherpad').appendChild(etherpadIFrame);
|
||||
|
||||
etherpadIFrame.onload = function() {
|
||||
|
||||
document.domain = document.domain;
|
||||
bubbleIframeMouseMove(etherpadIFrame);
|
||||
setTimeout(function() {
|
||||
//the iframes inside of the etherpad are not yet loaded when the etherpad iframe is loaded
|
||||
var outer = etherpadIFrame.contentDocument.getElementsByName("ace_outer")[0];
|
||||
bubbleIframeMouseMove(outer);
|
||||
var inner = outer.contentDocument.getElementsByName("ace_inner")[0];
|
||||
bubbleIframeMouseMove(inner);
|
||||
}, 2000);
|
||||
};
|
||||
}
|
||||
|
||||
function bubbleIframeMouseMove(iframe){
|
||||
var existingOnMouseMove = iframe.contentWindow.onmousemove;
|
||||
iframe.contentWindow.onmousemove = function(e){
|
||||
if(existingOnMouseMove) existingOnMouseMove(e);
|
||||
var evt = document.createEvent("MouseEvents");
|
||||
var boundingClientRect = iframe.getBoundingClientRect();
|
||||
evt.initMouseEvent(
|
||||
"mousemove",
|
||||
true, // bubbles
|
||||
false, // not cancelable
|
||||
window,
|
||||
e.detail,
|
||||
e.screenX,
|
||||
e.screenY,
|
||||
e.clientX + boundingClientRect.left,
|
||||
e.clientY + boundingClientRect.top,
|
||||
e.ctrlKey,
|
||||
e.altKey,
|
||||
e.shiftKey,
|
||||
e.metaKey,
|
||||
e.button,
|
||||
null // no related element
|
||||
);
|
||||
iframe.dispatchEvent(evt);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* On Etherpad added to muc.
|
||||
*/
|
||||
$(document).bind('etherpadadded.muc', function (event, jid, etherpadName) {
|
||||
console.log("Etherpad added", etherpadName);
|
||||
if (config.etherpad_base && !Moderator.isModerator()) {
|
||||
Etherpad.init(etherpadName);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* On focus changed event.
|
||||
*/
|
||||
// FIXME: there is no such event as 'focusechanged.muc'
|
||||
$(document).bind('focusechanged.muc', function (event, focus) {
|
||||
console.log("Focus changed");
|
||||
if (config.etherpad_base)
|
||||
shareEtherpad();
|
||||
});
|
||||
|
||||
/**
|
||||
* On video selected event.
|
||||
*/
|
||||
$(document).bind('video.selected', function (event, isPresentation) {
|
||||
if (!config.etherpad_base)
|
||||
return;
|
||||
|
||||
if (etherpadIFrame && etherpadIFrame.style.visibility !== 'hidden')
|
||||
Etherpad.toggleEtherpad(isPresentation);
|
||||
});
|
||||
|
||||
/**
|
||||
* Resizes the etherpad, when the window is resized.
|
||||
*/
|
||||
$(window).resize(function () {
|
||||
resize();
|
||||
});
|
||||
|
||||
return my;
|
||||
}(Etherpad || {}));
|
||||
BIN
fonts/jitsi.eot
@@ -35,4 +35,5 @@
|
||||
<glyph unicode="" d="M46.993 961.7c461.234 0 553.793 0 1015.024 0 35.919 0 53.356-25.959 53.356-57.959-0.581-303.259-0.325-606.488-0.449-909.809 0-43.984-13.203-57.058-57.703-57.058-443.072-0.126-556.453-0.126-999.553 0-44.534 0-57.799 13.009-57.799 57.058-0.098 303.257 0.485 608.072-0.093 911.329-0.034 26.21 11.301 53.761 47.217 56.439zM311.405 450.298c0-119.045-0.072-172.168 0.057-291.249 0.036-50.043 11.208-61.050 62.12-61.050 233.352 0 137.075 0 370.522 0 47.075 0 59.249 11.982 59.249 58.095 0.126 239.111 0.126 346.338 0 585.389 0 48.138-10.687 58.991-57.768 58.991-235.323 0.101-140.844 0.101-376.157 0-47.044 0-57.93-11.043-57.966-58.89-0.129-119.109-0.057-172.209-0.057-291.287zM153.944 838.566c-74.929-0.062-66.687 5.958-66.845-66.685-0.201-63.95-7.054-63.534 62.528-63.372 72.999 0.194 67.201-3.764 67.302 67.554 0 67.722 4.087 62.595-62.985 62.502zM963.644 838.566c-71.159-0.034-65.56 6.185-65.751-65.364-0.129-67.302-4.508-64.693 64.528-64.693 73.089 0 65.299-2.031 65.299 66.238-0.003 68.646 6.956 63.911-64.076 63.818zM216.828 122.408c0.359 73.094 4.639 66.914-67.358 67.17-68.104 0.191-62.569 2.763-62.407-63.31 0.129-73.476-6.954-66.52 67.074-66.649 66.042-0.065 63.142-6.056 62.691 62.789zM1027.718 124.4c0.134 68.334 6.443 65.304-63.297 65.178-70.132-0.132-66.656 5.793-66.527-65.304 0.129-70.645-4.384-64.721 63.756-64.657 71.995 0.132 66.202-6.698 66.068 64.783zM1027.718 342.077c0 70.55 7.219 66.842-67.485 66.522-0.898 0-1.873 0-2.838 0-59.375 0-59.375 0-59.375-58.023 0-77.922-6.443-69.936 69.293-70.196 66.076-0.387 60.539-3.091 60.405 61.697zM151.307 489.873c68.295-0.163 65.815-5.568 65.624 62.982-0.194 71.128 4.895 64.917-66.014 65.010-69.905 0.101-63.813 4.704-63.885-63.978-0.062-67.431-5.7-64.463 64.275-64.014zM961.263 489.873c72.511-0.258 66.589-4.603 66.455 64.494 0 68.558 6.185 63.537-64.267 63.498-70.196-0.028-65.686 6.053-65.498-65.493 0.132-62.5 0.067-62.5 63.31-62.5zM150.399 280.38c71.004 0 66.659-6.567 66.466 64.528-0.163 63.694-0.036 63.501-65.013 63.756-70.805 0.258-64.822 2.673-64.822-63.756 0.036-69.167-5.919-64.788 63.369-64.528z" horiz-adv-x="1115" />
|
||||
<glyph unicode="" d="M3.881 146.835h220.26v-210.835h-220.26v210.835zM308.817 350.143h220.27v-414.143h-220.27v414.143zM613.764 553.412h220.268v-617.412h-220.268v617.412zM918.685 756.715h220.265v-820.715h-220.265v820.715zM1223.629 960h220.263v-1024h-220.263v1024z" horiz-adv-x="1444" />
|
||||
<glyph unicode="" d="M526.071 234.749c-28.637-30.869-56.465-60.861-84.282-90.859-51.578-55.636-103.047-111.376-154.842-166.832-7.606-8.135-15.958-16.1-25.317-22.012-28.075-17.708-58.31-18.090-88.472-6.492-59.84 23.028-80.004 90.727-59.734 139.234 5.413 12.95 13.721 23.601 23.709 33.173 70.256 67.351 140.506 134.717 210.76 202.077 15.638 14.993 31.264 29.995 47.364 45.45-9.302 9.529-18.386 18.833-27.451 28.137-12.122 12.442-13.234 20.28-5.067 35.498 4.735 8.816 4.789 8.878-2.627 16.198-20.012 19.72-40.168 39.198-63.498 55.188-27.167 18.624-57.161 24.233-89.083 19.849-53.402-7.328-91.609-38.372-121.413-81.046-12.774-18.299-15.365-40.313-17.517-61.875-3.23-32.245-2.415-64.479 2.209-96.597 1.654-11.515-3.863-16.539-13.835-11.175-8.306 4.448-16.095 11.048-22.115 18.353-15.574 18.89-22.223 42.042-27.474 65.395-12.955 57.652-8.86 114.49 12.191 169.495 32.345 84.537 79.743 159.571 145.953 221.932 13.659 12.857 176.841 180.564 202.944 207.021 7.493 7.599 14.895 7.635 22.393 0.028 43.009-43.641 85.985-87.316 128.927-131.029 8.117-8.267 8.019-15.097-0.222-23.49-26.339-26.834-52.726-53.627-79.106-80.419-6.244-6.334-97.34-82.437-73.027-128.816 22.693-25.090 46.196-49.449 69.575-73.904 1.189-1.238 4.686-1.386 6.523-0.632 3.63 1.499 6.848 3.997 10.248 6.066 9.745 5.94 19.545 4.918 27.812-3.083 11.755-11.381 23.405-22.858 35.392-34.59 4.807 4.575 9.939 9.41 15.027 14.294 27.128 26.039 54.272 52.071 81.351 78.146 16.413 15.778 18.652 28.418 11.038 49.658-10.473 29.221-14.356 59.677-13.85 90.624 1.017 61.045 20.438 115.334 61.003 161.416 32.825 37.286 72.054 64.311 121.643 74.325 35.227 7.101 69.139 4.513 100.663-14.026 6.365-3.752 11.908-9.007 17.455-14.005 3.491-3.125 3.153-6.236-0.565-9.98-42.503-42.885-84.772-86.013-127.154-129.035-12.442-12.638-12.356-23.167 0.196-35.914 40.344-40.978 80.597-82.050 120.936-123.052 10.076-10.233 19.537-10.021 29.504 0.134 43.195 44.077 86.449 88.090 129.706 132.118 1.21 1.233 2.572 2.322 5.135 4.624 5.491-5.893 11.895-10.924 15.961-17.406 19.452-30.944 22.608-64.83 17.073-100.25-14.253-91.080-97.188-175.638-197.712-190.123-39.977-5.764-79.372-2.562-118.067 9.031-5.898 1.775-11.541 4.629-17.538 5.829-12.47 2.474-23.872-0.366-32.74-9.877-30.921-33.168-61.674-66.484-92.474-99.758-0.73-0.805-1.349-1.718-0.181-1.099 8.992-10.006 17.354-20.662 27.061-29.94 81.064-77.54 164.91-151.986 250.882-224.063 9.936-8.347 10.274-15.695 1.040-25.1-42.338-43.068-84.689-86.111-127.059-129.154-9.413-9.575-16.846-9.152-25.291 1.295-76.686 94.78-156.8 186.609-239.707 276.002-1.334 1.453-2.562 3.029-4.257 5.042z" horiz-adv-x="1105" />
|
||||
<glyph unicode="" d="M74.418 881.299h239.304v-228.491h-239.304v228.491zM393.455 881.299h239.304v-228.491h-239.304v228.491zM712.494 881.299h239.263v-228.491h-239.263v228.491zM74.418 562.265h239.304v-228.555h-239.304v228.555zM393.455 562.265h239.304v-228.555h-239.304v228.555zM712.494 562.265h239.263v-228.555h-239.263v228.555zM74.418 243.166h239.304v-228.465h-239.304v228.465zM393.455 243.166h239.304v-228.465h-239.304v228.465zM712.494 243.166h239.263v-228.465h-239.263v228.465z" horiz-adv-x="1026" />
|
||||
</font></defs></svg>
|
||||
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 34 KiB |
BIN
fonts/jitsi.ttf
BIN
fonts/jitsi.woff
@@ -1,6 +1,59 @@
|
||||
{
|
||||
"IcoMoonType": "selection",
|
||||
"icons": [
|
||||
{
|
||||
"icon": {
|
||||
"paths": [
|
||||
"M74.418 78.701h239.304v228.491h-239.304v-228.491z",
|
||||
"M393.455 78.701h239.304v228.491h-239.304v-228.491z",
|
||||
"M712.494 78.701h239.263v228.491h-239.263v-228.491z",
|
||||
"M74.418 397.735h239.304v228.555h-239.304v-228.555z",
|
||||
"M393.455 397.735h239.304v228.555h-239.304v-228.555z",
|
||||
"M712.494 397.735h239.263v228.555h-239.263v-228.555z",
|
||||
"M74.418 716.834h239.304v228.465h-239.304v-228.465z",
|
||||
"M393.455 716.834h239.304v228.465h-239.304v-228.465z",
|
||||
"M712.494 716.834h239.263v228.465h-239.263v-228.465z"
|
||||
],
|
||||
"attrs": [
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{}
|
||||
],
|
||||
"isMulticolor": false,
|
||||
"width": 1026,
|
||||
"grid": 0,
|
||||
"tags": [
|
||||
"dailPad"
|
||||
]
|
||||
},
|
||||
"attrs": [
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{}
|
||||
],
|
||||
"properties": {
|
||||
"order": 29,
|
||||
"id": 0,
|
||||
"prevSize": 32,
|
||||
"code": 58908,
|
||||
"name": "dialPad"
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setId": 2,
|
||||
"iconIdx": 0
|
||||
},
|
||||
{
|
||||
"icon": {
|
||||
"paths": [
|
||||
@@ -31,7 +84,8 @@
|
||||
"code": 58907,
|
||||
"name": "settings"
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 0
|
||||
},
|
||||
{
|
||||
@@ -74,7 +128,8 @@
|
||||
"name": "webCam",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 1
|
||||
},
|
||||
{
|
||||
@@ -144,7 +199,8 @@
|
||||
"name": "connection",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 2
|
||||
},
|
||||
{
|
||||
@@ -168,7 +224,8 @@
|
||||
"name": "filmstrip",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 3
|
||||
},
|
||||
{
|
||||
@@ -194,7 +251,8 @@
|
||||
"name": "reload",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 4
|
||||
},
|
||||
{
|
||||
@@ -218,7 +276,8 @@
|
||||
"name": "hangup",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 5
|
||||
},
|
||||
{
|
||||
@@ -242,7 +301,8 @@
|
||||
"name": "contactList",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 6
|
||||
},
|
||||
{
|
||||
@@ -267,7 +327,8 @@
|
||||
"name": "avatar",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 7
|
||||
},
|
||||
{
|
||||
@@ -292,7 +353,8 @@
|
||||
"name": "callRetro",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 8
|
||||
},
|
||||
{
|
||||
@@ -317,7 +379,8 @@
|
||||
"name": "callModern",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 9
|
||||
},
|
||||
{
|
||||
@@ -343,7 +406,8 @@
|
||||
"name": "recDisable",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 10
|
||||
},
|
||||
{
|
||||
@@ -370,7 +434,8 @@
|
||||
"name": "recEnable",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 11
|
||||
},
|
||||
{
|
||||
@@ -395,7 +460,8 @@
|
||||
"name": "kick1",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 12
|
||||
},
|
||||
{
|
||||
@@ -421,7 +487,8 @@
|
||||
"name": "kick",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 13
|
||||
},
|
||||
{
|
||||
@@ -447,7 +514,8 @@
|
||||
"name": "share-desktop",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 14
|
||||
},
|
||||
{
|
||||
@@ -471,7 +539,8 @@
|
||||
"name": "chat-simple",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 15
|
||||
},
|
||||
{
|
||||
@@ -497,7 +566,8 @@
|
||||
"name": "full-screen",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 16
|
||||
},
|
||||
{
|
||||
@@ -523,7 +593,8 @@
|
||||
"name": "exit-full-screen",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 17
|
||||
},
|
||||
{
|
||||
@@ -552,7 +623,8 @@
|
||||
"name": "prezi",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 18
|
||||
},
|
||||
{
|
||||
@@ -595,7 +667,8 @@
|
||||
"name": "addNew-V5",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 19
|
||||
},
|
||||
{
|
||||
@@ -621,7 +694,8 @@
|
||||
"name": "chat",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 20
|
||||
},
|
||||
{
|
||||
@@ -648,7 +722,8 @@
|
||||
"name": "presentation",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 21
|
||||
},
|
||||
{
|
||||
@@ -672,7 +747,8 @@
|
||||
"name": "security",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 22
|
||||
},
|
||||
{
|
||||
@@ -697,7 +773,8 @@
|
||||
"name": "share-doc",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 23
|
||||
},
|
||||
{
|
||||
@@ -721,7 +798,8 @@
|
||||
"name": "security-locked",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 24
|
||||
},
|
||||
{
|
||||
@@ -746,7 +824,8 @@
|
||||
"name": "camera-disabled",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 25
|
||||
},
|
||||
{
|
||||
@@ -772,7 +851,8 @@
|
||||
"name": "mic-disabled",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 26
|
||||
},
|
||||
{
|
||||
@@ -797,7 +877,8 @@
|
||||
"name": "microphone",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"setId": 1,
|
||||
"iconIdx": 27
|
||||
}
|
||||
],
|
||||
|
||||
BIN
images/chrome.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
BIN
images/chromium.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
images/dropdownPointer.png
Normal file
|
After Width: | Height: | Size: 234 B |
BIN
images/firefox-nightly.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
images/firefox.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
images/noMic.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
images/noVideo.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
images/opera.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
229
index.html
@@ -10,82 +10,40 @@
|
||||
<meta itemprop="description" content="Join a WebRTC video conference powered by the Jitsi Videobridge"/>
|
||||
<meta itemprop="image" content="/images/jitsilogo.png"/>
|
||||
<script src="libs/jquery-2.1.1.min.js"></script>
|
||||
<script src="config.js?v=5"></script><!-- adapt to your needs, i.e. set hosts and bosh path -->
|
||||
<script src="simulcast.js?v=8"></script><!-- simulcast handling -->
|
||||
<script src="libs/strophe/strophe.jingle.adapter.js?v=4"></script><!-- strophe.jingle bundles -->
|
||||
<script src="config.js?v=9"></script><!-- adapt to your needs, i.e. set hosts and bosh path -->
|
||||
<script src="libs/strophe/strophe.min.js?v=1"></script>
|
||||
<script src="libs/strophe/strophe.disco.min.js?v=1"></script>
|
||||
<script src="libs/strophe/strophe.caps.jsonly.min.js?v=1"></script>
|
||||
<script src="libs/strophe/strophe.jingle.js?v=2"></script>
|
||||
<script src="libs/strophe/strophe.jingle.sdp.js?v=4"></script>
|
||||
<script src="libs/strophe/strophe.jingle.session.js?v=4"></script>
|
||||
<script src="libs/strophe/strophe.util.js"></script>
|
||||
<script src="libs/jquery-ui.js"></script>
|
||||
<script src="libs/rayo.js?v=1"></script>
|
||||
<script src="libs/tooltip.js?v=1"></script><!-- bootstrap tooltip lib -->
|
||||
<script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
|
||||
<script src="libs/pako.bundle.js?v=1"></script><!-- zlib deflate -->
|
||||
<script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
|
||||
<script src="interface_config.js?v=5"></script>
|
||||
<script src="muc.js?v=17"></script><!-- simple MUC library -->
|
||||
<script src="estos_log.js?v=2"></script><!-- simple stanza logger -->
|
||||
<script src="desktopsharing.js?v=3"></script><!-- desktop sharing -->
|
||||
<script src="app.js?v=23"></script><!-- application logic -->
|
||||
<script src="commands.js?v=1"></script><!-- application logic -->
|
||||
<script src="chat.js?v=15"></script><!-- chat logic -->
|
||||
<script src="contact_list.js?v=8"></script><!-- contact list logic -->
|
||||
<script src="side_panel_toggler.js?v=1"></script>
|
||||
<script src="util.js?v=7"></script><!-- utility functions -->
|
||||
<script src="etherpad.js?v=10"></script><!-- etherpad plugin -->
|
||||
<script src="prezi.js?v=7"></script><!-- prezi plugin -->
|
||||
<script src="smileys.js?v=3"></script><!-- smiley images -->
|
||||
<script src="replacement.js?v=7"></script><!-- link and smiley replacement -->
|
||||
<script src="moderatemuc.js?v=4"></script><!-- moderator plugin -->
|
||||
<script src="libs/app.bundle.js?v=87"></script>
|
||||
<script src="analytics.js?v=1"></script><!-- google analytics plugin -->
|
||||
<script src="videolayout.js?v=32"></script><!-- video ui -->
|
||||
<script src="connectionquality.js?v=1"></script>
|
||||
<script src="toolbar.js?v=7"></script><!-- toolbar ui -->
|
||||
<script src="toolbar_toggler.js?v=2"></script>
|
||||
<script src="canvas_util.js?v=1"></script><!-- canvas drawing utils -->
|
||||
<script src="audio_levels.js?v=4"></script><!-- audio levels plugin -->
|
||||
<script src="media_stream.js?v=2"></script><!-- media stream -->
|
||||
<script src="bottom_toolbar.js?v=6"></script><!-- media stream -->
|
||||
<script src="moderator.js?v=2"></script><!-- media stream -->
|
||||
<script src="roomname_generator.js?v=1"></script><!-- generator for random room names -->
|
||||
<script src="keyboard_shortcut.js?v=3"></script>
|
||||
<script src="recording.js?v=1"></script>
|
||||
<script src="tracking.js?v=1"></script><!-- tracking -->
|
||||
<script src="jitsipopover.js?v=3"></script>
|
||||
<script src="message_handler.js?v=2"></script>
|
||||
<script src="api_connector.js?v=2"></script>
|
||||
<script src="settings_menu.js?v=1"></script>
|
||||
<script src="service/RTC/RTCBrowserType.js?v=1"></script>
|
||||
<script src="service/RTC/StreamEventTypes.js?v=1"></script>
|
||||
<script src="service/RTC/MediaStreamTypes.js?v=1"></script>
|
||||
<script src="libs/modules/statistics.bundle.js?v=2"></script>
|
||||
<script src="libs/modules/RTC.bundle.js?v=2"></script>
|
||||
<script src="avatar.js?v=4"></script><!-- avatars -->
|
||||
<link rel="stylesheet" href="css/font.css?v=6"/>
|
||||
<link rel="stylesheet" href="css/font.css?v=7"/>
|
||||
<link rel="stylesheet" href="css/toastr.css?v=1">
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="css/main.css?v=30"/>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="css/videolayout_default.css?v=16" id="videolayout_default"/>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="css/videolayout_default.css?v=17" id="videolayout_default"/>
|
||||
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="css/jquery-impromptu.css?v=4">
|
||||
<link rel="stylesheet" href="css/modaldialog.css?v=3">
|
||||
<link rel="stylesheet" href="css/notice.css?v=1">
|
||||
<link rel="stylesheet" href="css/popup_menu.css?v=4">
|
||||
<link rel="stylesheet" href="css/login_menu.css?v=1">
|
||||
<link rel="stylesheet" href="css/popover.css?v=2">
|
||||
<link rel="stylesheet" href="css/jitsi_popover.css?v=2">
|
||||
<link rel="stylesheet" href="css/contact_list.css?v=4">
|
||||
<link rel="stylesheet" href="css/chat.css?v=5">
|
||||
<link rel="stylesheet" href="css/welcome_page.css?v=2">
|
||||
<link rel="stylesheet" href="css/settingsmenu.css?v=1">
|
||||
<link rel="stylesheet" href="css/settingsmenu.css?v=2">
|
||||
<!--
|
||||
Link used for inline installation of chrome desktop streaming extension,
|
||||
is updated automatically from the code with the value defined in config.js -->
|
||||
<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/diibjkoicjeejcmhdnailmkgecihlobk">
|
||||
<script src="libs/jquery-impromptu.js"></script>
|
||||
<script src="libs/jquery-impromptu.js?v=2"></script>
|
||||
<script src="libs/jquery.autosize.js"></script>
|
||||
<script src="libs/prezi_player.js?v=2"></script>
|
||||
<!--#include virtual="plugin.head.html" -->
|
||||
</head>
|
||||
<body>
|
||||
<div id="welcome_page">
|
||||
@@ -96,115 +54,121 @@
|
||||
<a target="_new">
|
||||
<div class="watermark rightwatermark"></div>
|
||||
</a>
|
||||
<a class="poweredby" href="http://jitsi.org" target="_new" >powered by jitsi.org</a>
|
||||
<a class="poweredby" href="http://jitsi.org" target="_new" ><span data-i18n="poweredby"></span> jitsi.org</a>
|
||||
|
||||
<div id="enter_room_container">
|
||||
<div id="enter_room_form" >
|
||||
<div id="domain_name"></div>
|
||||
<div id="enter_room">
|
||||
<input id="enter_room_field" type="text" autofocus placeholder="Enter room name" />
|
||||
<input id="enter_room_field" type="text" autofocus data-i18n="[placeholder]welcomepage.roomname" placeholder="Enter room name" />
|
||||
<div class="icon-reload" id="reload_roomname"></div>
|
||||
<input id="enter_room_button" type="button" value="GO" />
|
||||
<input id="enter_room_button" type="button" data-i18n="[value]welcomepage.go" value="GO" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="brand_header"></div>
|
||||
<input type='checkbox' name='checkbox' id="disable_welcome"/>
|
||||
<label for="disable_welcome" class="disable_welcome_position">Don't show this page next time I enter</label>
|
||||
<div id="header_text"></div>
|
||||
<label for="disable_welcome" class="disable_welcome_position" data-i18n="welcomepage.disable"></label>
|
||||
<div id="header_text">
|
||||
<!--#include virtual="plugin.header.text.html" -->
|
||||
</div>
|
||||
</div>
|
||||
<div id="welcome_page_main">
|
||||
<div id="features">
|
||||
<div class="feature_row">
|
||||
<div class="feature_holder">
|
||||
<div class="feature_icon">Simple to use</div>
|
||||
<div class="feature_description">
|
||||
No downloads required. <span name="appName"></span> works directly within your browser. Simply share your conference URL with others to get started.
|
||||
<div class="feature_icon" data-i18n="welcomepage.feature1.title" ></div>
|
||||
<div class="feature_description" data-i18n="welcomepage.feature1.content" data-i18n-options='{ "postProcess": "resolveAppName" }'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="feature_holder">
|
||||
<div class="feature_icon">Low bandwidth</div>
|
||||
<div class="feature_description">
|
||||
Multi-party video conferences work with as little as 128Kbps. Screen-sharing and audio-only conferences are possible with far less.
|
||||
<div class="feature_icon" data-i18n="welcomepage.feature2.title" ></div>
|
||||
<div class="feature_description" data-i18n="welcomepage.feature2.content">
|
||||
</div>
|
||||
</div>
|
||||
<div class="feature_holder">
|
||||
<div class="feature_icon">Open source</div>
|
||||
<div class="feature_description">
|
||||
<span name="appName"></span> is licensed under MIT. You are free to download, use, modify, and share them as per these licenses.
|
||||
<div class="feature_icon" data-i18n="welcomepage.feature3.title" ></div>
|
||||
<div class="feature_description" data-i18n="welcomepage.feature3.content" data-i18n-options='{ "postProcess": "resolveAppName" }'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="feature_holder">
|
||||
<div class="feature_icon">Unlimited users</div>
|
||||
<div class="feature_description">
|
||||
There are no artificial restrictions on the number of users or conference participants. Server power and bandwidth are the only limiting factors.
|
||||
<div class="feature_icon" data-i18n="welcomepage.feature4.title" ></div>
|
||||
<div class="feature_description" data-i18n="welcomepage.feature4.content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="feature_row">
|
||||
<div class="feature_holder">
|
||||
<div class="feature_icon">Screen sharing</div>
|
||||
<div class="feature_description">
|
||||
It's easy to share your screen with others. <span name="appName"></span> is ideal for on-line presentations, lectures, and tech support sessions.
|
||||
</div>
|
||||
<div class="feature_icon" data-i18n="welcomepage.feature5.title" ></div>
|
||||
<div class="feature_description" data-i18n="welcomepage.feature5.content" data-i18n-options='{ "postProcess": "resolveAppName" }'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="feature_holder">
|
||||
<div class="feature_icon">Secure rooms</div>
|
||||
<div class="feature_description">
|
||||
Need some privacy? <span name="appName"></span> conference rooms can be secured with a password in order to exclude unwanted guests and prevent interruptions.
|
||||
</div>
|
||||
<div class="feature_icon" data-i18n="welcomepage.feature6.title" ></div>
|
||||
<div class="feature_description" data-i18n="welcomepage.feature6.content" data-i18n-options='{ "postProcess": "resolveAppName" }'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="feature_holder">
|
||||
<div class="feature_icon">Shared notes</div>
|
||||
<div class="feature_description">
|
||||
<span name="appName"></span> features Etherpad, a real-time collaborative text editor that's great for meeting minutes, writing articles, and more.
|
||||
</div>
|
||||
<div class="feature_icon" data-i18n="welcomepage.feature7.title" ></div>
|
||||
<div class="feature_description" data-i18n="welcomepage.feature7.content" data-i18n-options='{ "postProcess": "resolveAppName" }'></div>
|
||||
</div>
|
||||
<div class="feature_holder">
|
||||
<div class="feature_icon">Usage statistics</div>
|
||||
<div class="feature_description">
|
||||
Learn about your users through easy integration with Piwik, Google Analytics, and other usage monitoring and statistics systems.
|
||||
</div>
|
||||
<div class="feature_icon" data-i18n="welcomepage.feature8.title" ></div>
|
||||
<div class="feature_description" data-i18n="welcomepage.feature8.content"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--#include virtual="plugin.welcomepage.footer.html" -->
|
||||
</div>
|
||||
<div id="videoconference_page">
|
||||
<div style="position: relative;" id="header_container">
|
||||
<div id="header">
|
||||
<div id="notice" class="notice" style="display: none">
|
||||
<span id="noticeText" class="noticeText"></span>
|
||||
</div>
|
||||
<span id="toolbar">
|
||||
<a class="button" data-container="body" data-toggle="popover" data-placement="bottom" shortcut="mutePopover" content="Mute / Unmute" onclick='toggleAudio();'>
|
||||
<span id="authentication" class="authentication" style="display: none">
|
||||
<a class="button" id="toolbar_button_authentication" >
|
||||
<i id="authButton" class="icon-avatar"></i>
|
||||
</a>
|
||||
<ul class="loginmenu">
|
||||
<span class="loginmenuPadding"></span>
|
||||
<li id="toolbar_auth_identity" class="identity"></li>
|
||||
<li id="toolbar_button_login">
|
||||
<a class="authButton" data-i18n="toolbar.login"></a>
|
||||
</li>
|
||||
<li id="toolbar_button_logout">
|
||||
<a class="authButton" data-i18n="toolbar.logout"></a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="header_button_separator"></div>
|
||||
</span>
|
||||
<a class="button" id="toolbar_button_mute" data-container="body" data-toggle="popover" data-placement="bottom" shortcut="mutePopover" data-i18n="[content]toolbar.mute" content="Mute / Unmute">
|
||||
<i id="mute" class="icon-microphone"></i>
|
||||
</a>
|
||||
<div class="header_button_separator"></div>
|
||||
<a class="button" data-container="body" data-toggle="popover" data-placement="bottom" shortcut="toggleVideoPopover" content="Start / stop camera" onclick='toggleVideo();'>
|
||||
<a class="button" id="toolbar_button_camera" data-container="body" data-toggle="popover" data-placement="bottom" shortcut="toggleVideoPopover" data-i18n="[content]toolbar.videomute" content="Start / stop camera">
|
||||
<i id="video" class="icon-camera"></i>
|
||||
</a>
|
||||
<span id="authentication" style="display: none">
|
||||
<div class="header_button_separator"></div>
|
||||
<a class="button" data-container="body" data-toggle="popover" data-placement="bottom" content="Authenticate" onclick='authenticateClicked();'>
|
||||
<i id="authButton" class="icon-avatar"></i>
|
||||
</a>
|
||||
</span>
|
||||
<span id="recording" style="display: none">
|
||||
<div class="header_button_separator"></div>
|
||||
<a class="button" data-container="body" data-toggle="popover" data-placement="bottom" content="Record" onclick='toggleRecording();'>
|
||||
<a class="button" id="toolbar_button_record" data-container="body" data-toggle="popover" data-placement="bottom" data-i18n="[content]toolbar.record" content="Record">
|
||||
<i id="recordButton" class="icon-recEnable"></i>
|
||||
</a>
|
||||
</span>
|
||||
<div class="header_button_separator"></div>
|
||||
<a class="button" data-container="body" data-toggle="popover" data-placement="bottom" content="Lock / unlock room" onclick="Toolbar.openLockDialog();">
|
||||
<a class="button" id="toolbar_button_security" data-container="body" data-toggle="popover" data-placement="bottom" data-i18n="[content]toolbar.lock" content="Lock / unlock room">
|
||||
<i id="lockIcon" class="icon-security"></i>
|
||||
</a>
|
||||
<div class="header_button_separator"></div>
|
||||
<a class="button" data-container="body" data-toggle="popover" data-placement="bottom" content="Invite others" onclick="Toolbar.openLinkDialog();">
|
||||
<a class="button" id="toolbar_button_link" data-container="body" data-toggle="popover" data-placement="bottom" data-i18n="[content]toolbar.invite" content="Invite others">
|
||||
<i class="icon-link"></i>
|
||||
</a>
|
||||
<div class="header_button_separator"></div>
|
||||
<span class="toolbar_span">
|
||||
<a class="button" data-container="body" data-toggle="popover" shortcut="toggleChatPopover" data-placement="bottom" content="Open / close chat" onclick='BottomToolbar.toggleChat();'>
|
||||
<a class="button" id="toolbar_button_chat" data-container="body" data-toggle="popover" shortcut="toggleChatPopover" data-placement="bottom" data-i18n="[content]toolbar.chat" content="Open / close chat">
|
||||
<i id="chatButton" class="icon-chat">
|
||||
<span id="unreadMessages"></span>
|
||||
</i>
|
||||
@@ -212,38 +176,43 @@
|
||||
</span>
|
||||
<span id="prezi_button">
|
||||
<div class="header_button_separator"></div>
|
||||
<a class="button" data-container="body" data-toggle="popover" data-placement="bottom" content="Share Prezi" onclick='Prezi.openPreziDialog();'>
|
||||
<a class="button" id="toolbar_button_prezi" data-container="body" data-toggle="popover" data-placement="bottom" data-i18n="[content]toolbar.prezi" content="Share Prezi">
|
||||
<i class="icon-prezi"></i>
|
||||
</a>
|
||||
</span>
|
||||
<span id="etherpadButton">
|
||||
<div class="header_button_separator"></div>
|
||||
<a class="button" data-container="body" data-toggle="popover" data-placement="bottom" content="Shared document" onclick='Etherpad.toggleEtherpad(0);'>
|
||||
<a class="button" id="toolbar_button_etherpad" data-container="body" data-toggle="popover" data-placement="bottom" content="Shared document" data-i18n="[content]toolbar.etherpad">
|
||||
<i class="icon-share-doc"></i>
|
||||
</a>
|
||||
</span>
|
||||
<div class="header_button_separator"></div>
|
||||
<span id="desktopsharing" style="display: none">
|
||||
<a class="button" data-container="body" data-toggle="popover" data-placement="bottom" content="Share screen" onclick="toggleScreenSharing();">
|
||||
<a class="button" id="toolbar_button_desktopsharing" data-container="body" data-toggle="popover" data-placement="bottom" content="Share screen" data-i18n="[content]toolbar.sharescreen">
|
||||
<i class="icon-share-desktop"></i>
|
||||
</a>
|
||||
</span>
|
||||
<div class="header_button_separator"></div>
|
||||
<a class="button" data-container="body" data-toggle="popover" data-placement="bottom" content="Enter / Exit Full Screen" onclick='buttonClick("#fullScreen", "icon-full-screen icon-exit-full-screen");Toolbar.toggleFullScreen();'>
|
||||
<a class="button" id="toolbar_button_fullScreen" data-container="body" data-toggle="popover" data-placement="bottom" content="Enter / Exit Full Screen" data-i18n="[content]toolbar.fullscreen">
|
||||
<i id="fullScreen" class="icon-full-screen"></i>
|
||||
</a>
|
||||
<span id="sipCallButton" style="display: none">
|
||||
<div class="header_button_separator"></div>
|
||||
<a class="button" data-container="body" data-toggle="popover" data-placement="bottom" content="Call SIP number" onclick='callSipButtonClicked();'>
|
||||
<a class="button" id="toolbar_button_sip" data-container="body" data-toggle="popover" data-placement="bottom" content="Call SIP number" data-i18n="[content]toolbar.sip">
|
||||
<i class="icon-telephone"></i></a>
|
||||
</span>
|
||||
<span id="dialPadButton" style="display: none">
|
||||
<div class="header_button_separator"></div>
|
||||
<a class="button" id="toolbar_button_dialpad" data-container="body" data-toggle="popover" data-placement="bottom" content="Open dialpad" data-i18n="[content]toolbar.dialpad">
|
||||
<i class="icon-dialpad"></i></a>
|
||||
</span>
|
||||
<div class="header_button_separator"></div>
|
||||
<a class="button" data-container="body" data-toggle="popover" data-placement="bottom" content="Settings" onclick='PanelToggler.toggleSettingsMenu();'>
|
||||
<a class="button" id="toolbar_button_settings" data-container="body" data-toggle="popover" data-placement="bottom" content="Settings" data-i18n="[content]toolbar.Settings">
|
||||
<i id="settingsButton" class="icon-settings"></i>
|
||||
</a>
|
||||
<div class="header_button_separator"></div>
|
||||
<span id="hangup">
|
||||
<a class="button" data-container="body" data-toggle="popover" data-placement="bottom" content="Hang Up" onclick='hangup();'>
|
||||
<a class="button" id="toolbar_button_hangup" data-container="body" data-toggle="popover" data-placement="bottom" content="Hang Up" data-i18n="[content]toolbar.hangup">
|
||||
<i class="icon-hangup" style="color:#ff0000;font-size: 1.4em;"></i>
|
||||
</a>
|
||||
</span>
|
||||
@@ -251,23 +220,14 @@
|
||||
</div>
|
||||
<div id="subject"></div>
|
||||
</div>
|
||||
<div id="settings">
|
||||
<h1>Connection Settings</h1>
|
||||
<form id="loginInfo">
|
||||
<label>JID: <input id="jid" type="text" name="jid" placeholder="me@example.com"/></label>
|
||||
<label>Password: <input id="password" type="password" name="password" placeholder="secret"/></label>
|
||||
<label>BOSH URL: <input id="boshURL" type="text" name="boshURL" placeholder="/http-bind"/></label>
|
||||
<input id="connect" type="submit" value="Connect" />
|
||||
</form>
|
||||
</div>
|
||||
<div id="reloadPresentation"><a onclick='Prezi.reloadPresentation();'><i title="Reload Prezi" class="fa fa-repeat fa-lg"></i></a></div>
|
||||
<div id="videospace" onmousemove="ToolbarToggler.showToolbar();">
|
||||
<div id="reloadPresentation"><a id="reloadPresentationLink"><i title="Reload Prezi" class="fa fa-repeat fa-lg"></i></a></div>
|
||||
<div id="videospace">
|
||||
<div id="largeVideoContainer" class="videocontainer">
|
||||
<div id="presentation"></div>
|
||||
<div id="etherpad"></div>
|
||||
<a target="_new"><div class="watermark leftwatermark"></div></a>
|
||||
<a target="_new"><div class="watermark rightwatermark"></div></a>
|
||||
<a class="poweredby" href="http://jitsi.org" target="_new" >powered by jitsi.org</a>
|
||||
<a class="poweredby" href="http://jitsi.org" target="_new" ><span data-i18n="poweredby"></span> jitsi.org</a>
|
||||
<div id="activeSpeaker">
|
||||
<img id="activeSpeakerAvatar" src=""/>
|
||||
<canvas id="activeSpeakerAudioLevel"></canvas>
|
||||
@@ -282,18 +242,13 @@
|
||||
</span>
|
||||
<audio id="localAudio" autoplay oncontextmenu="return false;" muted></audio>
|
||||
<span class="focusindicator"></span>
|
||||
<!--<div class="connectionindicator">
|
||||
<span class="connection connection_empty"><i class="icon-connection"></i></span>
|
||||
<span class="connection connection_full"><i class="icon-connection"></i></span>
|
||||
</div>-->
|
||||
|
||||
</span>
|
||||
<audio id="userJoined" src="sounds/joined.wav" preload="auto"></audio>
|
||||
<audio id="userLeft" src="sounds/left.wav" preload="auto"></audio>
|
||||
</div>
|
||||
<span id="bottomToolbar">
|
||||
<span class="bottomToolbar_span">
|
||||
<a class="bottomToolbarButton" data-container="body" data-toggle="popover" shortcut="toggleChatPopover" data-placement="top" content="Open / close chat" onclick='BottomToolbar.toggleChat();'>
|
||||
<a class="bottomToolbarButton" id="bottom_toolbar_chat" data-container="body" data-toggle="popover" shortcut="toggleChatPopover" data-placement="top" data-i18n="[content]bottomtoolbar.chat" content="Open / close chat">
|
||||
<i id="chatBottomButton" class="icon-chat-simple">
|
||||
<span id="bottomUnreadMessages"></span>
|
||||
</i>
|
||||
@@ -301,7 +256,7 @@
|
||||
</span>
|
||||
<div class="bottom_button_separator"></div>
|
||||
<span class="bottomToolbar_span">
|
||||
<a class="bottomToolbarButton" data-container="body" data-toggle="popover" data-placement="top" id="contactlistpopover" content="Open / close contact list" onclick='BottomToolbar.toggleContactList();'>
|
||||
<a class="bottomToolbarButton" id="bottom_toolbar_contact_list" data-container="body" data-toggle="popover" data-placement="top" id="contactlistpopover" data-i18n="[content]bottomtoolbar.contactlist" content="Open / close contact list">
|
||||
<i id="contactListButton" class="icon-contactList">
|
||||
<span id="numberOfParticipants"></span>
|
||||
</i>
|
||||
@@ -309,7 +264,7 @@
|
||||
</span>
|
||||
<div class="bottom_button_separator"></div>
|
||||
<span class="bottomToolbar_span">
|
||||
<a class="bottomToolbarButton" data-container="body" data-toggle="popover" shortcut="filmstripPopover" data-placement="top" content="Show / hide film strip" onclick='BottomToolbar.toggleFilmStrip()'>
|
||||
<a class="bottomToolbarButton" id="bottom_toolbar_film_strip" data-container="body" data-toggle="popover" shortcut="filmstripPopover" data-placement="top" data-i18n="[content]bottomtoolbar.filmstrip" content="Show / hide film strip">
|
||||
<i id="filmStripButton" class="icon-filmstrip"></i>
|
||||
</a>
|
||||
</span>
|
||||
@@ -317,36 +272,46 @@
|
||||
</div>
|
||||
<div id="chatspace" class="right-panel">
|
||||
<div id="nickname">
|
||||
Enter a nickname in the box below
|
||||
<span data-i18n="chat.nickname.title"></span>
|
||||
<form>
|
||||
<input type='text' id="nickinput" placeholder='Choose a nickname' autofocus>
|
||||
<input type='text' id="nickinput" data-i18n="[placeholder]chat.nickname.popover" autofocus>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!--div><i class="fa fa-comments"> </i><span class='nick'></span>: <span class='chattext'></span></div-->
|
||||
<div id="chatconversation"></div>
|
||||
<audio id="chatNotification" src="sounds/incomingMessage.wav" preload="auto"></audio>
|
||||
<textarea id="usermsg" placeholder='Enter text...' autofocus></textarea>
|
||||
<textarea id="usermsg" data-i18n="[placeholder]chat.messagebox" autofocus></textarea>
|
||||
<div id="smileysarea">
|
||||
<div id="smileys" onclick="Chat.toggleSmileys()">
|
||||
<div id="smileys" id="toggle_smileys">
|
||||
<img src="images/smile.svg"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="contactlist" class="right-panel">
|
||||
<ul>
|
||||
<li class="title"><i class="icon-contact-list"></i> CONTACT LIST</li>
|
||||
<li class="title"><i class="icon-contact-list"></i><span data-i18n="contactlist"></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="settingsmenu" class="right-panel">
|
||||
<div class="icon-settings"> SETTINGS</div>
|
||||
<div class="icon-settings" data-i18n="settings.title"></div>
|
||||
<img id="avatar" src="https://www.gravatar.com/avatar/87291c37c25be69a072a4514931b1749?d=wavatar&size=30"/>
|
||||
<div class="arrow-up"></div>
|
||||
<input type="text" id="setDisplayName" placeholder="Name">
|
||||
<input type="text" id="setDisplayName" data-i18n="[placeholder]settings.name" placeholder="Name">
|
||||
<input type="text" id="setEmail" placeholder="E-Mail">
|
||||
<button onclick="SettingsMenu.update()" id="updateSettings">Update</button>
|
||||
<div id = "startMutedOptions">
|
||||
<label class = "startMutedLabel">
|
||||
<input type="checkbox" id="startAudioMuted">
|
||||
<span data-i18n="settings.startAudioMuted"></span>
|
||||
</label>
|
||||
<label class = "startMutedLabel">
|
||||
<input type="checkbox" id="startVideoMuted">
|
||||
<span data-i18n="settings.startVideoMuted"></span>
|
||||
</label>
|
||||
</div>
|
||||
<button id="updateSettings" data-i18n="settings.update"></button>
|
||||
</div>
|
||||
<a id="downloadlog" onclick='dump(event.target);' data-container="body" data-toggle="popover" data-placement="right" data-content="Download logs" ><i class="fa fa-cloud-download"></i></a>
|
||||
<a id="downloadlog" data-container="body" data-toggle="popover" data-placement="right" data-i18n="[data-content]downloadlogs" ><i class="fa fa-cloud-download"></i></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -5,10 +5,10 @@ var interfaceConfig = {
|
||||
INITIAL_TOOLBAR_TIMEOUT: 20000,
|
||||
TOOLBAR_TIMEOUT: 4000,
|
||||
DEFAULT_REMOTE_DISPLAY_NAME: "Fellow Jitster",
|
||||
DEFAULT_DOMINANT_SPEAKER_DISPLAY_NAME: "Speaker",
|
||||
DEFAULT_DOMINANT_SPEAKER_DISPLAY_NAME: "speaker",
|
||||
DEFAULT_LOCAL_DISPLAY_NAME: "me",
|
||||
SHOW_JITSI_WATERMARK: true,
|
||||
JITSI_WATERMARK_LINK: "http://jitsi.org",
|
||||
JITSI_WATERMARK_LINK: "https://jitsi.org",
|
||||
SHOW_BRAND_WATERMARK: false,
|
||||
BRAND_WATERMARK_LINK: "",
|
||||
SHOW_POWERED_BY: false,
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
var KeyboardShortcut = (function(my) {
|
||||
//maps keycode to character, id of popover for given function and function
|
||||
var shortcuts = {
|
||||
67: {
|
||||
character: "C",
|
||||
id: "toggleChatPopover",
|
||||
function: BottomToolbar.toggleChat
|
||||
},
|
||||
70: {
|
||||
character: "F",
|
||||
id: "filmstripPopover",
|
||||
function: BottomToolbar.toggleFilmStrip
|
||||
},
|
||||
77: {
|
||||
character: "M",
|
||||
id: "mutePopover",
|
||||
function: toggleAudio
|
||||
},
|
||||
84: {
|
||||
character: "T",
|
||||
function: function() {
|
||||
if(!isAudioMuted()) {
|
||||
toggleAudio();
|
||||
}
|
||||
}
|
||||
},
|
||||
86: {
|
||||
character: "V",
|
||||
id: "toggleVideoPopover",
|
||||
function: toggleVideo
|
||||
}
|
||||
};
|
||||
|
||||
window.onkeyup = function(e) {
|
||||
var keycode = e.which;
|
||||
if(!($(":focus").is("input[type=text]") || $(":focus").is("input[type=password]") || $(":focus").is("textarea"))) {
|
||||
if (typeof shortcuts[keycode] === "object") {
|
||||
shortcuts[keycode].function();
|
||||
} else if (keycode >= "0".charCodeAt(0) && keycode <= "9".charCodeAt(0)) {
|
||||
var remoteVideos = $(".videocontainer:not(#mixedstream)"),
|
||||
videoWanted = keycode - "0".charCodeAt(0) + 1;
|
||||
if (remoteVideos.length > videoWanted) {
|
||||
remoteVideos[videoWanted].click();
|
||||
}
|
||||
}
|
||||
//esc while the smileys are visible hides them
|
||||
} else if (keycode === 27 && $('#smileysContainer').is(':visible')) {
|
||||
Chat.toggleSmileys();
|
||||
}
|
||||
};
|
||||
|
||||
window.onkeydown = function(e) {
|
||||
if(!($(":focus").is("input[type=text]") || $(":focus").is("input[type=password]") || $(":focus").is("textarea"))) {
|
||||
if(e.which === "T".charCodeAt(0)) {
|
||||
if(isAudioMuted()) {
|
||||
toggleAudio();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id indicates the popover associated with the shortcut
|
||||
* @returns {string} the keyboard shortcut used for the id given
|
||||
*/
|
||||
my.getShortcut = function(id) {
|
||||
for(var keycode in shortcuts) {
|
||||
if(shortcuts.hasOwnProperty(keycode)) {
|
||||
if (shortcuts[keycode].id === id) {
|
||||
return " (" + shortcuts[keycode].character + ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
};
|
||||
return my;
|
||||
}(KeyboardShortcut || {}))
|
||||
|
||||
57
lang/Translation.md
Normal file
@@ -0,0 +1,57 @@
|
||||
Jitsi Meet Translation
|
||||
==========================
|
||||
Jitsi Meet uses [i18next](http://i18next.com) library for translation.
|
||||
i18next uses separate json files for each language.
|
||||
|
||||
|
||||
Translating Jitsi Meet
|
||||
======================
|
||||
The translation of Jitsi Meet is integrated with Pootle. You can translate Jitsi Meet via our Pootle user interface on
|
||||
[http://translate.jitsi.org](http://translate.jitsi.org).
|
||||
|
||||
**WARNING: Please don't create or edit manually the language files! Please use our Pootle user interface!**
|
||||
|
||||
Development
|
||||
===========
|
||||
If you want to add new functionality for Jitsi Meet and you have texts that need to be translated please use our translation module.
|
||||
It is located in modules/translation. You must add key and value in main.json file in English for each translatable text.
|
||||
Than you can use the key to get the translated text for the current language.
|
||||
|
||||
**WARNING: Please don't change the other language files except main.json! They must be updated and translated via our Pootle user interface!**
|
||||
|
||||
You can add translatable text in the HTML:
|
||||
|
||||
|
||||
* **via attribute on HTML element** - add **data-i18n** attribute with value the key of the translatable text.
|
||||
|
||||
|
||||
```
|
||||
<span data-i18n="dialog.OK">OK</span>
|
||||
```
|
||||
|
||||
|
||||
You can also use APP.translation.generateTranslatonHTML(key, options) to get this HTML code as Javascript string.
|
||||
|
||||
|
||||
```
|
||||
APP.translation.generateTranslatonHTML("dialog.OK") // returns <span data-i18n="dialog.OK">OK</span>
|
||||
```
|
||||
|
||||
The value in the options parameter will be added in data-i18n-options attribute of the element.
|
||||
|
||||
**Note:** If you dynamically add HTML elements don't forget to call APP.translation.translateElement(jquery_selector) to translate the text initially.
|
||||
|
||||
* **via Javascript string** - call APP.translation.translateString(key, options). You can use that method to get the translated string in Javascript and then attach it in the HTML.
|
||||
|
||||
```
|
||||
APP.translation.translateString("dialog.OK") // returns the value for the key of the current language file. "OK" for example.
|
||||
```
|
||||
|
||||
For the available values of ``options`` parameter for the above methods of translation module see [i18next documentation](http://i18next.com/pages/doc_features).
|
||||
|
||||
**Note:** It is useful to add attributes in the HTML for persistent HTML elements because when the language is changed the text will be automatically translated.
|
||||
Otherwise you should call ``APP.translation.translateString`` and manually change the text every time the language is changed.
|
||||
|
||||
|
||||
|
||||
|
||||
7
lang/languages-bg.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"en": "Английски",
|
||||
"bg": "Български",
|
||||
"de": "Немски",
|
||||
"tr": "Турски",
|
||||
"it": "Италиански"
|
||||
}
|
||||
7
lang/languages-de.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"en": "Englisch",
|
||||
"bg": "Bulgarisch",
|
||||
"de": "Deutsch",
|
||||
"tr": "Türkisch",
|
||||
"it": "Italienisch"
|
||||
}
|
||||
7
lang/languages-fr.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"en": "Anglais",
|
||||
"bg": "Bulgare",
|
||||
"de": "Allemand",
|
||||
"tr": "Turc",
|
||||
"it": "Italien"
|
||||
}
|
||||
7
lang/languages-it.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"en": "Inglese",
|
||||
"bg": "Bulgaro",
|
||||
"de": "Tedesco",
|
||||
"tr": "Turco",
|
||||
"it": "Italiano"
|
||||
}
|
||||
5
lang/languages-tr.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"en": "İngilizce",
|
||||
"bg": "Bulgarca",
|
||||
"de": "Almanca"
|
||||
}
|
||||
8
lang/languages.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"en": "English",
|
||||
"bg": "Bulgarian",
|
||||
"de": "German",
|
||||
"tr": "Turkish",
|
||||
"it": "Italian",
|
||||
"fr": "French"
|
||||
}
|
||||
224
lang/main-bg.json
Normal file
@@ -0,0 +1,224 @@
|
||||
{
|
||||
"contactlist": "СПИСЪК С КОНТАКТИ",
|
||||
"connectionsettings": "Настройки на връзката",
|
||||
"poweredby": "powered by",
|
||||
"downloadlogs": "Изтегли логовете",
|
||||
"roomUrlDefaultMsg": "Конференцията се създава...",
|
||||
"participant": "Участник",
|
||||
"me": "аз",
|
||||
"speaker": "Говорител",
|
||||
"defaultNickname": "например __name__",
|
||||
"defaultPreziLink": "например __url__",
|
||||
"welcomepage": {
|
||||
"go": "Влез",
|
||||
"roomname": "Въведете име на стаята",
|
||||
"disable": "Не показвай страницата следващия път",
|
||||
"feature1": {
|
||||
"title": "Лесен за употреба",
|
||||
"content": "Не е необходимо да сваляте нищо. _app_ работи директно във вашия браузър. Просто споделете адреса на вашата конференция с другите за да започнете."
|
||||
},
|
||||
"feature2": {
|
||||
"title": "",
|
||||
"content": "Видео конференциите могат да работят с по-малко от 128Kbps, а аудио конференциите и конференциите с споделен екран дори с по-малко."
|
||||
},
|
||||
"feature3": {
|
||||
"title": "Отворен код",
|
||||
"content": "__app__ е лицензиран под MIT лиценз. Можете свободно да го изтеглите, използвате, променяте и споделяте според тези лицензи."
|
||||
},
|
||||
"feature4": {
|
||||
"title": "Неограничен брой потребители",
|
||||
"content": "Няма изкуствени ограничения за броя на потребителите или участниците в конференция. Единствените ограничения са мощността на вашия сървър и качеството на интернет връзката му."
|
||||
},
|
||||
"feature5": {
|
||||
"title": "Споделяне на екрана",
|
||||
"content": "Лесно е да споделите екрана си с другите. __app__ е идеален за онлайн презентации, лекции и техническа подръжка."
|
||||
},
|
||||
"feature6": {
|
||||
"title": "Сигурни стаи",
|
||||
"content": "Нуждаете се от уединение? _app__ конферентните стай могат да бъдат защитени от парола за да се препазите от нежелани гости или прекъсвания."
|
||||
},
|
||||
"feature7": {
|
||||
"title": "Споделени бележки",
|
||||
"content": "__app__ използва Etherpad, с който можете да редактирате текст в реално време заедно."
|
||||
},
|
||||
"feature8": {
|
||||
"title": "Статистики за използване",
|
||||
"content": "Научете повече за своите потребители като интегрирате лесно Piwik, Google Analytics и други статистики за изполването."
|
||||
}
|
||||
},
|
||||
"toolbar": {
|
||||
"mute": "Включи / Изключи микрофона",
|
||||
"videomute": "Спри / пусни камерата",
|
||||
"authenticate": "",
|
||||
"record": "Запис",
|
||||
"lock": "Заключи / отключи стаята",
|
||||
"invite": "Поканване на други",
|
||||
"chat": "",
|
||||
"prezi": "Сподели Prezi",
|
||||
"etherpad": "Споделяне на документ",
|
||||
"sharescreen": "Споделяне на екрана",
|
||||
"fullscreen": "Влез / Излез от Пълен екран",
|
||||
"sip": "Обади се на SIP номер",
|
||||
"Settings": "Настройки",
|
||||
"hangup": "Затвори",
|
||||
"login": "Влез",
|
||||
"logout": ""
|
||||
},
|
||||
"bottomtoolbar": {
|
||||
"chat": "Отвори / затвори чат",
|
||||
"filmstrip": "Покажи / скрий лентата с видеа",
|
||||
"contactlist": "Отвори / затвори контакт листа"
|
||||
},
|
||||
"chat": {
|
||||
"nickname": {
|
||||
"title": "Въведете име в полето",
|
||||
"popover": "Избор на име"
|
||||
},
|
||||
"messagebox": "Въведете текст..."
|
||||
},
|
||||
"settings": {
|
||||
"title": "НАСТРОЙКИ",
|
||||
"update": "Актуализиране",
|
||||
"name": "Име"
|
||||
},
|
||||
"videothumbnail": {
|
||||
"editnickname": "Натиснете за да<br/>промените името",
|
||||
"moderator": "Създателя на<br/>конференцията",
|
||||
"videomute": "Учасника е спрял<br/>камерата си.",
|
||||
"mute": "Учасника е с изключен микрофон",
|
||||
"kick": "Изгони",
|
||||
"muted": "Изключен микрофон",
|
||||
"domute": "Изключи микрофона"
|
||||
},
|
||||
"connectionindicator": {
|
||||
"bitrate": "",
|
||||
"packetloss": "Загуба на пакети:",
|
||||
"resolution": "Резолюция:",
|
||||
"less": "Скрий",
|
||||
"more": "Покажи",
|
||||
"address": "Адрес:",
|
||||
"remoteport": "Отдалечен порт:",
|
||||
"remoteport_plural": "Отдалечени портове:",
|
||||
"localport": "Локален порт:",
|
||||
"localport_plural": "Локални портове:",
|
||||
"localaddress": "Локален адрес:",
|
||||
"localaddress_plural": "Локални адреси:",
|
||||
"remoteaddress": "Отдалечен адрес:",
|
||||
"remoteaddress_plural": "Отдалечени адреси:",
|
||||
"transport": "Транспорт:",
|
||||
"bandwidth": "",
|
||||
"na": "Върнете се тук за информацията относно вашата връзка, когато започне конференцията"
|
||||
},
|
||||
"notify": {
|
||||
"disconnected": "връзката е прекъсната",
|
||||
"moderator": "Придобихте права на модератор!",
|
||||
"connected": "свързан",
|
||||
"somebody": "Някой",
|
||||
"me": "Аз",
|
||||
"focus": "Конферентен фокус",
|
||||
"focusFail": "__component__ не е на раположения - следващ опит след __ms__ секунди",
|
||||
"grantedTo": "Даване на роля модератор на __to__!",
|
||||
"grantedToUnknown": "Даване на роля модератор на $t(somebody)!"
|
||||
},
|
||||
"dialog": {
|
||||
"kickMessage": "Бяхте изгонен от срещата!",
|
||||
"popupError": "Вашия браузър блокира попъп прозорците от този сайт. Моля позволете попъп прозорците от настройките на браузъра и опитайте пак.",
|
||||
"passwordError": "Тази конференция е защитена с парола. Само създателя и може да промени паролата.",
|
||||
"passwordError2": "Тази конференция не е защитена с парола. Само създателя и може да сложи парола.",
|
||||
"joinError": "Не можете да се присъедините към конференцията. Може би имате проблем с конфигурацията на сифурността. Моля обърнете се към администратора на услугата.",
|
||||
"connectError": "Опа! Нещо се обърка и не успяхме да се свържем с конференцията.",
|
||||
"connecting": "",
|
||||
"error": "",
|
||||
"detectext": "Възникна грешка при опит да бъде намерено разширението за споделяне на екран.",
|
||||
"failtoinstall": "Неуспешна инсталация на разширението за споделяне на екрана.",
|
||||
"failedpermissions": "Неуспешен опит за получаване на права за използване на микрофон и/или камера.",
|
||||
"bridgeUnavailable": "Jitsi Videobridge не е наличен. Моля опитайте пак!",
|
||||
"lockTitle": "Неуспешно заключване",
|
||||
"lockMessage": "Неуспешно заключване на конференцията.",
|
||||
"warning": "Внимание",
|
||||
"passwordNotSupported": "В момента не поддържаме стаи с пароли.",
|
||||
"sorry": "Съжаляваме",
|
||||
"internalError": "Вътрешна грешка [setRemoteDescription]",
|
||||
"unableToSwitch": "Неуспешен опит за смяна на видеото.",
|
||||
"SLDFailure": "Опа! Нещо се обърка и не успяхме да спрем микрофона! (SLD Failure)",
|
||||
"SRDFailure": "Опа! Нещо се обърка и не успяхме да спрем камерата! (SRD Failure)",
|
||||
"oops": "Опа!",
|
||||
"defaultError": "Възникна грешка",
|
||||
"passwordRequired": "Изисква се парола",
|
||||
"Ok": "ОК",
|
||||
"removePreziTitle": "Премахни Prezi",
|
||||
"removePreziMsg": "Сигурни ли сте, че искате да премахнете Prezi?",
|
||||
"sharePreziTitle": "Сподели Prezi",
|
||||
"sharePreziMsg": "Друг участник вече е споделил Prezi. Тази конференция позволява само да се споделя само едно Prezi.",
|
||||
"Remove": "Премахване",
|
||||
"Stop": "Спиране",
|
||||
"AuthMsg": "Нужна е идентификация, за да създадете стая:<br/><b>__room__</b></br> Може да се идентифицирате, за да създадете стая или да изчакате някой друг да го направи.",
|
||||
"Authenticate": "Идентификация",
|
||||
"Cancel": "Отказ",
|
||||
"retry": "Повторен опит",
|
||||
"logoutTitle": "Изход",
|
||||
"logoutQuestion": "Сигурни ли сте, че искате да излезете и да прекъснете конференцията?",
|
||||
"sessTerminated": "Сесията е прекъсната.",
|
||||
"hungUp": "Вие затворихте обаждането.",
|
||||
"joinAgain": "Песъединете се отново",
|
||||
"Share": "Споделяне",
|
||||
"preziLinkError": "Моля въведете правилен Prezi линк.",
|
||||
"Save": "Запазване",
|
||||
"recordingToken": "Въведете код за достъп за запис на конференцията",
|
||||
"Dial": "Набиране",
|
||||
"sipMsg": "Въведете SIP номер",
|
||||
"passwordCheck": "Сигурни ли сте, че искате да махнете паролата?",
|
||||
"passwordMsg": "Въведете парола, за да заключите стаята",
|
||||
"Invite": "Покани",
|
||||
"shareLink": "Сподели този линк с всеки, който искаш да поканиш",
|
||||
"settings1": "Конфигурирай конференцията",
|
||||
"settings2": "Участниците се присъединиха с изключен микрофон.",
|
||||
"settings3": "Изисквай имена<br/><br/>Въведете парола за да заключите стаята:",
|
||||
"yourPassword": "вашата парола",
|
||||
"Back": "Назад",
|
||||
"serviceUnavailable": "Услугата не е налична",
|
||||
"gracefulShutdown": "Услугата временно не е достъпна поради профилактика. Моля опитайте по-късно.",
|
||||
"Yes": "Да",
|
||||
"reservationError": "Грешка в системата за резервации",
|
||||
"reservationErrorMsg": "Грешка номер: __code__, съобщение: __msg__",
|
||||
"password": "парола",
|
||||
"userPassword": "потребителска парола",
|
||||
"token": "код за достъп"
|
||||
},
|
||||
"email": {
|
||||
"sharedKey": [
|
||||
"Тази конференция е защитена с парола. Моля използвайте следния код за да се присъедините:",
|
||||
"",
|
||||
"",
|
||||
"__sharedKey__",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"subject": "Покана за __appName__ (__conferenceName__)",
|
||||
"body": [
|
||||
"Здравей, Бих искал да те поканя в една __appName__ конференция, която създадох.",
|
||||
"",
|
||||
"",
|
||||
"Кликни на следния линк за да се присъединиш в конференцията.",
|
||||
"",
|
||||
"",
|
||||
"__sharedKeyText__",
|
||||
"__appName__ поддържа __supportedBrowsers__, така че трябва да използваш един от тези браузъри.",
|
||||
"",
|
||||
"",
|
||||
"Ще се видим след секунда!"
|
||||
],
|
||||
"and": "и"
|
||||
},
|
||||
"connection": {
|
||||
"ERROR": "Грешка",
|
||||
"CONNECTING": "Свързване",
|
||||
"CONNFAIL": "Връзката е неуспешна",
|
||||
"AUTHENTICATING": "Идентификация",
|
||||
"AUTHFAIL": "Неуспешна идентификация",
|
||||
"CONNECTED": "Свързан",
|
||||
"DISCONNECTED": "Изключен",
|
||||
"DISCONNECTING": "Прекъсване на връзката",
|
||||
"ATTACHED": "Прикрепен"
|
||||
}
|
||||
}
|
||||
230
lang/main-de.json
Normal file
@@ -0,0 +1,230 @@
|
||||
{
|
||||
"contactlist": "Kontaktliste",
|
||||
"connectionsettings": "Verbindungseinstellungen",
|
||||
"poweredby": "Betrieben von",
|
||||
"downloadlogs": "Log herunterladen",
|
||||
"roomUrlDefaultMsg": "Die Konferenz wird erstellt...",
|
||||
"participant": "Teilnehmer",
|
||||
"me": "ich",
|
||||
"speaker": "Sprecher",
|
||||
"defaultNickname": "Bsp.: __name__",
|
||||
"defaultPreziLink": "Bsp.: __url__",
|
||||
"welcomepage": {
|
||||
"go": "Los",
|
||||
"roomname": "Raumnamen eingeben",
|
||||
"disable": "Diese Seite beim nächsten Betreten nicht mehr anzeigen",
|
||||
"feature1": {
|
||||
"title": "Einfach zu benutzen",
|
||||
"content": "Kein Download nötig. __app__ läuft direkt im Browser. Einfach die Konferenzadresse teilen und los geht's."
|
||||
},
|
||||
"feature2": {
|
||||
"title": "Niedrige Bandbreite",
|
||||
"content": "Videokonferenzen mit mehreren Teilnehmen mit weniger als 128Kpbs. Bildschirmfreigaben und Telefonkonferenzen kommen sogar mit noch weniger Bandbreite aus."
|
||||
},
|
||||
"feature3": {
|
||||
"title": "Open Source",
|
||||
"content": "__app__ steht unter der MIT Lizenz. __app__ kann gemäss der Lizenz heruntergeladen, verwendet, verändert und weitergegeben werden."
|
||||
},
|
||||
"feature4": {
|
||||
"title": "Unbegrenzte Anzahl Benutzer",
|
||||
"content": "Es gibt keine künstliche Beschränkung der Anzahl der Benutzer oder Konferenzteilnehmer. Die Leistung des Servers und die Bandbreite sind die einzigen limitierenden Faktoren."
|
||||
},
|
||||
"feature5": {
|
||||
"title": "Bildschirmfreigabe",
|
||||
"content": "Es ist ganz einfach den Bildschirm zu teilen. __app__ ist ideal für Online-Präsentationen, Vorlesungen und Fernwartungsanfragen."
|
||||
},
|
||||
"feature6": {
|
||||
"title": "Sichere Konferenzen",
|
||||
"content": "Privatsphäre gewünscht? __app__ Konferenzen können mit einem Passwort geschützt werden um ungebetene Gäste fernzuhalten und Unterbrechungen zu vermeiden."
|
||||
},
|
||||
"feature7": {
|
||||
"title": "Freigegebene Notizen",
|
||||
"content": "__app__ verwendent Etherpad, ein Editor zur kollaborativen Bearbeitung von Texten."
|
||||
},
|
||||
"feature8": {
|
||||
"title": "Benutzungsstatistiken",
|
||||
"content": "Die Verwendung kann durch die Integration mit Piwik, Google Analytics und anderen Überwachungs- und Statistikprogrammen protokolliert werden."
|
||||
}
|
||||
},
|
||||
"toolbar": {
|
||||
"mute": "Stummschaltung aktivieren / deaktivieren",
|
||||
"videomute": "Kamera starten / stoppen",
|
||||
"authenticate": "Anmelden",
|
||||
"record": "Aufnehmen",
|
||||
"lock": "Raum schützen / Schutz aufheben",
|
||||
"invite": "Andere einladen",
|
||||
"chat": "Chat öffnen / schliessen",
|
||||
"prezi": "Prezi freigeben",
|
||||
"etherpad": "Geteiltes Dokument",
|
||||
"sharescreen": "Bildschirm freigeben",
|
||||
"fullscreen": "Vollbildmodus aktivieren / deaktivieren",
|
||||
"sip": "SIP Nummer anrufen",
|
||||
"Settings": "Einstellungen",
|
||||
"hangup": "Auflegen",
|
||||
"login": "Anmelden",
|
||||
"logout": "Abmelden"
|
||||
},
|
||||
"bottomtoolbar": {
|
||||
"chat": "Chat öffnen / schliessen",
|
||||
"filmstrip": "Videovorschauen anzeigen / verstecken",
|
||||
"contactlist": "Kontaktliste öffnen / schliessen"
|
||||
},
|
||||
"chat": {
|
||||
"nickname": {
|
||||
"title": "Nickname im Eingabefeld eingeben",
|
||||
"popover": "Einen Namen auswählen"
|
||||
},
|
||||
"messagebox": "Text eingeben..."
|
||||
},
|
||||
"settings": {
|
||||
"title": "Einstellungen",
|
||||
"update": "Aktualisieren",
|
||||
"name": "Name"
|
||||
},
|
||||
"videothumbnail": {
|
||||
"editnickname": "Klicken um den Anzeigenamen zu bearbeiten",
|
||||
"moderator": "Besitzer dieser Konferenz",
|
||||
"videomute": "Teilnehmer hat die Kamera pausiert.",
|
||||
"mute": "Teilnehmer ist stumm geschaltet",
|
||||
"kick": "Hinauswerfen",
|
||||
"muted": "Stummgeschaltet",
|
||||
"domute": "Stummschalten"
|
||||
},
|
||||
"connectionindicator": {
|
||||
"bitrate": "Bitrate:",
|
||||
"packetloss": "Paketverlust:",
|
||||
"resolution": "Auflösung:",
|
||||
"less": "Weniger anzeigen",
|
||||
"more": "Mehr anzeigen",
|
||||
"address": "Adresse:",
|
||||
"remoteport": "Entfernter Port:",
|
||||
"remoteport_plural": "Entfernte Ports:",
|
||||
"localport": "Lokaler Port:",
|
||||
"localport_plural": "Lokale Ports:",
|
||||
"localaddress": "Lokale Adresse:",
|
||||
"localaddress_plural": "Lokale Adressen:",
|
||||
"remoteaddress": "Entfernte Adresse:",
|
||||
"remoteaddress_plural": "Entfernte Adressen:",
|
||||
"transport": "Protokoll:",
|
||||
"bandwidth": "Geschätzte Bandbreite:",
|
||||
"na": "Verbindungsdaten erneut anzeigen wenn die Konferenz begonnen hat"
|
||||
},
|
||||
"notify": {
|
||||
"disconnected": "getrennt",
|
||||
"moderator": "Moderatorenrechte vergeben",
|
||||
"connected": "verbunden",
|
||||
"somebody": "Jemand",
|
||||
"me": "Ich",
|
||||
"focus": "Konferenz-Organisator",
|
||||
"focusFail": "__component__ ist im Moment nicht verfügbar - wiederholen in __ms__ Sekunden",
|
||||
"grantedTo": "Moderatorenrechte an __to__ vergeben.",
|
||||
"grantedToUnknown": "Moderatorenrechte an $t(somebody) vergeben."
|
||||
},
|
||||
"dialog": {
|
||||
"kickMessage": "Oh! Sie wurden aus der Konferenz ausgeschlossen.",
|
||||
"popupError": "Ihr Browser blockiert Popups von dieser Webseite. Bitte erlauben Sie Popups in den Sicherheitseinstellungen und versuchen Sie es erneut.",
|
||||
"passwordError": "Diese Konferenz ist mit einem Paswort geschützt. Nur der Besitzer der Konferenz kann ein Passwort vergeben.",
|
||||
"passwordError2": "Diese Konferenzt ist nicht mit einem Passwort geschützt. Nur der Besitzer der Konferenz kann ein Passwort vergeben.",
|
||||
"joinError": "Oh! Der Konferenz konnte nicht beigetreten werden. Diese könnte ein Problem mit den Sicherheitseinstellungen sein. Bitte kontaktieren Sie den Administrator des Dienstes.",
|
||||
"connectError": "Oh! Es hat etwas nicht geklappt und der Konferenz konnte nicht beigetreten werden.",
|
||||
"connecting": "",
|
||||
"error": "Fehler",
|
||||
"detectext": "Fehler bei der Erkennung der Bildschirmfreigabeerweiterung.",
|
||||
"failtoinstall": "Die Bildschirmfreigabeerweiterung konnte nicht installiert werden.",
|
||||
"failedpermissions": "Die Zugriffsberechtigungen auf das Mikrofon und/oder die Kamera konnte nicht eingeholt werden.",
|
||||
"bridgeUnavailable": "Die Jitsi Videobridge ist momentan nicht erreichbar. Bitte versuchen Sie es später noch einmal.",
|
||||
"lockTitle": "Sperren fehlgeschlagen",
|
||||
"lockMessage": "Die Konferenz konnte nicht gesperrt werden.",
|
||||
"warning": "Warnung",
|
||||
"passwordNotSupported": "Passwörter für Räume werden nicht unterstützt.",
|
||||
"sorry": "Entschuldigung",
|
||||
"internalError": "Interner Anwendungsfehler [setRemoteDescription]",
|
||||
"unableToSwitch": "Der Videodatenstrom kann nicht gewechselt werden.",
|
||||
"SLDFailure": "Oh! Die Stummschaltung konnte nicht aktiviert werden. (SLD Fehler)",
|
||||
"SRDFailure": "Oh! Das Video konnte nicht gestoppt werden. (SRD Fehler)",
|
||||
"oops": "Oh!",
|
||||
"defaultError": "Es ist ein Fehler aufgetreten",
|
||||
"passwordRequired": "Passwort erforderlich",
|
||||
"Ok": "OK",
|
||||
"removePreziTitle": "Prezi entfernen",
|
||||
"removePreziMsg": "Sind Sie sich sicher dass sie Prezi entfernen möchten?",
|
||||
"sharePreziTitle": "Ein Prezi teilen",
|
||||
"sharePreziMsg": "Ein anderer Teilnehmer teilt bereits ein Prezi. Diese Konferenz kann nur eine Prezi auf einmal anzeigen.",
|
||||
"Remove": "Entfernen",
|
||||
"Stop": "Stopp",
|
||||
"AuthMsg": "Für die Erstellung des Raums ist eine Authentifizierung erforderlich. <br/><b>__room__</b><br/>Sie können sich entweder anmelden oder warten bis jemand anderes die Authentifizierung vornimmt.",
|
||||
"Authenticate": "Anmelden",
|
||||
"Cancel": "Abbrechen",
|
||||
"retry": "Wiederholen",
|
||||
"logoutTitle": "Abmelden",
|
||||
"logoutQuestion": "Sind Sie sicher dass Sie sich abmelden und die Konferenz verlassen möchten?",
|
||||
"sessTerminated": "Sitzung beendet",
|
||||
"hungUp": "Anruf beendet",
|
||||
"joinAgain": "Erneut beitreten",
|
||||
"Share": "Teilen",
|
||||
"preziLinkError": "Bitte einen gültigen Prezi-Link angeben.",
|
||||
"Save": "Speichern",
|
||||
"recordingToken": "Aufnahme-Token eingeben",
|
||||
"Dial": "Wählen",
|
||||
"sipMsg": "Geben Sie eine SIP Nummer ein",
|
||||
"passwordCheck": "Sind Sie sicher dass Sie das Passwort entfernen möchten?",
|
||||
"passwordMsg": "Passwort setzen um den Raum zu schützen",
|
||||
"Invite": "Einladen",
|
||||
"shareLink": "Teilen Sie diesen Link mit jedem den Sie einladen möchten",
|
||||
"settings1": "Konferenz einrichten",
|
||||
"settings2": "Teilnehmer treten stummgeschaltet bei",
|
||||
"settings3": "Nickname erforderlich<br/><br/>Setzen Sie ein Passwort um den Raum zu schützen:",
|
||||
"yourPassword": "Ihr Passwort",
|
||||
"Back": "Zurück",
|
||||
"serviceUnavailable": "Dienst nicht verfügbar",
|
||||
"gracefulShutdown": "Der Dienst steht momentan wegen Wartungsarbeiten nicht zur Verfügung. Bitte versuchen Sie es später noch einmal.",
|
||||
"Yes": "Ja",
|
||||
"reservationError": "Fehler im Reservationssystem",
|
||||
"reservationErrorMsg": "Fehler, Nummer: __code__, Nachricht: __msg__",
|
||||
"password": "Passwort",
|
||||
"userPassword": "Benutzerpasswort",
|
||||
"token": "Token"
|
||||
},
|
||||
"email": {
|
||||
"sharedKey": [
|
||||
"Diese Konferenz ist Passwortgeschützt. Bitte verwenden Sie diese PIN zum Beitreten:",
|
||||
"",
|
||||
"",
|
||||
"__sharedKey__",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"subject": "Einladung zu einer __appName__ (__conferenceName__)",
|
||||
"body": [
|
||||
"Hallo!",
|
||||
"",
|
||||
"",
|
||||
"Ich möchte dich zu einer eben erstellten __appName__-Konferenz einladen.",
|
||||
"",
|
||||
"",
|
||||
"Bitte klicke auf den folgenden Link um der Konferenz ebenfalls beizutreten:",
|
||||
"",
|
||||
"",
|
||||
"__roomUrl__",
|
||||
"",
|
||||
"",
|
||||
"__sharedKeyText__",
|
||||
" Bitte beachte, dass __appName__ momentan nur mit einem der Browser __supportedBrowsers__ verwendet werden kann.",
|
||||
"",
|
||||
"",
|
||||
"Bis gleich!"
|
||||
],
|
||||
"and": "und"
|
||||
},
|
||||
"connection": {
|
||||
"ERROR": "Fehler",
|
||||
"CONNECTING": "Verbindung wird hergestellt",
|
||||
"CONNFAIL": "Verbindungsaufbau gescheitert",
|
||||
"AUTHENTICATING": "Anmeldung läuft",
|
||||
"AUTHFAIL": "Authentifizierung fehlgeschlagen",
|
||||
"CONNECTED": "Verbunden",
|
||||
"DISCONNECTED": "Getrennt",
|
||||
"DISCONNECTING": "Verbindung wird getrennt",
|
||||
"ATTACHED": "Angehängt"
|
||||
}
|
||||
}
|
||||
227
lang/main-fr.json
Normal file
@@ -0,0 +1,227 @@
|
||||
{
|
||||
"contactlist": "Liste de contacts",
|
||||
"connectionsettings": "Paramètres de connexion",
|
||||
"poweredby": "propulsé par",
|
||||
"downloadlogs": "Téléchargement des logs",
|
||||
"roomUrlDefaultMsg": "Votre conférence est en cours de création...",
|
||||
"participant": "Participant",
|
||||
"me": "moi",
|
||||
"speaker": "Haut-parleur",
|
||||
"defaultNickname": "ex: __name__",
|
||||
"defaultPreziLink": "e.g. __url__",
|
||||
"welcomepage": {
|
||||
"go": "Créer",
|
||||
"roomname": "Saisissez un nom de salle",
|
||||
"disable": "Ne pas afficher cette page lors de ma prochaine visite",
|
||||
"feature1": {
|
||||
"title": "Simple à utiliser",
|
||||
"content": "Aucun téléchargement requis. __app__ s'utilise directement depuis votre navigateur. Partager simplement l'URL de votre conférence avec les autres pour commencer."
|
||||
},
|
||||
"feature2": {
|
||||
"title": "Faible bande passante",
|
||||
"content": "Les vidéo conférences à plusieurs participants nécessitent moins de 128 kbps. Le partage d'écran et les conférences avec seulement de l'audio sont possibles avec beaucoup moins de débit."
|
||||
},
|
||||
"feature3": {
|
||||
"title": "Open source",
|
||||
"content": "__app__ est sous licence MIT. Vous êtes libre de le télécharger, l'utiliser, le modifier et le partager sous cette licence."
|
||||
},
|
||||
"feature4": {
|
||||
"title": "Nombre d'utilisateurs illimité",
|
||||
"content": "Il n'y a pas de restrictions artificielles concernant le nombre d'utilisateurs ou de participants à une conférence. La puissance du serveur et la bande passante sont les seuls facteurs limitants."
|
||||
},
|
||||
"feature5": {
|
||||
"title": "Partage d'écan",
|
||||
"content": "C'est facile de partager votre écran avec d'autres personnes. __app__ est idéal pour les présentations en ligne, les cours, et les sessions de support technique."
|
||||
},
|
||||
"feature6": {
|
||||
"title": "Salles sécurisées",
|
||||
"content": "Besoin de confidentialité? Les salles de conférence __app__ peuvent être sécurisées par un mot de passe pour exclure des invités non désirées, et prévenir des interruptions. "
|
||||
},
|
||||
"feature7": {
|
||||
"title": "Notes partagées",
|
||||
"content": "__app__ propose Etherpad, un éditeur de texte collaboratif en temps réel qui est parfait pour les procès-verbaux, l'édition d'articles et plus encore."
|
||||
},
|
||||
"feature8": {
|
||||
"title": "Statistiques d'utilisation",
|
||||
"content": "Connaissez mieux vos utilisateurs avec une intégration facile de Piwik, Google Analytics et d'autres systèmes de statistiques et supervision d'utilisation."
|
||||
}
|
||||
},
|
||||
"toolbar": {
|
||||
"mute": "Muet / Actif",
|
||||
"videomute": "Démarrer / Arrêter la caméra",
|
||||
"authenticate": "",
|
||||
"record": "Enregistrer",
|
||||
"lock": "Verrouiller / déverrouiller la salle",
|
||||
"invite": "Inviter des participants",
|
||||
"chat": "",
|
||||
"prezi": "Partager une présentation Prezi",
|
||||
"etherpad": "Partager un document",
|
||||
"sharescreen": "Partager mon écran",
|
||||
"fullscreen": "Activer / Désactiver le plein écran",
|
||||
"sip": "Appeler un numéro SIP",
|
||||
"Settings": "Paramètres",
|
||||
"hangup": "Raccrocher",
|
||||
"login": "Connexion",
|
||||
"logout": ""
|
||||
},
|
||||
"bottomtoolbar": {
|
||||
"chat": "Ouvrir / fermer le chat",
|
||||
"filmstrip": "Montrer / cacher ma vidéo miniature",
|
||||
"contactlist": "Ouvrir / fermer ma liste de contacts"
|
||||
},
|
||||
"chat": {
|
||||
"nickname": {
|
||||
"title": "Saisissez un pseudonyme dans le champ ci-dessous",
|
||||
"popover": "Choisissez un pseudonyme"
|
||||
},
|
||||
"messagebox": "Saisissez votre texte..."
|
||||
},
|
||||
"settings": {
|
||||
"title": "PARAMÈTRES",
|
||||
"update": "Mise à jour",
|
||||
"name": "Nom"
|
||||
},
|
||||
"videothumbnail": {
|
||||
"editnickname": "Cliquez pour modifier<br/>votre nom",
|
||||
"moderator": "Le propriétaire de<br/>cette conférence",
|
||||
"videomute": "Un participant a<br/>arrêté sa caméra.",
|
||||
"mute": "Un participant a coupé son micro",
|
||||
"kick": "Exclure",
|
||||
"muted": "Coupé",
|
||||
"domute": "Couper le son"
|
||||
},
|
||||
"connectionindicator": {
|
||||
"bitrate": "Débit",
|
||||
"packetloss": "Perte de paquets:",
|
||||
"resolution": "Résolution:",
|
||||
"less": "Cacher le détail",
|
||||
"more": "Montrer le détail",
|
||||
"address": "Adresse:",
|
||||
"remoteport": "Port distant:",
|
||||
"remoteport_plural": "Ports distants:",
|
||||
"localport": "Port local:",
|
||||
"localport_plural": "Ports locaux:",
|
||||
"localaddress": "Adresse locale:",
|
||||
"localaddress_plural": "Adresses locales:",
|
||||
"remoteaddress": "Adresse distante:",
|
||||
"remoteaddress_plural": "Adresses distantes:",
|
||||
"transport": "Transport:",
|
||||
"bandwidth": "Bande passante estimée:",
|
||||
"na": "Revenez ici pour afficher les informations de connexion une fois la conférence démarrée"
|
||||
},
|
||||
"notify": {
|
||||
"disconnected": "Déconnecté",
|
||||
"moderator": "Droits modérateur accordés!",
|
||||
"connected": "Connecté",
|
||||
"somebody": "Quelqu'un",
|
||||
"me": "Moi",
|
||||
"focus": "",
|
||||
"focusFail": "__component__ n'est pas disponible - réessayez dans __ms__ sec",
|
||||
"grantedTo": "Droits modérateur accordés à __to__!",
|
||||
"grantedToUnknown": "Droits modérateur accordés à $t(somebody)!"
|
||||
},
|
||||
"dialog": {
|
||||
"kickMessage": "Oups! Vous avez été renvoyé de la réunion!",
|
||||
"popupError": "Votre navigateur bloque les popups pour ce site. Activez les popups pour ce site dans vos paramètres de sécurité et réessayez.",
|
||||
"passwordError": "Cette conversation est protégée par un mot de passe. Seul le propriétaire de cette conférence peut paramétrer un mot de passe.",
|
||||
"passwordError2": "Cette conversation n'est pas protégée par un mot de passe. Seul le propriétaire de cette conférence peut paramétrer un mot de passe.",
|
||||
"joinError": "Oups! La conférence ne peut être rejointe. Il y a peut-être un souci avec les paramètres de sécurité. Contactez l'administrateur.",
|
||||
"connectError": "Oups! Un problème est survenu et la connexion à la conférence est impossible.",
|
||||
"connecting": "",
|
||||
"error": "",
|
||||
"detectext": "Une erreur est survenue pendant la détection de l'extension de partage d'écran.",
|
||||
"failtoinstall": "Échec de l'installation de l'extension de partage d'écran",
|
||||
"failedpermissions": "Échec d'obtention des permissions pour utiliser le micro et/ou la caméra local(e)",
|
||||
"bridgeUnavailable": "Le pont de visioconférence Jitsi est indisponible pour le moment. Réessayez plus tard!",
|
||||
"lockTitle": "Échec du verrouillage",
|
||||
"lockMessage": "Impossible de verrouiller la conférence.",
|
||||
"warning": "Avertissement",
|
||||
"passwordNotSupported": "Les mots de passe de conférence ne sont pas supportés.",
|
||||
"sorry": "Désolé",
|
||||
"internalError": "Une erreur interne de l'application est survenue [setRemoteDescription]",
|
||||
"unableToSwitch": "Impossible de passer le flux vidéo.",
|
||||
"SLDFailure": "Oups! Un problème est survenu et le micro n'a pas été coupé! (Échec SLD)",
|
||||
"SRDFailure": "Oups! Un problème est survenu et la caméra n'a pas été coupée! (Échec SRD)",
|
||||
"oops": "Oups!",
|
||||
"defaultError": "Une erreur est survenue",
|
||||
"passwordRequired": "Mot de passe requis",
|
||||
"Ok": "Ok",
|
||||
"removePreziTitle": "Supprimer la présentation Prezi",
|
||||
"removePreziMsg": "Voulez-vous vraiment supprimer votre présentation Prezi?",
|
||||
"sharePreziTitle": "Partager une présentation Prezi",
|
||||
"sharePreziMsg": "Un autre participant partage déjà une présentation Prezi. Cette conférence autorise une seule présentation Prezi à la fois.",
|
||||
"Remove": "Supprimer",
|
||||
"Stop": "Arrêter",
|
||||
"AuthMsg": "L'authentification est requise pour créer la conférence:<br/><b>__room__ </b></br> Vous pouvez vous authentifier pour créer la conférence ou attendre que quelqu'un le fasse pour vous.",
|
||||
"Authenticate": "Authentifiez-vous",
|
||||
"Cancel": "Annuler",
|
||||
"retry": "Réessayer",
|
||||
"logoutTitle": "Déconnexion",
|
||||
"logoutQuestion": "Voulez-vous vraiment vous déconnecter et arrêter la conférence?",
|
||||
"sessTerminated": "Session terminée",
|
||||
"hungUp": "Vous avez raccroché et quitté la conférence",
|
||||
"joinAgain": "Rejoignez à nouveau la conférence",
|
||||
"Share": "Partager",
|
||||
"preziLinkError": "Fournissez s'il vous plaît un lien prezi fonctionnel.",
|
||||
"Save": "Sauvegarder",
|
||||
"recordingToken": "Saisissez un jeton d'enregistrement",
|
||||
"Dial": "Composer",
|
||||
"sipMsg": "Saisissez un numéro SIP",
|
||||
"passwordCheck": "Voulez-vous vraiment supprimer votre mot de passe?",
|
||||
"passwordMsg": "Saisissez un mot de passe pour verrouiller la conférence",
|
||||
"Invite": "Inviter",
|
||||
"shareLink": "Partagez ce lien avec toutes les personnes que vous voulez inviter",
|
||||
"settings1": "Configurez votre conférence",
|
||||
"settings2": "Les participants rejoignent la conférence en étant muets.",
|
||||
"settings3": "Pseudonymes requis<br/><br/>Saisissez un mot de passe pour verrouiller la conférence:",
|
||||
"yourPassword": "Votre mot de passe",
|
||||
"Back": "Retour",
|
||||
"serviceUnavailable": "Service indisponible",
|
||||
"gracefulShutdown": "Le service est actuellement en maintenance. Réessayez plus tard.",
|
||||
"Yes": "Oui",
|
||||
"reservationError": "Erreur du système de réservation",
|
||||
"reservationErrorMsg": "Code d'erreur: __code__, message: __msg__",
|
||||
"password": "mot de passe",
|
||||
"userPassword": "mot de passe utilisateur",
|
||||
"token": "jeton"
|
||||
},
|
||||
"email": {
|
||||
"sharedKey": [
|
||||
"Cette conférence est protégée par un mot de passe. Utilisez le code suivant pour la rejoindre:",
|
||||
"",
|
||||
"",
|
||||
"__sharedKey__",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"subject": "Invitation à la conférence __appName__ : __conferenceName__",
|
||||
"body": [
|
||||
"Bonjour, je vous invite à la conférence __appName__ que je viens de créer.",
|
||||
"",
|
||||
"",
|
||||
"Cliquez sur le lien suivant pour rejoindre la conférence.",
|
||||
"",
|
||||
"",
|
||||
"__roomUrl__",
|
||||
"",
|
||||
"",
|
||||
"__sharedKeyText__",
|
||||
" Notez que __appName__ est actuellement seulement supporté par __supportedBrowsers__, vous devez donc utiliser un de ces navigateurs.",
|
||||
"",
|
||||
"",
|
||||
"À tout de suite dans la conférence!"
|
||||
],
|
||||
"and": "et"
|
||||
},
|
||||
"connection": {
|
||||
"ERROR": "Erreur",
|
||||
"CONNECTING": "Connexion en cours...",
|
||||
"CONNFAIL": "Échec de la Connexion",
|
||||
"AUTHENTICATING": "Authentification en cours...",
|
||||
"AUTHFAIL": "Échec de l'authentification",
|
||||
"CONNECTED": "Connecté",
|
||||
"DISCONNECTED": "Déconnecté",
|
||||
"DISCONNECTING": "Déconnexion en cours...",
|
||||
"ATTACHED": "Attachée"
|
||||
}
|
||||
}
|
||||
227
lang/main-it.json
Normal file
@@ -0,0 +1,227 @@
|
||||
{
|
||||
"contactlist": "LISTA CONTATTI",
|
||||
"connectionsettings": "Impostazioni Connessione",
|
||||
"poweredby": "powered by",
|
||||
"downloadlogs": "Scarica logs",
|
||||
"roomUrlDefaultMsg": "La tua conferenza sta per essere creata...",
|
||||
"participant": "Partecipante",
|
||||
"me": "io",
|
||||
"speaker": "Relatore",
|
||||
"defaultNickname": "es. __nome__",
|
||||
"defaultPreziLink": "es. __url__",
|
||||
"welcomepage": {
|
||||
"go": "VAI",
|
||||
"roomname": "Inserisci Nome Stanza",
|
||||
"disable": "Non visualizzare questa pagina la prossima volta",
|
||||
"feature1": {
|
||||
"title": "Semplice da usare",
|
||||
"content": "Nessun download richiesto. __app__ funziona direttamente nel tuo browser. Condividi semplicemente l'URL della tua conferenza con altri per iniziare."
|
||||
},
|
||||
"feature2": {
|
||||
"title": "Poca banda",
|
||||
"content": "Conferenze video multi utente funzionano con appena 128Kbps. La condivisione dello schermo ed conferenze solo audio sono possibili con molto meno."
|
||||
},
|
||||
"feature3": {
|
||||
"title": "Open source",
|
||||
"content": "__app__ è sotto licenza MIT. Sei libero di scaricarla, usarla, modificarla e condividerla con la medesima licenza."
|
||||
},
|
||||
"feature4": {
|
||||
"title": "Utenti illimitati",
|
||||
"content": "Non ci sono restrizioni sul numero di utenti per una conferenza. La potenza del server e la banda a disposizione sono gli unici fattori limitanti."
|
||||
},
|
||||
"feature5": {
|
||||
"title": "Condivisione Schermo",
|
||||
"content": "é facile condividere il tuo schermo con altri. __app__ è l'ideale per presentazioni online, letture, e sessioni di supporto tecnico."
|
||||
},
|
||||
"feature6": {
|
||||
"title": "Stanze sicure",
|
||||
"content": "Hai bisogno di più privacy? Le conferenze di __app__ possono essere rese sicure con una password per escludere ospiti non desiderati e prevenire interruzioni."
|
||||
},
|
||||
"feature7": {
|
||||
"title": "Note condivise",
|
||||
"content": "__app__ utilizza Etherpad, un editor di testo real-time e collaborativo che è ottimo per meeting, scrivere articoli e tanto altro."
|
||||
},
|
||||
"feature8": {
|
||||
"title": "Statistiche di utilizzo",
|
||||
"content": "Impara come i tuoi utenti lo utilizzano con la facile integrazione con PiWik, Google Analytics, e altri sistemi di statistica e monitor dell'utilizzo."
|
||||
}
|
||||
},
|
||||
"toolbar": {
|
||||
"mute": "Microfono Attiva / Disattiva",
|
||||
"videomute": "Abilita / Disabilita video",
|
||||
"authenticate": "",
|
||||
"record": "Registra",
|
||||
"lock": "Blocca / Sblocca Stanza",
|
||||
"invite": "Invita altri",
|
||||
"chat": "",
|
||||
"prezi": "Condividi con Prezi",
|
||||
"etherpad": "Documento condiviso",
|
||||
"sharescreen": "Condividi schermo",
|
||||
"fullscreen": "Entra / Esci da schermo intero",
|
||||
"sip": "Chiama numero SIP",
|
||||
"Settings": "Impostazioni",
|
||||
"hangup": "Termina",
|
||||
"login": "Login",
|
||||
"logout": ""
|
||||
},
|
||||
"bottomtoolbar": {
|
||||
"chat": "Apri / Chiudi chat",
|
||||
"filmstrip": "Mostra / Nascondi miniature",
|
||||
"contactlist": "Apri / Chiudi la lista contatti"
|
||||
},
|
||||
"chat": {
|
||||
"nickname": {
|
||||
"title": "Scegli un nickname nel box qui sotto",
|
||||
"popover": "Scegli un nickname"
|
||||
},
|
||||
"messagebox": "Inserisci testo..."
|
||||
},
|
||||
"settings": {
|
||||
"title": "IMPOSTAZIONI",
|
||||
"update": "Aggiorna",
|
||||
"name": "Nome"
|
||||
},
|
||||
"videothumbnail": {
|
||||
"editnickname": "Clicca per modificare il tuo<br/>nome visualizzato",
|
||||
"moderator": "Il proprietario<br/>della conferenza",
|
||||
"videomute": "Il partecipante ha<br/>fermato il video.",
|
||||
"mute": "Il partecipante è in muto",
|
||||
"kick": "Espelli",
|
||||
"muted": "Audio disattivato",
|
||||
"domute": "Disattiva audio"
|
||||
},
|
||||
"connectionindicator": {
|
||||
"bitrate": "Bitrate:",
|
||||
"packetloss": "Perdita pacchetti:",
|
||||
"resolution": "Risoluzione:",
|
||||
"less": "Mostra meno",
|
||||
"more": "Mostra di più",
|
||||
"address": "Indirizzo:",
|
||||
"remoteport": "Porta remota:",
|
||||
"remoteport_plural": "Porte remote:",
|
||||
"localport": "Porta locale:",
|
||||
"localport_plural": "Porte locali:",
|
||||
"localaddress": "Indirizzo locale:",
|
||||
"localaddress_plural": "Indirizzi locali:",
|
||||
"remoteaddress": "Indirizzo remoto:",
|
||||
"remoteaddress_plural": "Indirizzi remoti:",
|
||||
"transport": "Trasporto:",
|
||||
"bandwidth": "Banda stimata:",
|
||||
"na": "Ritorna qui per informazioni sulla connessione una volta che la conferenza inizia"
|
||||
},
|
||||
"notify": {
|
||||
"disconnected": "disconnesso",
|
||||
"moderator": "Impostati i permessi di moderatore!",
|
||||
"connected": "connesso",
|
||||
"somebody": "Qualcuno",
|
||||
"me": "io",
|
||||
"focus": "Focus su conferenza",
|
||||
"focusFail": "__component__ non disponibile - riprova in __ms__ sec",
|
||||
"grantedTo": "Permessi di moderatore garantiti a __to__!",
|
||||
"grantedToUnknown": "Permessi di moderatore garantiti a $t(somebody)!"
|
||||
},
|
||||
"dialog": {
|
||||
"kickMessage": "Accidenti! Sei stato espulso dalla conferenza !",
|
||||
"popupError": "Il tuo browser sta bloccando le finestre popup da questo sito. Abilita i popup tra le impostazioni di sicurezza del tuo browser e riprova.",
|
||||
"passwordError": "Questa conversazione è protetta da una password. Solo il proprietario della conferenza può impostare una password.",
|
||||
"passwordError2": "Questa conversazione non è al momento protetta da una password. Solo il proprietario può impostare la password.",
|
||||
"joinError": "Oops! Non puoi entrare nella conferenza. Ci deve essere qualche problema con la configurazione di sicurezza. Contattare l'amministratore di sistema.",
|
||||
"connectError": "Oops! Qualcosa è andato storto e non ti puoi collegare alla conferenza.",
|
||||
"connecting": "",
|
||||
"error": "",
|
||||
"detectext": "Errore durante il rilevamento dell'estensione per il desktopsharing.",
|
||||
"failtoinstall": "Impossibile installare l'estensione per il desktop sharing",
|
||||
"failedpermissions": "Impossibile ottenere i permessi per usare il microfono e/o il video locale.",
|
||||
"bridgeUnavailable": "Il Videobridge non è al momento disponibile. Si prega di riprovare più tardi!",
|
||||
"lockTitle": "Blocco fallito",
|
||||
"lockMessage": "Impossibile bloccare la conferenza.",
|
||||
"warning": "Attenzione",
|
||||
"passwordNotSupported": "Le password sulla stanza non sono al momento supportate.",
|
||||
"sorry": "Spiacente",
|
||||
"internalError": "Errore interno dell'applicazione [setRemoteDescription]",
|
||||
"unableToSwitch": "Impossibile cambiare lo stream video.",
|
||||
"SLDFailure": "Oops! Qualcosa è andato storto e non è possibile silenziare il microfono! (Errore SLD)",
|
||||
"SRDFailure": "Oops! Qualcosa è andato storto e non è possibile fermare il video! (Errore SRD)",
|
||||
"oops": "Oops!",
|
||||
"defaultError": "C'è stato qualche tipo di errore",
|
||||
"passwordRequired": "Richiesta password ",
|
||||
"Ok": "Ok",
|
||||
"removePreziTitle": "Rimuovi Prezi",
|
||||
"removePreziMsg": "Sei sicuro di voler rimuovere il tuo Prezi?",
|
||||
"sharePreziTitle": "Condividi un Prezi",
|
||||
"sharePreziMsg": "Un altro partecipante sta già condividendo un Prezi. Questa conferenza permette un solo Prezi alla volta.",
|
||||
"Remove": "Rimuovi",
|
||||
"Stop": "Ferma",
|
||||
"AuthMsg": "Autenticazione richiesta per creare la stanza:<br/><b>__room__ </b></br> Puoi autenticarti per creare la stanza o aspettare che qualcun altro lo faccia per te.",
|
||||
"Authenticate": "Autenticazione",
|
||||
"Cancel": "Annulla",
|
||||
"retry": "Riprova",
|
||||
"logoutTitle": "Logout",
|
||||
"logoutQuestion": "Vuoi disconnetterti e interrompere la conferenza ?",
|
||||
"sessTerminated": "Sessione Terminata",
|
||||
"hungUp": "Hai terminato la conversazione",
|
||||
"joinAgain": "Entra ancora",
|
||||
"Share": "Condividi",
|
||||
"preziLinkError": "Fornire un link Prezi esatto.",
|
||||
"Save": "Salva",
|
||||
"recordingToken": "Inserire token di registrazione",
|
||||
"Dial": "Componi",
|
||||
"sipMsg": "Inserire numero SIP",
|
||||
"passwordCheck": "Confermi la rimozione della password?",
|
||||
"passwordMsg": "Imposta una password per bloccare la stanza",
|
||||
"Invite": "Invita",
|
||||
"shareLink": "Condividi questo link con tutte le persone che vuoi invitare",
|
||||
"settings1": "Configura la tua conferenza",
|
||||
"settings2": "Partecipanti connessi in muto",
|
||||
"settings3": "Richiedi nicknames<br/><br/>Imposta una password per bloccare la tua stanza:",
|
||||
"yourPassword": "la tua password",
|
||||
"Back": "Indietro",
|
||||
"serviceUnavailable": "Servizio non disponibile",
|
||||
"gracefulShutdown": "Il nostro servizio è al momento spento per manutenzione. Si prega di riprovare più tardi.",
|
||||
"Yes": "Sì",
|
||||
"reservationError": "Errore di sistema in prenotazione",
|
||||
"reservationErrorMsg": "Codice di errore: __code__, messaggio: __msg__",
|
||||
"password": "password",
|
||||
"userPassword": "password utente",
|
||||
"token": "token"
|
||||
},
|
||||
"email": {
|
||||
"sharedKey": [
|
||||
"Questa conferenza è protetta da password. Utilizzare il seguente PIN alla connessione:",
|
||||
"",
|
||||
"",
|
||||
"__sharedKey__",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"subject": "Invito su __appName__ (__conferenceName__)",
|
||||
"body": [
|
||||
"Ciao, Vorrei invitarti alla conferenza che ho appena creato su __appName__ .",
|
||||
"",
|
||||
"",
|
||||
"Cliccare sul seguente link per entrare nella conferenza.",
|
||||
"",
|
||||
"",
|
||||
"__roomUrl__",
|
||||
"",
|
||||
"",
|
||||
"__sharedKeyText__",
|
||||
"NOTA: __appName__ è al momento supportato da questi browsers: __supportedBrowsers__, è necessario utilizzare uno di questi programmi per poter entrare.",
|
||||
"",
|
||||
"",
|
||||
"Ci sentiamo tra un secondo!"
|
||||
],
|
||||
"and": "e"
|
||||
},
|
||||
"connection": {
|
||||
"ERROR": "Errore",
|
||||
"CONNECTING": "Connessione",
|
||||
"CONNFAIL": "Connessione non riuscita",
|
||||
"AUTHENTICATING": "Autenticazione",
|
||||
"AUTHFAIL": "Autenticazione fallita",
|
||||
"CONNECTED": "Connesso",
|
||||
"DISCONNECTED": "Disconnesso",
|
||||
"DISCONNECTING": "Disconnessione in corso",
|
||||
"ATTACHED": "Collegato"
|
||||
}
|
||||
}
|
||||
173
lang/main-tr.json
Normal file
@@ -0,0 +1,173 @@
|
||||
{
|
||||
"contactlist": "KİŞİ LİSTESİ",
|
||||
"connectionsettings": "Bağlantı Ayarları",
|
||||
"poweredby": "Gücünün kaynağı",
|
||||
"downloadlogs": "Günlükleri indir",
|
||||
"welcomepage": {
|
||||
"go": "GİT",
|
||||
"roomname": "Oda adı girin",
|
||||
"disable": "Sonraki girişimde bu sayfayı gösterme",
|
||||
"feature1": {
|
||||
"title": "Kullanımı kolay",
|
||||
"content": "İndirmeye gerek yok. __app__ tarayıcınızda doğrudan çalışır. Başlamak için görüşme bağlantısını URL diğerleri ile paylaşın."
|
||||
},
|
||||
"feature2": {
|
||||
"title": "Düşük bant genişliği ihtiyacı",
|
||||
"content": "Ekran paylaşımı ve sadece ses ile çok katılımcılı video görüşmeleri, 128Kbps bağlantı ile mümkündür."
|
||||
},
|
||||
"feature3": {
|
||||
"title": "Açık kaynak kodlu",
|
||||
"content": "__app__ MIT ile lisanslanmıştır. Bu lisansa uygun olarak indirmek, kullanmak, değiştirmek ve paylaşmakta özgürsün."
|
||||
},
|
||||
"feature4": {
|
||||
"title": "Sınırsız sayıda kullanıcı",
|
||||
"content": "Kullanıcılar veya konferans katılımcılarının sayısında hiçbir yapay kısıtlama yoktur. Sadece sunucun güç ve bant genişliği, sınırlayıcı unsurdur."
|
||||
},
|
||||
"feature5": {
|
||||
"title": "Ekran paylaşımı",
|
||||
"content": "Diğerlerinle ekranınızı kolayca paylaşın. __app__ çevrimiçi sunumlar, dersler ve teknik destek oturumları için idealdir."
|
||||
},
|
||||
"feature6": {
|
||||
"title": "Güvenli odalar",
|
||||
"content": "Biraz gizliliğe ihtiyacınız var? __app__ görüşme odaları, istemeyen misafirleri uzak tutmak ve kesinleri önlemek için bir parola ile güvence altına alınabilir."
|
||||
},
|
||||
"feature7": {
|
||||
"title": "Paylaşımlı notlar",
|
||||
"content": "__app__ Etherpad içerir, gerçek zamanlı bir ortak çalışma metin düzenleyicisidir. Görüşme tutanakları, makale yazımı ve daha fazlası için biçilmiş kaftandır."
|
||||
},
|
||||
"feature8": {
|
||||
"title": "Kullanım istatistikleri",
|
||||
"content": "Piwik, Google Analytics ve diğer kullanım izleme ve istatistik sistemleri ile kolay tümleştirmeyle kullanıcılar hakkında bilgi edinin."
|
||||
}
|
||||
},
|
||||
"toolbar": {
|
||||
"mute": "Sessiz / Sesli",
|
||||
"videomute": "Kamera başlat / durdur",
|
||||
"authenticate": "",
|
||||
"record": "Kaydet",
|
||||
"lock": "Odayı kilitle / kilit aç",
|
||||
"invite": "Arkadaşlarını davet et",
|
||||
"chat": "",
|
||||
"prezi": "Prezi paylaş",
|
||||
"etherpad": "Paylaşımlı belge",
|
||||
"sharescreen": "Ekran paylaş",
|
||||
"fullscreen": "Tam Ekrana Gir / Çık",
|
||||
"sip": "SIP numara ara",
|
||||
"Settings": "Ayarlar",
|
||||
"hangup": "Kapat",
|
||||
"login": "Oturum aç",
|
||||
"logout": ""
|
||||
},
|
||||
"bottomtoolbar": {
|
||||
"chat": "Sohbeti aç / kapa",
|
||||
"filmstrip": "Kişi listesi aç / kapa",
|
||||
"contactlist": "Film şeridini göster / gizle"
|
||||
},
|
||||
"chat": {
|
||||
"nickname": {
|
||||
"title": "Aşağıdaki kutuya bir takma ad girin",
|
||||
"popover": "Bir takma ad seçin"
|
||||
},
|
||||
"messagebox": "Metin girin..."
|
||||
},
|
||||
"settings": {
|
||||
"title": "AYARLAR",
|
||||
"update": "Güncelle",
|
||||
"name": "Ad"
|
||||
},
|
||||
"videothumbnail": {
|
||||
"editnickname": "Görünür adınızı değiştirmek<br/>için tıkla",
|
||||
"moderator": "Bu görüşmenin<br/>sahibi",
|
||||
"videomute": "Katılımcı<br/>kamera durdurdu.",
|
||||
"mute": "Katılımcı sessiz",
|
||||
"kick": "Kovuldu",
|
||||
"muted": "Sessiz",
|
||||
"domute": "Sustur"
|
||||
},
|
||||
"connectionindicator": {
|
||||
"bitrate": "Bit hızı:",
|
||||
"packetloss": "Paket kaybı:",
|
||||
"resolution": "Çözünürlük:",
|
||||
"less": "Daha az göster",
|
||||
"more": "Daha fazla göster",
|
||||
"address": "Adres:",
|
||||
"remoteport": "Uzak port:Uzak portlar:",
|
||||
"localport": "Yerel port:Yerel portlar:",
|
||||
"localaddress": "Yerel adres:Yerel adresler:",
|
||||
"remoteaddress": "Uzak adres:Uzak adresler:",
|
||||
"transport": "Transport:",
|
||||
"bandwidth": "Tahmini bant genişliği:",
|
||||
"na": "Görüşme başladıktan sonra bağlantı bilgileri için buraya gel"
|
||||
},
|
||||
"notify": {
|
||||
"disconnected": "bağlantı kesildi",
|
||||
"moderator": "Görüşme yöneticisi hakları verildi!",
|
||||
"connected": "bağlandı",
|
||||
"somebody": "Birisi",
|
||||
"me": "Bana",
|
||||
"focus": "Görüşme odağı",
|
||||
"focusFail": "__component__ uygun değil - __ms__ saniye içinde tekrar deneyin",
|
||||
"grantedTo": "__to__, görüşme yöneticisi hakları verildi!",
|
||||
"grantedToUnknown": "$t(somebody), görüşme yöneticisi hakları verildi!"
|
||||
},
|
||||
"dialog": {
|
||||
"kickMessage": "Ahhh! Görüşmeden, kavuldun!",
|
||||
"popupError": "Tarayıcınız bu siteden açılır pencereleri engelliyor. Lütfen, tarayıcınızın güvenlik ayarlarında pop-up etkinleştirin ve tekrar deneyin.",
|
||||
"passwordError": "Bu görüşme şu anda bir parola ile korunmaktadır. Sadece görüşmenin sahibi bir parola ayarlayabilir.",
|
||||
"passwordError2": "Bu görüşme şu anda bir parola ile korunmamaktadır. Sadece görüşmenin sahibi bir parola ayarlayabilir.",
|
||||
"joinError": "Amanin boo! Görüşmeye katılamadık. Güvenlik yapılandırması ile ilgili bir sorun olabilir. Hizmet yöneticisi ile bağlantı kurun.",
|
||||
"connectError": "Amanin boo! Birşeyler ters gitti ve görüşmeye bağlanamadık.",
|
||||
"error": "Hata",
|
||||
"detectext": "Ekran paylaşımı eklentisi tespit edilirken hata.",
|
||||
"failtoinstall": "Masaüstü paylaşım eklentisi yüklenemedi",
|
||||
"failedpermissions": "Yerel mikrofon ve/veya kamerayı kullanmak için izinler alınamadı.",
|
||||
"bridgeUnavailable": "Jitsi Videobridge şu anda kullanılamıyor. Daha sonra tekrar deneyiniz!",
|
||||
"lockTitle": "Kilitlenemedi",
|
||||
"lockMessage": "Görüşme kilitlenemedi.",
|
||||
"warning": "Uyarı",
|
||||
"passwordNotSupported": "Oda parolaları şu anda desteklenmemekte.",
|
||||
"sorry": "Üzgünüz",
|
||||
"internalError": "İç uygulama hatası [setRemoteDescription]",
|
||||
"unableToSwitch": "Video akışı açılamıyor.",
|
||||
"SLDFailure": "Amanin boo! Birşeyler ters gitti ve sessize alamadık! (SLD Başarısız)",
|
||||
"SRDFailure": "Amanin boo! Birşeyler ters gitti ve videoyu durduramadık! (SRD Başarısız)",
|
||||
"oops": "Amanin boo!",
|
||||
"defaultError": "Bir tür hata var",
|
||||
"passwordRequired": "Parola gerekli",
|
||||
"Ok": "Tamam",
|
||||
"removePreziTitle": "Prezi kaldır",
|
||||
"removePreziMsg": "Prezi kaldırmak istediğinizden emin misiniz?",
|
||||
"sharePreziTitle": "Bir Prezi paylaşın",
|
||||
"sharePreziMsg": "Diğer katılımcı hala bir Prezi paylaşıyor.Bu görüşme aynı zamanda sadece bir Prezi izin verir.",
|
||||
"Remove": "Kaldır",
|
||||
"Stop": "Durdur",
|
||||
"AuthMsg": "Oda oluşturmak için kimlik doğrulama gerekli:<br/><b>__room__ </b></br> Oda oluşturmak için ya kimlik doğrulamalı ya da bunu yapması için bir başkasını beklemelisiniz.",
|
||||
"Authenticate": "Kimlik doğrula",
|
||||
"Cancel": "İptal",
|
||||
"logoutTitle": "Oturum kapat",
|
||||
"logoutQuestion": "Oturumu ve görüşmeyi sonlandırmak istediğinizden emin misiniz?",
|
||||
"sessTerminated": "Oturum sonlandırıldı",
|
||||
"hungUp": "Görüşmeyi bitirdiniz",
|
||||
"joinAgain": "Yeniden katıl",
|
||||
"Share": "Paylaş",
|
||||
"preziLinkError": "Lütfen doğru prezi bağlantısı verin.",
|
||||
"Save": "Kaydet",
|
||||
"recordingToken": "Kayıt jetonu girin",
|
||||
"Dial": "Ara",
|
||||
"sipMsg": "SIP numarası gir",
|
||||
"passwordCheck": "Parolanızı kaldırmak istediğinizden emin misiniz?",
|
||||
"passwordMsg": "Odanızı kilitlemek için bir parola koyun",
|
||||
"Invite": "Davet et",
|
||||
"shareLink": "Davet etmek istediğiniz herkesle bu bağlantıyı paylaşın",
|
||||
"settings1": "Görüşmenizi yapılandır",
|
||||
"settings2": "Katılımcılar sessiz katılsın",
|
||||
"settings3": "Takma adlar gerekli<br/><br/>Odanızı kitlemek için bir parola ayarlayın:",
|
||||
"yourPassword": "parolanız",
|
||||
"Back": "Geri",
|
||||
"serviceUnavailable": "Hizmet kullanım dışı",
|
||||
"gracefulShutdown": "Hizmetimiz bakıp için durduruldu. Daha sonra tekrar deneyiniz.",
|
||||
"Yes": "Evet",
|
||||
"reservationError": "Rezervasyon sistemi hatası",
|
||||
"reservationErrorMsg": "Hata kodu: __code__, mesaj: __msg__"
|
||||
}
|
||||
}
|
||||
242
lang/main.json
Normal file
@@ -0,0 +1,242 @@
|
||||
{
|
||||
"contactlist": "CONTACT LIST",
|
||||
"connectionsettings": "Connection Settings",
|
||||
"poweredby": "powered by",
|
||||
"downloadlogs": "Download logs",
|
||||
"roomUrlDefaultMsg": "Your conference is currently being created...",
|
||||
"participant": "Participant",
|
||||
"me": "me",
|
||||
"speaker": "Speaker",
|
||||
"defaultNickname": "ex. __name__",
|
||||
"defaultPreziLink": "e.g. __url__",
|
||||
"welcomepage":{
|
||||
"go": "GO",
|
||||
"roomname": "Enter room name",
|
||||
"disable": "Don't show this page next time I enter",
|
||||
"feature1": {
|
||||
"title": "Simple to use",
|
||||
"content": "No downloads required. __app__ works directly within your browser. Simply share your conference URL with others to get started."
|
||||
},
|
||||
"feature2": {
|
||||
"title": "Low bandwidth",
|
||||
"content": "Multi-party video conferences work with as little as 128Kbps. Screen-sharing and audio-only conferences are possible with far less."
|
||||
},
|
||||
"feature3": {
|
||||
"title": "Open source",
|
||||
"content": "__app__ is licensed under MIT. You are free to download, use, modify, and share them as per these licenses."
|
||||
},
|
||||
"feature4": {
|
||||
"title": "Unlimited users",
|
||||
"content": "There are no artificial restrictions on the number of users or conference participants. Server power and bandwidth are the only limiting factors."
|
||||
},
|
||||
"feature5": {
|
||||
"title": "Screen sharing",
|
||||
"content": "It's easy to share your screen with others. __app__ is ideal for on-line presentations, lectures, and tech support sessions."
|
||||
},
|
||||
"feature6": {
|
||||
"title": "Secure rooms",
|
||||
"content": "Need some privacy? __app__ conference rooms can be secured with a password in order to exclude unwanted guests and prevent interruptions."
|
||||
},
|
||||
"feature7": {
|
||||
"title": "Shared notes",
|
||||
"content": "__app__ features Etherpad, a real-time collaborative text editor that's great for meeting minutes, writing articles, and more."
|
||||
},
|
||||
"feature8": {
|
||||
"title": "Usage statistics",
|
||||
"content": "Learn about your users through easy integration with Piwik, Google Analytics, and other usage monitoring and statistics systems."
|
||||
}
|
||||
},
|
||||
"toolbar": {
|
||||
"mute": "Mute / Unmute",
|
||||
"videomute": "Start / stop camera",
|
||||
"authenticate": "Authenticate",
|
||||
"record": "Record",
|
||||
"lock": "Lock / unlock room",
|
||||
"invite": "Invite others",
|
||||
"chat": "Open / close chat",
|
||||
"prezi": "Share Prezi",
|
||||
"etherpad": "Shared document",
|
||||
"sharescreen": "Share screen",
|
||||
"fullscreen": "Enter / Exit Full Screen",
|
||||
"sip": "Call SIP number",
|
||||
"Settings": "Settings",
|
||||
"hangup": "Hang Up",
|
||||
"login": "Login",
|
||||
"logout": "Logout",
|
||||
"dialpad": "Show dialpad"
|
||||
},
|
||||
"bottomtoolbar": {
|
||||
"chat": "Open / close chat",
|
||||
"filmstrip": "Show / hide film strip",
|
||||
"contactlist": "Open / close contact list"
|
||||
},
|
||||
"chat":{
|
||||
"nickname": {
|
||||
"title": "Enter a nickname in the box below",
|
||||
"popover": "Choose a nickname"
|
||||
},
|
||||
"messagebox": "Enter text..."
|
||||
},
|
||||
"settings":
|
||||
{
|
||||
"title": "SETTINGS",
|
||||
"update": "Update",
|
||||
"name": "Name",
|
||||
"startAudioMuted": "start without audio",
|
||||
"startVideoMuted": "start without video"
|
||||
},
|
||||
"videothumbnail":
|
||||
{
|
||||
"editnickname": "Click to edit your<br/>display name",
|
||||
"moderator": "The owner of<br/>this conference",
|
||||
"videomute": "Participant has<br/>stopped the camera.",
|
||||
"mute": "Participant is muted",
|
||||
"kick": "Kick out",
|
||||
"muted": "Muted",
|
||||
"domute": "Mute"
|
||||
|
||||
},
|
||||
"connectionindicator":
|
||||
{
|
||||
"bitrate": "Bitrate:",
|
||||
"packetloss": "Packet loss:",
|
||||
"resolution": "Resolution:",
|
||||
"less": "Show less",
|
||||
"more": "Show more",
|
||||
"address": "Address:",
|
||||
"remoteport_plural": "Remote ports:",
|
||||
"localport_plural": "Local ports:",
|
||||
"remoteport": "Remote port:",
|
||||
"localport": "Local port:",
|
||||
"localaddress": "Local address:",
|
||||
"localaddress_plural": "Local addresses:",
|
||||
"remoteaddress": "Remote address:",
|
||||
"remoteaddress_plural": "Remote addresses:",
|
||||
"transport": "Transport:",
|
||||
"bandwidth": "Estimated bandwidth:",
|
||||
"na": "Come back here for connection information once the conference starts"
|
||||
},
|
||||
"notify": {
|
||||
"disconnected": "disconnected",
|
||||
"moderator": "Moderator rights granted!",
|
||||
"connected": "connected",
|
||||
"somebody": "Somebody",
|
||||
"me": "Me",
|
||||
"focus": "Conference focus",
|
||||
"focusFail": "__component__ not available - retry in __ms__ sec",
|
||||
"grantedTo": "Moderator rights granted to __to__!",
|
||||
"grantedToUnknown": "Moderator rights granted to $t(somebody)!",
|
||||
"muted": "You have started the conversation muted.",
|
||||
"mutedTitle": "You're muted!"
|
||||
},
|
||||
"dialog": {
|
||||
"kickMessage": "Ouch! You have been kicked out of the meet!",
|
||||
"popupError": "Your browser is blocking popup windows from this site. Please enable popups in your browser security settings and try again.",
|
||||
"passwordError": "This conversation is currently protected by a password. Only the owner of the conference could set a password.",
|
||||
"passwordError2": "This conversation isn't currently protected by a password. Only the owner of the conference could set a password.",
|
||||
"joinError": "Oops! We couldn't join the conference. There might be some problem with security configuration. Please contact service administrator.",
|
||||
"connectError": "Oops! Something went wrong and we couldn't connect to the conference.",
|
||||
"connectErrorWithMsg": "Oops! Something went wrong and we couldn't connect to the conference: __msg__",
|
||||
"connecting": "Connecting",
|
||||
"error": "Error",
|
||||
"detectext": "Error when trying to detect desktopsharing extension.",
|
||||
"failtoinstall": "Failed to install desktop sharing extension",
|
||||
"failedpermissions": "Failed to obtain permissions to use the local microphone and/or camera.",
|
||||
"bridgeUnavailable": "Jitsi Videobridge is currently unavailable. Please try again later!",
|
||||
"lockTitle": "Lock failed",
|
||||
"lockMessage": "Failed to lock conference.",
|
||||
"warning": "Warning",
|
||||
"passwordNotSupported": "Room passwords are currently not supported.",
|
||||
"sorry": "Sorry",
|
||||
"internalError": "Internal application error [setRemoteDescription]",
|
||||
"unableToSwitch": "Unable to switch video stream.",
|
||||
"SLDFailure": "Oops! Something went wrong and we failed to mute! (SLD Failure)",
|
||||
"SRDFailure": "Oops! Something went wrong and we failed to stop video! (SRD Failure)",
|
||||
"oops": "Oops!",
|
||||
"defaultError": "There was some kind of error",
|
||||
"passwordRequired": "Password required",
|
||||
"Ok": "Ok",
|
||||
"removePreziTitle": "Remove Prezi",
|
||||
"removePreziMsg": "Are you sure you would like to remove your Prezi?",
|
||||
"sharePreziTitle": "Share a Prezi",
|
||||
"sharePreziMsg": "Another participant is already sharing a Prezi.This conference allows only one Prezi at a time.",
|
||||
"Remove": "Remove",
|
||||
"WaitingForHost": "Waiting for the host ...",
|
||||
"WaitForHostMsg": "The conference <b>__room__ </b> has not yet started. If you are the host then please authenticate. Otherwise, please wait for the host to arrive.",
|
||||
"IamHost": "I am the host",
|
||||
"Cancel": "Cancel",
|
||||
"retry": "Retry",
|
||||
"logoutTitle" : "Logout",
|
||||
"logoutQuestion" : "Are you sure you want to logout and stop the conference?",
|
||||
"sessTerminated": "Session Terminated",
|
||||
"hungUp": "You hung up the call",
|
||||
"joinAgain": "Join again",
|
||||
"Share": "Share",
|
||||
"preziLinkError": "Please provide a correct prezi link.",
|
||||
"Save": "Save",
|
||||
"recordingToken": "Enter recording token",
|
||||
"Dial": "Dial",
|
||||
"sipMsg": "Enter SIP number",
|
||||
"passwordCheck": "Are you sure you would like to remove your password?",
|
||||
"Remove": "Remove",
|
||||
"passwordMsg": "Set a password to lock your room",
|
||||
"Invite": "Invite",
|
||||
"shareLink": "Share this link with everyone you want to invite",
|
||||
"settings1": "Configure your conference",
|
||||
"settings2": "Participants join muted",
|
||||
"settings3": "Require nicknames<br/><br/>Set a password to lock your room:",
|
||||
"yourPassword": "your password",
|
||||
"Back": "Back",
|
||||
"serviceUnavailable": "Service unavailable",
|
||||
"gracefulShutdown": "Our service is currently down for maintenance. Please try again later.",
|
||||
"Yes": "Yes",
|
||||
"reservationError": "Reservation system error",
|
||||
"reservationErrorMsg": "Error code: __code__, message: __msg__",
|
||||
"password": "password",
|
||||
"userPassword": "user password",
|
||||
"token": "token"
|
||||
},
|
||||
"email":
|
||||
{
|
||||
"sharedKey": [
|
||||
"This conference is password protected. Please use the following pin when joining:",
|
||||
"",
|
||||
"",
|
||||
"__sharedKey__",
|
||||
"",
|
||||
""],
|
||||
"subject": "Invitation to a __appName__ (__conferenceName__)",
|
||||
"body": [
|
||||
"Hey there, I%27d like to invite you to a __appName__ conference I%27ve just set up.",
|
||||
"",
|
||||
"",
|
||||
"Please click on the following link in order to join the conference.",
|
||||
"",
|
||||
"",
|
||||
"__roomUrl__",
|
||||
"",
|
||||
"",
|
||||
"__sharedKeyText__",
|
||||
" Note that __appName__ is currently only supported by __supportedBrowsers__, so you need to be using one of these browsers.",
|
||||
"",
|
||||
"",
|
||||
"Talk to you in a sec!"
|
||||
],
|
||||
"and": "and"
|
||||
},
|
||||
"connection":
|
||||
{
|
||||
"ERROR": "Error",
|
||||
"CONNECTING": "Connecting",
|
||||
"CONNFAIL": "Connection failed",
|
||||
"AUTHENTICATING": "Authenticating",
|
||||
"AUTHFAIL": "Authentication failed",
|
||||
"CONNECTED": "Connected",
|
||||
"DISCONNECTED": "Disconnected",
|
||||
"DISCONNECTING": "Disconnecting",
|
||||
"ATTACHED": "Attached",
|
||||
"FETCH_SESSION_ID": "Obtaining session-id...",
|
||||
"GOT_SESSION_ID": "Obtaining session-id... Done",
|
||||
"GET_SESSION_ID_ERROR": "Get session-id error: "
|
||||
}
|
||||
}
|
||||
28610
libs/app.bundle.js
Normal file
1273
libs/jquery-impromptu.js
vendored
3747
libs/pako.bundle.js
94
libs/rayo.js
@@ -1,94 +0,0 @@
|
||||
/* jshint -W117 */
|
||||
Strophe.addConnectionPlugin('rayo',
|
||||
{
|
||||
RAYO_XMLNS: 'urn:xmpp:rayo:1',
|
||||
connection: null,
|
||||
init: function (conn)
|
||||
{
|
||||
this.connection = conn;
|
||||
if (this.connection.disco)
|
||||
{
|
||||
this.connection.disco.addFeature('urn:xmpp:rayo:client:1');
|
||||
}
|
||||
|
||||
this.connection.addHandler(
|
||||
this.onRayo.bind(this), this.RAYO_XMLNS, 'iq', 'set', null, null);
|
||||
},
|
||||
onRayo: function (iq)
|
||||
{
|
||||
console.info("Rayo IQ", iq);
|
||||
},
|
||||
dial: function (to, from, roomName)
|
||||
{
|
||||
var self = this;
|
||||
var req = $iq(
|
||||
{
|
||||
type: 'set',
|
||||
to: config.hosts.call_control
|
||||
}
|
||||
);
|
||||
req.c('dial',
|
||||
{
|
||||
xmlns: this.RAYO_XMLNS,
|
||||
to: to,
|
||||
from: from
|
||||
});
|
||||
req.c('header',
|
||||
{
|
||||
name: 'JvbRoomName',
|
||||
value: roomName
|
||||
});
|
||||
|
||||
this.connection.sendIQ(
|
||||
req,
|
||||
function (result)
|
||||
{
|
||||
console.info('Dial result ', result);
|
||||
|
||||
var resource = $(result).find('ref').attr('uri');
|
||||
this.call_resource = resource.substr('xmpp:'.length);
|
||||
console.info(
|
||||
"Received call resource: " + this.call_resource);
|
||||
},
|
||||
function (error)
|
||||
{
|
||||
console.info('Dial error ', error);
|
||||
}
|
||||
);
|
||||
},
|
||||
hang_up: function ()
|
||||
{
|
||||
if (!this.call_resource)
|
||||
{
|
||||
console.warn("No call in progress");
|
||||
return;
|
||||
}
|
||||
|
||||
var self = this;
|
||||
var req = $iq(
|
||||
{
|
||||
type: 'set',
|
||||
to: this.call_resource
|
||||
}
|
||||
);
|
||||
req.c('hangup',
|
||||
{
|
||||
xmlns: this.RAYO_XMLNS
|
||||
});
|
||||
|
||||
this.connection.sendIQ(
|
||||
req,
|
||||
function (result)
|
||||
{
|
||||
console.info('Hangup result ', result);
|
||||
self.call_resource = null;
|
||||
},
|
||||
function (error)
|
||||
{
|
||||
console.info('Hangup error ', error);
|
||||
self.call_resource = null;
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -1,306 +0,0 @@
|
||||
/* jshint -W117 */
|
||||
Strophe.addConnectionPlugin('jingle', {
|
||||
connection: null,
|
||||
sessions: {},
|
||||
jid2session: {},
|
||||
ice_config: {iceServers: []},
|
||||
pc_constraints: {},
|
||||
media_constraints: {
|
||||
mandatory: {
|
||||
'OfferToReceiveAudio': true,
|
||||
'OfferToReceiveVideo': true
|
||||
}
|
||||
// MozDontOfferDataChannel: true when this is firefox
|
||||
},
|
||||
localAudio: null,
|
||||
localVideo: null,
|
||||
|
||||
init: function (conn) {
|
||||
this.connection = conn;
|
||||
if (this.connection.disco) {
|
||||
// http://xmpp.org/extensions/xep-0167.html#support
|
||||
// http://xmpp.org/extensions/xep-0176.html#support
|
||||
this.connection.disco.addFeature('urn:xmpp:jingle:1');
|
||||
this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:1');
|
||||
this.connection.disco.addFeature('urn:xmpp:jingle:transports:ice-udp:1');
|
||||
this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:audio');
|
||||
this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:video');
|
||||
|
||||
|
||||
// this is dealt with by SDP O/A so we don't need to annouce this
|
||||
//this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:rtcp-fb:0'); // XEP-0293
|
||||
//this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'); // XEP-0294
|
||||
if (config.useRtcpMux) {
|
||||
this.connection.disco.addFeature('urn:ietf:rfc:5761'); // rtcp-mux
|
||||
}
|
||||
if (config.useBundle) {
|
||||
this.connection.disco.addFeature('urn:ietf:rfc:5888'); // a=group, e.g. bundle
|
||||
}
|
||||
//this.connection.disco.addFeature('urn:ietf:rfc:5576'); // a=ssrc
|
||||
}
|
||||
this.connection.addHandler(this.onJingle.bind(this), 'urn:xmpp:jingle:1', 'iq', 'set', null, null);
|
||||
},
|
||||
onJingle: function (iq) {
|
||||
var sid = $(iq).find('jingle').attr('sid');
|
||||
var action = $(iq).find('jingle').attr('action');
|
||||
var fromJid = iq.getAttribute('from');
|
||||
// send ack first
|
||||
var ack = $iq({type: 'result',
|
||||
to: fromJid,
|
||||
id: iq.getAttribute('id')
|
||||
});
|
||||
console.log('on jingle ' + action + ' from ' + fromJid, iq);
|
||||
var sess = this.sessions[sid];
|
||||
if ('session-initiate' != action) {
|
||||
if (sess === null) {
|
||||
ack.type = 'error';
|
||||
ack.c('error', {type: 'cancel'})
|
||||
.c('item-not-found', {xmlns: 'urn:ietf:params:xml:ns:xmpp-stanzas'}).up()
|
||||
.c('unknown-session', {xmlns: 'urn:xmpp:jingle:errors:1'});
|
||||
this.connection.send(ack);
|
||||
return true;
|
||||
}
|
||||
// compare from to sess.peerjid (bare jid comparison for later compat with message-mode)
|
||||
// local jid is not checked
|
||||
if (Strophe.getBareJidFromJid(fromJid) != Strophe.getBareJidFromJid(sess.peerjid)) {
|
||||
console.warn('jid mismatch for session id', sid, fromJid, sess.peerjid);
|
||||
ack.type = 'error';
|
||||
ack.c('error', {type: 'cancel'})
|
||||
.c('item-not-found', {xmlns: 'urn:ietf:params:xml:ns:xmpp-stanzas'}).up()
|
||||
.c('unknown-session', {xmlns: 'urn:xmpp:jingle:errors:1'});
|
||||
this.connection.send(ack);
|
||||
return true;
|
||||
}
|
||||
} else if (sess !== undefined) {
|
||||
// existing session with same session id
|
||||
// this might be out-of-order if the sess.peerjid is the same as from
|
||||
ack.type = 'error';
|
||||
ack.c('error', {type: 'cancel'})
|
||||
.c('service-unavailable', {xmlns: 'urn:ietf:params:xml:ns:xmpp-stanzas'}).up();
|
||||
console.warn('duplicate session id', sid);
|
||||
this.connection.send(ack);
|
||||
return true;
|
||||
}
|
||||
// FIXME: check for a defined action
|
||||
this.connection.send(ack);
|
||||
// see http://xmpp.org/extensions/xep-0166.html#concepts-session
|
||||
switch (action) {
|
||||
case 'session-initiate':
|
||||
sess = new JingleSession($(iq).attr('to'), $(iq).find('jingle').attr('sid'), this.connection);
|
||||
// configure session
|
||||
|
||||
//in firefox we have only one stream object
|
||||
if (this.localAudio != this.localVideo) {
|
||||
sess.localStreams.push(this.localAudio);
|
||||
}
|
||||
if (this.localVideo) {
|
||||
sess.localStreams.push(this.localVideo);
|
||||
}
|
||||
sess.media_constraints = this.media_constraints;
|
||||
sess.pc_constraints = this.pc_constraints;
|
||||
sess.ice_config = this.ice_config;
|
||||
|
||||
sess.initiate(fromJid, false);
|
||||
// FIXME: setRemoteDescription should only be done when this call is to be accepted
|
||||
sess.setRemoteDescription($(iq).find('>jingle'), 'offer');
|
||||
|
||||
this.sessions[sess.sid] = sess;
|
||||
this.jid2session[sess.peerjid] = sess;
|
||||
|
||||
// the callback should either
|
||||
// .sendAnswer and .accept
|
||||
// or .sendTerminate -- not necessarily synchronus
|
||||
$(document).trigger('callincoming.jingle', [sess.sid]);
|
||||
break;
|
||||
case 'session-accept':
|
||||
sess.setRemoteDescription($(iq).find('>jingle'), 'answer');
|
||||
sess.accept();
|
||||
$(document).trigger('callaccepted.jingle', [sess.sid]);
|
||||
break;
|
||||
case 'session-terminate':
|
||||
// If this is not the focus sending the terminate, we have
|
||||
// nothing more to do here.
|
||||
if (Object.keys(this.sessions).length < 1
|
||||
|| !(this.sessions[Object.keys(this.sessions)[0]]
|
||||
instanceof JingleSession))
|
||||
{
|
||||
break;
|
||||
}
|
||||
console.log('terminating...', sess.sid);
|
||||
sess.terminate();
|
||||
this.terminate(sess.sid);
|
||||
if ($(iq).find('>jingle>reason').length) {
|
||||
$(document).trigger('callterminated.jingle', [
|
||||
sess.sid,
|
||||
sess.peerjid,
|
||||
$(iq).find('>jingle>reason>:first')[0].tagName,
|
||||
$(iq).find('>jingle>reason>text').text()
|
||||
]);
|
||||
} else {
|
||||
$(document).trigger('callterminated.jingle',
|
||||
[sess.sid, sess.peerjid]);
|
||||
}
|
||||
break;
|
||||
case 'transport-info':
|
||||
sess.addIceCandidate($(iq).find('>jingle>content'));
|
||||
break;
|
||||
case 'session-info':
|
||||
var affected;
|
||||
if ($(iq).find('>jingle>ringing[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').length) {
|
||||
$(document).trigger('ringing.jingle', [sess.sid]);
|
||||
} else if ($(iq).find('>jingle>mute[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').length) {
|
||||
affected = $(iq).find('>jingle>mute[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').attr('name');
|
||||
$(document).trigger('mute.jingle', [sess.sid, affected]);
|
||||
} else if ($(iq).find('>jingle>unmute[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').length) {
|
||||
affected = $(iq).find('>jingle>unmute[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').attr('name');
|
||||
$(document).trigger('unmute.jingle', [sess.sid, affected]);
|
||||
}
|
||||
break;
|
||||
case 'addsource': // FIXME: proprietary, un-jingleish
|
||||
case 'source-add': // FIXME: proprietary
|
||||
sess.addSource($(iq).find('>jingle>content'), fromJid);
|
||||
break;
|
||||
case 'removesource': // FIXME: proprietary, un-jingleish
|
||||
case 'source-remove': // FIXME: proprietary
|
||||
sess.removeSource($(iq).find('>jingle>content'), fromJid);
|
||||
break;
|
||||
default:
|
||||
console.warn('jingle action not implemented', action);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
initiate: function (peerjid, myjid) { // initiate a new jinglesession to peerjid
|
||||
var sess = new JingleSession(myjid || this.connection.jid,
|
||||
Math.random().toString(36).substr(2, 12), // random string
|
||||
this.connection);
|
||||
// configure session
|
||||
|
||||
//in firefox we have only one stream
|
||||
if (this.localAudio != this.localVideo) {
|
||||
sess.localStreams.push(this.localAudio);
|
||||
}
|
||||
if (this.localVideo) {
|
||||
sess.localStreams.push(this.localVideo);
|
||||
}
|
||||
sess.media_constraints = this.media_constraints;
|
||||
sess.pc_constraints = this.pc_constraints;
|
||||
sess.ice_config = this.ice_config;
|
||||
|
||||
sess.initiate(peerjid, true);
|
||||
this.sessions[sess.sid] = sess;
|
||||
this.jid2session[sess.peerjid] = sess;
|
||||
sess.sendOffer();
|
||||
return sess;
|
||||
},
|
||||
terminate: function (sid, reason, text) { // terminate by sessionid (or all sessions)
|
||||
if (sid === null || sid === undefined) {
|
||||
for (sid in this.sessions) {
|
||||
if (this.sessions[sid].state != 'ended') {
|
||||
this.sessions[sid].sendTerminate(reason || (!this.sessions[sid].active()) ? 'cancel' : null, text);
|
||||
this.sessions[sid].terminate();
|
||||
}
|
||||
delete this.jid2session[this.sessions[sid].peerjid];
|
||||
delete this.sessions[sid];
|
||||
}
|
||||
} else if (this.sessions.hasOwnProperty(sid)) {
|
||||
if (this.sessions[sid].state != 'ended') {
|
||||
this.sessions[sid].sendTerminate(reason || (!this.sessions[sid].active()) ? 'cancel' : null, text);
|
||||
this.sessions[sid].terminate();
|
||||
}
|
||||
delete this.jid2session[this.sessions[sid].peerjid];
|
||||
delete this.sessions[sid];
|
||||
}
|
||||
},
|
||||
// Used to terminate a session when an unavailable presence is received.
|
||||
terminateByJid: function (jid) {
|
||||
if (this.jid2session.hasOwnProperty(jid)) {
|
||||
var sess = this.jid2session[jid];
|
||||
if (sess) {
|
||||
sess.terminate();
|
||||
console.log('peer went away silently', jid);
|
||||
delete this.sessions[sess.sid];
|
||||
delete this.jid2session[jid];
|
||||
$(document).trigger('callterminated.jingle',
|
||||
[sess.sid, jid], 'gone');
|
||||
}
|
||||
}
|
||||
},
|
||||
terminateRemoteByJid: function (jid, reason) {
|
||||
if (this.jid2session.hasOwnProperty(jid)) {
|
||||
var sess = this.jid2session[jid];
|
||||
if (sess) {
|
||||
sess.sendTerminate(reason || (!sess.active()) ? 'kick' : null);
|
||||
sess.terminate();
|
||||
console.log('terminate peer with jid', sess.sid, jid);
|
||||
delete this.sessions[sess.sid];
|
||||
delete this.jid2session[jid];
|
||||
$(document).trigger('callterminated.jingle',
|
||||
[sess.sid, jid, 'kicked']);
|
||||
}
|
||||
}
|
||||
},
|
||||
getStunAndTurnCredentials: function () {
|
||||
// get stun and turn configuration from server via xep-0215
|
||||
// uses time-limited credentials as described in
|
||||
// http://tools.ietf.org/html/draft-uberti-behave-turn-rest-00
|
||||
//
|
||||
// see https://code.google.com/p/prosody-modules/source/browse/mod_turncredentials/mod_turncredentials.lua
|
||||
// for a prosody module which implements this
|
||||
//
|
||||
// currently, this doesn't work with updateIce and therefore credentials with a long
|
||||
// validity have to be fetched before creating the peerconnection
|
||||
// TODO: implement refresh via updateIce as described in
|
||||
// https://code.google.com/p/webrtc/issues/detail?id=1650
|
||||
var self = this;
|
||||
this.connection.sendIQ(
|
||||
$iq({type: 'get', to: this.connection.domain})
|
||||
.c('services', {xmlns: 'urn:xmpp:extdisco:1'}).c('service', {host: 'turn.' + this.connection.domain}),
|
||||
function (res) {
|
||||
var iceservers = [];
|
||||
$(res).find('>services>service').each(function (idx, el) {
|
||||
el = $(el);
|
||||
var dict = {};
|
||||
var type = el.attr('type');
|
||||
switch (type) {
|
||||
case 'stun':
|
||||
dict.url = 'stun:' + el.attr('host');
|
||||
if (el.attr('port')) {
|
||||
dict.url += ':' + el.attr('port');
|
||||
}
|
||||
iceservers.push(dict);
|
||||
break;
|
||||
case 'turn':
|
||||
case 'turns':
|
||||
dict.url = type + ':';
|
||||
if (el.attr('username')) { // https://code.google.com/p/webrtc/issues/detail?id=1508
|
||||
if (navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./) && parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2], 10) < 28) {
|
||||
dict.url += el.attr('username') + '@';
|
||||
} else {
|
||||
dict.username = el.attr('username'); // only works in M28
|
||||
}
|
||||
}
|
||||
dict.url += el.attr('host');
|
||||
if (el.attr('port') && el.attr('port') != '3478') {
|
||||
dict.url += ':' + el.attr('port');
|
||||
}
|
||||
if (el.attr('transport') && el.attr('transport') != 'udp') {
|
||||
dict.url += '?transport=' + el.attr('transport');
|
||||
}
|
||||
if (el.attr('password')) {
|
||||
dict.credential = el.attr('password');
|
||||
}
|
||||
iceservers.push(dict);
|
||||
break;
|
||||
}
|
||||
});
|
||||
self.ice_config.iceServers = iceservers;
|
||||
},
|
||||
function (err) {
|
||||
console.warn('getting turn credentials failed', err);
|
||||
console.warn('is mod_turncredentials or similar installed?');
|
||||
}
|
||||
);
|
||||
// implement push?
|
||||
}
|
||||
});
|
||||
@@ -1,41 +0,0 @@
|
||||
/**
|
||||
* Strophe logger implementation. Logs from level WARN and above.
|
||||
*/
|
||||
Strophe.log = function (level, msg) {
|
||||
switch(level) {
|
||||
case Strophe.LogLevel.WARN:
|
||||
console.warn("Strophe: "+msg);
|
||||
break;
|
||||
case Strophe.LogLevel.ERROR:
|
||||
case Strophe.LogLevel.FATAL:
|
||||
console.error("Strophe: "+msg);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
Strophe.getStatusString = function(status)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
case Strophe.Status.ERROR:
|
||||
return "ERROR";
|
||||
case Strophe.Status.CONNECTING:
|
||||
return "CONNECTING";
|
||||
case Strophe.Status.CONNFAIL:
|
||||
return "CONNFAIL";
|
||||
case Strophe.Status.AUTHENTICATING:
|
||||
return "AUTHENTICATING";
|
||||
case Strophe.Status.AUTHFAIL:
|
||||
return "AUTHFAIL";
|
||||
case Strophe.Status.CONNECTED:
|
||||
return "CONNECTED";
|
||||
case Strophe.Status.DISCONNECTED:
|
||||
return "DISCONNECTED";
|
||||
case Strophe.Status.DISCONNECTING:
|
||||
return "DISCONNECTING";
|
||||
case Strophe.Status.ATTACHED:
|
||||
return "ATTACHED";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
};
|
||||
@@ -1,32 +0,0 @@
|
||||
/**
|
||||
* Provides a wrapper class for the MediaStream.
|
||||
*
|
||||
* TODO : Add here the src from the video element and other related properties
|
||||
* and get rid of some of the mappings that we use throughout the UI.
|
||||
*/
|
||||
var MediaStream = (function() {
|
||||
/**
|
||||
* Creates a MediaStream object for the given data, session id and ssrc.
|
||||
*
|
||||
* @param data the data object from which we obtain the stream,
|
||||
* the peerjid, etc.
|
||||
* @param sid the session id
|
||||
* @param ssrc the ssrc corresponding to this MediaStream
|
||||
*
|
||||
* @constructor
|
||||
*/
|
||||
function MediaStreamProto(data, sid, ssrc) {
|
||||
this.stream = data.stream;
|
||||
this.peerjid = data.peerjid;
|
||||
this.ssrc = ssrc;
|
||||
this.session = connection.jingle.sessions[sid];
|
||||
this.type = (this.stream.getVideoTracks().length > 0)
|
||||
? MediaStream.VIDEO_TYPE : MediaStream.AUDIO_TYPE;
|
||||
this.muted = false;
|
||||
}
|
||||
|
||||
return MediaStreamProto;
|
||||
})();
|
||||
|
||||
MediaStream.VIDEO_TYPE = 'Video';
|
||||
MediaStream.AUDIO_TYPE = 'Audio';
|
||||
@@ -1,60 +0,0 @@
|
||||
/* global $, $iq, config, connection, focusMucJid, forceMuted, messageHandler,
|
||||
setAudioMuted, Strophe, toggleAudio */
|
||||
/**
|
||||
* Moderate connection plugin.
|
||||
*/
|
||||
Strophe.addConnectionPlugin('moderate', {
|
||||
connection: null,
|
||||
init: function (conn) {
|
||||
this.connection = conn;
|
||||
|
||||
this.connection.addHandler(this.onMute.bind(this),
|
||||
'http://jitsi.org/jitmeet/audio',
|
||||
'iq',
|
||||
'set',
|
||||
null,
|
||||
null);
|
||||
},
|
||||
setMute: function (jid, mute) {
|
||||
console.info("set mute", mute);
|
||||
var iqToFocus = $iq({to: focusMucJid, type: 'set'})
|
||||
.c('mute', {
|
||||
xmlns: 'http://jitsi.org/jitmeet/audio',
|
||||
jid: jid
|
||||
})
|
||||
.t(mute.toString())
|
||||
.up();
|
||||
|
||||
this.connection.sendIQ(
|
||||
iqToFocus,
|
||||
function (result) {
|
||||
console.log('set mute', result);
|
||||
},
|
||||
function (error) {
|
||||
console.log('set mute error', error);
|
||||
// FIXME: this causes an exception
|
||||
//messageHandler.openReportDialog(null, 'Failed to mute ' +
|
||||
// $("#participant_" + jid).find(".displayname").text() ||
|
||||
//"participant" + '.', error);
|
||||
});
|
||||
},
|
||||
onMute: function (iq) {
|
||||
var from = iq.getAttribute('from');
|
||||
if (from !== focusMucJid) {
|
||||
console.warn("Ignored mute from non focus peer");
|
||||
return false;
|
||||
}
|
||||
var mute = $(iq).find('mute');
|
||||
if (mute.length) {
|
||||
var doMuteAudio = mute.text() === "true";
|
||||
setAudioMuted(doMuteAudio);
|
||||
forceMuted = doMuteAudio;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
eject: function (jid) {
|
||||
// We're not the focus, so can't terminate
|
||||
//connection.jingle.terminateRemoteByJid(jid, 'kick');
|
||||
connection.emuc.kick(jid);
|
||||
}
|
||||
});
|
||||
236
moderator.js
@@ -1,236 +0,0 @@
|
||||
/* global $, $iq, config, connection, Etherpad, hangUp, messageHandler,
|
||||
roomName, sessionTerminated, Strophe, Toolbar, Util, VideoLayout */
|
||||
/**
|
||||
* Contains logic responsible for enabling/disabling functionality available
|
||||
* only to moderator users.
|
||||
*/
|
||||
var Moderator = (function (my) {
|
||||
|
||||
var focusUserJid;
|
||||
var getNextTimeout = Util.createExpBackoffTimer(1000);
|
||||
var getNextErrorTimeout = Util.createExpBackoffTimer(1000);
|
||||
// External authentication stuff
|
||||
var externalAuthEnabled = false;
|
||||
|
||||
my.isModerator = function () {
|
||||
return connection.emuc.isModerator();
|
||||
};
|
||||
|
||||
my.isPeerModerator = function (peerJid) {
|
||||
return connection.emuc.getMemberRole(peerJid) === 'moderator';
|
||||
};
|
||||
|
||||
my.isExternalAuthEnabled = function () {
|
||||
return externalAuthEnabled;
|
||||
};
|
||||
|
||||
my.onModeratorStatusChanged = function (isModerator) {
|
||||
|
||||
Toolbar.showSipCallButton(isModerator);
|
||||
Toolbar.showRecordingButton(
|
||||
isModerator); //&&
|
||||
// FIXME:
|
||||
// Recording visible if
|
||||
// there are at least 2(+ 1 focus) participants
|
||||
//Object.keys(connection.emuc.members).length >= 3);
|
||||
|
||||
if (isModerator && config.etherpad_base) {
|
||||
Etherpad.init();
|
||||
}
|
||||
};
|
||||
|
||||
my.init = function () {
|
||||
$(document).bind(
|
||||
'local.role.changed.muc',
|
||||
function (event, jid, info, pres) {
|
||||
Moderator.onModeratorStatusChanged(Moderator.isModerator());
|
||||
}
|
||||
);
|
||||
|
||||
$(document).bind(
|
||||
'left.muc',
|
||||
function (event, jid) {
|
||||
console.info("Someone left is it focus ? " + jid);
|
||||
var resource = Strophe.getResourceFromJid(jid);
|
||||
if (resource === 'focus' && !sessionTerminated) {
|
||||
console.info(
|
||||
"Focus has left the room - leaving conference");
|
||||
//hangUp();
|
||||
// We'd rather reload to have everything re-initialized
|
||||
// FIXME: show some message before reload
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
my.setFocusUserJid = function (focusJid) {
|
||||
if (!focusUserJid) {
|
||||
focusUserJid = focusJid;
|
||||
console.info("Focus jid set to: " + focusUserJid);
|
||||
}
|
||||
};
|
||||
|
||||
my.getFocusUserJid = function () {
|
||||
return focusUserJid;
|
||||
};
|
||||
|
||||
my.getFocusComponent = function () {
|
||||
// Get focus component address
|
||||
var focusComponent = config.hosts.focus;
|
||||
// If not specified use default: 'focus.domain'
|
||||
if (!focusComponent) {
|
||||
focusComponent = 'focus.' + config.hosts.domain;
|
||||
}
|
||||
return focusComponent;
|
||||
};
|
||||
|
||||
my.createConferenceIq = function () {
|
||||
// Generate create conference IQ
|
||||
var elem = $iq({to: Moderator.getFocusComponent(), type: 'set'});
|
||||
elem.c('conference', {
|
||||
xmlns: 'http://jitsi.org/protocol/focus',
|
||||
room: roomName
|
||||
});
|
||||
if (config.hosts.bridge !== undefined)
|
||||
{
|
||||
elem.c(
|
||||
'property',
|
||||
{ name: 'bridge', value: config.hosts.bridge})
|
||||
.up();
|
||||
}
|
||||
if (config.channelLastN !== undefined)
|
||||
{
|
||||
elem.c(
|
||||
'property',
|
||||
{ name: 'channelLastN', value: config.channelLastN})
|
||||
.up();
|
||||
}
|
||||
if (config.adaptiveLastN !== undefined)
|
||||
{
|
||||
elem.c(
|
||||
'property',
|
||||
{ name: 'adaptiveLastN', value: config.adaptiveLastN})
|
||||
.up();
|
||||
}
|
||||
if (config.adaptiveSimulcast !== undefined)
|
||||
{
|
||||
elem.c(
|
||||
'property',
|
||||
{ name: 'adaptiveSimulcast', value: config.adaptiveSimulcast})
|
||||
.up();
|
||||
}
|
||||
if (config.openSctp !== undefined)
|
||||
{
|
||||
elem.c(
|
||||
'property',
|
||||
{ name: 'openSctp', value: config.openSctp})
|
||||
.up();
|
||||
}
|
||||
if (config.enableFirefoxSupport !== undefined)
|
||||
{
|
||||
elem.c(
|
||||
'property',
|
||||
{ name: 'enableFirefoxHacks', value: config.enableFirefoxSupport})
|
||||
.up();
|
||||
}
|
||||
elem.up();
|
||||
return elem;
|
||||
};
|
||||
|
||||
my.parseConfigOptions = function (resultIq) {
|
||||
|
||||
Moderator.setFocusUserJid(
|
||||
$(resultIq).find('conference').attr('focusjid'));
|
||||
|
||||
var extAuthParam
|
||||
= $(resultIq).find('>conference>property[name=\'externalAuth\']');
|
||||
if (extAuthParam.length) {
|
||||
externalAuthEnabled = extAuthParam.attr('value') === 'true';
|
||||
}
|
||||
console.info("External authentication enabled: " + externalAuthEnabled);
|
||||
};
|
||||
|
||||
// FIXME: we need to show the fact that we're waiting for the focus
|
||||
// to the user(or that focus is not available)
|
||||
my.allocateConferenceFocus = function (roomName, callback) {
|
||||
// Try to use focus user JID from the config
|
||||
Moderator.setFocusUserJid(config.focusUserJid);
|
||||
// Send create conference IQ
|
||||
var iq = Moderator.createConferenceIq();
|
||||
connection.sendIQ(
|
||||
iq,
|
||||
function (result) {
|
||||
if ('true' === $(result).find('conference').attr('ready')) {
|
||||
// Reset both timers
|
||||
getNextTimeout(true);
|
||||
getNextErrorTimeout(true);
|
||||
// Setup config options
|
||||
Moderator.parseConfigOptions(result);
|
||||
// Exec callback
|
||||
callback();
|
||||
} else {
|
||||
var waitMs = getNextTimeout();
|
||||
console.info("Waiting for the focus... " + waitMs);
|
||||
// Reset error timeout
|
||||
getNextErrorTimeout(true);
|
||||
window.setTimeout(
|
||||
function () {
|
||||
Moderator.allocateConferenceFocus(
|
||||
roomName, callback);
|
||||
}, waitMs);
|
||||
}
|
||||
},
|
||||
function (error) {
|
||||
// Not authorized to create new room
|
||||
if ($(error).find('>error>not-authorized').length) {
|
||||
console.warn("Unauthorized to start the conference");
|
||||
$(document).trigger('auth_required.moderator');
|
||||
return;
|
||||
}
|
||||
var waitMs = getNextErrorTimeout();
|
||||
console.error("Focus error, retry after " + waitMs, error);
|
||||
// Show message
|
||||
messageHandler.notify(
|
||||
'Conference focus', 'disconnected',
|
||||
Moderator.getFocusComponent() +
|
||||
' not available - retry in ' + (waitMs / 1000) + ' sec');
|
||||
// Reset response timeout
|
||||
getNextTimeout(true);
|
||||
window.setTimeout(
|
||||
function () {
|
||||
Moderator.allocateConferenceFocus(roomName, callback);
|
||||
}, waitMs);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
my.getAuthUrl = function (urlCallback) {
|
||||
var iq = $iq({to: Moderator.getFocusComponent(), type: 'get'});
|
||||
iq.c('auth-url', {
|
||||
xmlns: 'http://jitsi.org/protocol/focus',
|
||||
room: roomName
|
||||
});
|
||||
connection.sendIQ(
|
||||
iq,
|
||||
function (result) {
|
||||
var url = $(result).find('auth-url').attr('url');
|
||||
if (url) {
|
||||
console.info("Got auth url: " + url);
|
||||
urlCallback(url);
|
||||
} else {
|
||||
console.error(
|
||||
"Failed to get auth url fro mthe focus", result);
|
||||
}
|
||||
},
|
||||
function (error) {
|
||||
console.error("Get auth url error", error);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
return my;
|
||||
}(Moderator || {}));
|
||||
|
||||
|
||||
|
||||
231
modules/API/API.js
Normal file
@@ -0,0 +1,231 @@
|
||||
/**
|
||||
* Implements API class that communicates with external api class
|
||||
* and provides interface to access Jitsi Meet features by external
|
||||
* applications that embed Jitsi Meet
|
||||
*/
|
||||
|
||||
var XMPPEvents = require("../../service/xmpp/XMPPEvents");
|
||||
|
||||
/**
|
||||
* List of the available commands.
|
||||
* @type {{
|
||||
* displayName: inputDisplayNameHandler,
|
||||
* muteAudio: toggleAudio,
|
||||
* muteVideo: toggleVideo,
|
||||
* filmStrip: toggleFilmStrip
|
||||
* }}
|
||||
*/
|
||||
var commands =
|
||||
{
|
||||
displayName: APP.UI.inputDisplayNameHandler,
|
||||
muteAudio: APP.UI.toggleAudio,
|
||||
muteVideo: APP.UI.toggleVideo,
|
||||
toggleFilmStrip: APP.UI.toggleFilmStrip,
|
||||
toggleChat: APP.UI.toggleChat,
|
||||
toggleContactList: APP.UI.toggleContactList
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Maps the supported events and their status
|
||||
* (true it the event is enabled and false if it is disabled)
|
||||
* @type {{
|
||||
* incomingMessage: boolean,
|
||||
* outgoingMessage: boolean,
|
||||
* displayNameChange: boolean,
|
||||
* participantJoined: boolean,
|
||||
* participantLeft: boolean
|
||||
* }}
|
||||
*/
|
||||
var events =
|
||||
{
|
||||
incomingMessage: false,
|
||||
outgoingMessage:false,
|
||||
displayNameChange: false,
|
||||
participantJoined: false,
|
||||
participantLeft: false
|
||||
};
|
||||
|
||||
var displayName = {};
|
||||
|
||||
/**
|
||||
* Processes commands from external applicaiton.
|
||||
* @param message the object with the command
|
||||
*/
|
||||
function processCommand(message)
|
||||
{
|
||||
if(message.action != "execute")
|
||||
{
|
||||
console.error("Unknown action of the message");
|
||||
return;
|
||||
}
|
||||
for(var key in message)
|
||||
{
|
||||
if(commands[key])
|
||||
commands[key].apply(null, message[key]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes events objects from external applications
|
||||
* @param event the event
|
||||
*/
|
||||
function processEvent(event) {
|
||||
if(!event.action)
|
||||
{
|
||||
console.error("Event with no action is received.");
|
||||
return;
|
||||
}
|
||||
|
||||
var i = 0;
|
||||
switch(event.action)
|
||||
{
|
||||
case "add":
|
||||
for(; i < event.events.length; i++)
|
||||
{
|
||||
events[event.events[i]] = true;
|
||||
}
|
||||
break;
|
||||
case "remove":
|
||||
for(; i < event.events.length; i++)
|
||||
{
|
||||
events[event.events[i]] = false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
console.error("Unknown action for event.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends message to the external application.
|
||||
* @param object
|
||||
*/
|
||||
function sendMessage(object) {
|
||||
window.parent.postMessage(JSON.stringify(object), "*");
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes a message event from the external application
|
||||
* @param event the message event
|
||||
*/
|
||||
function processMessage(event)
|
||||
{
|
||||
var message;
|
||||
try {
|
||||
message = JSON.parse(event.data);
|
||||
} catch (e) {}
|
||||
|
||||
if(!message.type)
|
||||
return;
|
||||
switch (message.type)
|
||||
{
|
||||
case "command":
|
||||
processCommand(message);
|
||||
break;
|
||||
case "event":
|
||||
processEvent(message);
|
||||
break;
|
||||
default:
|
||||
console.error("Unknown type of the message");
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function setupListeners() {
|
||||
APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_JOINED, function (from) {
|
||||
API.triggerEvent("participantJoined", {jid: from});
|
||||
});
|
||||
APP.xmpp.addListener(XMPPEvents.MESSAGE_RECEIVED, function (from, nick, txt, myjid) {
|
||||
if (from != myjid)
|
||||
API.triggerEvent("incomingMessage",
|
||||
{"from": from, "nick": nick, "message": txt});
|
||||
});
|
||||
APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_LEFT, function (jid) {
|
||||
API.triggerEvent("participantLeft", {jid: jid});
|
||||
});
|
||||
APP.xmpp.addListener(XMPPEvents.DISPLAY_NAME_CHANGED, function (jid, newDisplayName) {
|
||||
name = displayName[jid];
|
||||
if(!name || name != newDisplayName) {
|
||||
API.triggerEvent("displayNameChange", {jid: jid, displayname: newDisplayName});
|
||||
displayName[jid] = newDisplayName;
|
||||
}
|
||||
});
|
||||
APP.xmpp.addListener(XMPPEvents.SENDING_CHAT_MESSAGE, function (body) {
|
||||
APP.API.triggerEvent("outgoingMessage", {"message": body});
|
||||
});
|
||||
}
|
||||
|
||||
var API = {
|
||||
/**
|
||||
* Check whether the API should be enabled or not.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isEnabled: function () {
|
||||
var hash = location.hash;
|
||||
if(hash && hash.indexOf("external") > -1 && window.postMessage)
|
||||
return true;
|
||||
return false;
|
||||
},
|
||||
/**
|
||||
* Initializes the APIConnector. Setups message event listeners that will
|
||||
* receive information from external applications that embed Jitsi Meet.
|
||||
* It also sends a message to the external application that APIConnector
|
||||
* is initialized.
|
||||
*/
|
||||
init: function () {
|
||||
if (window.addEventListener)
|
||||
{
|
||||
window.addEventListener('message',
|
||||
processMessage, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
window.attachEvent('onmessage', processMessage);
|
||||
}
|
||||
sendMessage({type: "system", loaded: true});
|
||||
setupListeners();
|
||||
},
|
||||
/**
|
||||
* Checks whether the event is enabled ot not.
|
||||
* @param name the name of the event.
|
||||
* @returns {*}
|
||||
*/
|
||||
isEventEnabled: function (name) {
|
||||
return events[name];
|
||||
},
|
||||
|
||||
/**
|
||||
* Sends event object to the external application that has been subscribed
|
||||
* for that event.
|
||||
* @param name the name event
|
||||
* @param object data associated with the event
|
||||
*/
|
||||
triggerEvent: function (name, object) {
|
||||
if(this.isEnabled() && this.isEventEnabled(name))
|
||||
sendMessage({
|
||||
type: "event", action: "result", event: name, result: object});
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes the listeners.
|
||||
*/
|
||||
dispose: function () {
|
||||
if(window.removeEventListener)
|
||||
{
|
||||
window.removeEventListener("message",
|
||||
processMessage, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
window.detachEvent('onmessage', processMessage);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
module.exports = API;
|
||||
47
modules/DTMF/DTMF.js
Normal file
@@ -0,0 +1,47 @@
|
||||
/* global APP */
|
||||
|
||||
/**
|
||||
* A module for sending DTMF tones.
|
||||
*/
|
||||
var DTMFSender;
|
||||
var initDtmfSender = function() {
|
||||
// TODO: This needs to reset this if the peerconnection changes
|
||||
// (e.g. the call is re-made)
|
||||
if (DTMFSender)
|
||||
return;
|
||||
|
||||
var localAudio = APP.RTC.localAudio;
|
||||
if (localAudio && localAudio.getTracks().length > 0)
|
||||
{
|
||||
var peerconnection
|
||||
= APP.xmpp.getConnection().jingle.activecall.peerconnection;
|
||||
if (peerconnection) {
|
||||
DTMFSender =
|
||||
peerconnection.peerconnection
|
||||
.createDTMFSender(localAudio.getTracks()[0]);
|
||||
console.log("Initialized DTMFSender");
|
||||
}
|
||||
else {
|
||||
console.log("Failed to initialize DTMFSender: no PeerConnection.");
|
||||
}
|
||||
}
|
||||
else {
|
||||
console.log("Failed to initialize DTMFSender: no audio track.");
|
||||
}
|
||||
};
|
||||
|
||||
var DTMF = {
|
||||
sendTones: function (tones, duration, pause) {
|
||||
if (!DTMFSender)
|
||||
initDtmfSender();
|
||||
|
||||
if (DTMFSender){
|
||||
DTMFSender.insertDTMF(tones,
|
||||
(duration || 200),
|
||||
(pause || 200));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = DTMF;
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
/* global connection, Strophe, updateLargeVideo, focusedVideoSrc*/
|
||||
/* global Strophe, focusedVideoSrc*/
|
||||
|
||||
// cache datachannels to avoid garbage collection
|
||||
// https://code.google.com/p/chromium/issues/detail?id=405545
|
||||
var RTCEvents = require("../../service/RTC/RTCEvents");
|
||||
|
||||
var _dataChannels = [];
|
||||
var eventEmitter = null;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +36,7 @@ var DataChannels =
|
||||
// selections so that it can do adaptive simulcast,
|
||||
// we want the notification to trigger even if userJid is undefined,
|
||||
// or null.
|
||||
var userJid = VideoLayout.getLargeVideoState().userJid;
|
||||
var userJid = APP.UI.getLargeVideoState().userResourceJid;
|
||||
// we want the notification to trigger even if userJid is undefined,
|
||||
// or null.
|
||||
onSelectedEndpointChanged(userJid);
|
||||
@@ -66,9 +70,7 @@ var DataChannels =
|
||||
console.info(
|
||||
"Data channel new dominant speaker event: ",
|
||||
dominantSpeakerEndpoint);
|
||||
$(document).trigger(
|
||||
'dominantspeakerchanged',
|
||||
[dominantSpeakerEndpoint]);
|
||||
eventEmitter.emit(RTCEvents.DOMINANTSPEAKER_CHANGED, dominantSpeakerEndpoint);
|
||||
}
|
||||
else if ("InLastNChangeEvent" === colibriClass)
|
||||
{
|
||||
@@ -91,7 +93,8 @@ var DataChannels =
|
||||
newValue = new Boolean(newValue).valueOf();
|
||||
}
|
||||
}
|
||||
$(document).trigger('inlastnchanged', [oldValue, newValue]);
|
||||
|
||||
eventEmitter.emit(RTCEvents.LASTN_CHANGED, oldValue, newValue);
|
||||
}
|
||||
else if ("LastNEndpointsChangeEvent" === colibriClass)
|
||||
{
|
||||
@@ -106,29 +109,8 @@ var DataChannels =
|
||||
console.log(
|
||||
"Data channel new last-n event: ",
|
||||
lastNEndpoints, endpointsEnteringLastN, obj);
|
||||
$(document).trigger(
|
||||
'lastnchanged',
|
||||
[lastNEndpoints, endpointsEnteringLastN, stream]);
|
||||
}
|
||||
else if ("SimulcastLayersChangedEvent" === colibriClass)
|
||||
{
|
||||
$(document).trigger(
|
||||
'simulcastlayerschanged',
|
||||
[obj.endpointSimulcastLayers]);
|
||||
}
|
||||
else if ("SimulcastLayersChangingEvent" === colibriClass)
|
||||
{
|
||||
$(document).trigger(
|
||||
'simulcastlayerschanging',
|
||||
[obj.endpointSimulcastLayers]);
|
||||
}
|
||||
else if ("StartSimulcastLayerEvent" === colibriClass)
|
||||
{
|
||||
$(document).trigger('startsimulcastlayer', obj.simulcastLayer);
|
||||
}
|
||||
else if ("StopSimulcastLayerEvent" === colibriClass)
|
||||
{
|
||||
$(document).trigger('stopsimulcastlayer', obj.simulcastLayer);
|
||||
eventEmitter.emit(RTCEvents.LASTN_ENDPOINT_CHANGED,
|
||||
lastNEndpoints, endpointsEnteringLastN, obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -151,11 +133,12 @@ var DataChannels =
|
||||
* Binds "ondatachannel" event listener to given PeerConnection instance.
|
||||
* @param peerConnection WebRTC peer connection instance.
|
||||
*/
|
||||
bindDataChannelListener: function (peerConnection) {
|
||||
init: function (peerConnection, emitter) {
|
||||
if(!config.openSctp)
|
||||
retrun;
|
||||
return;
|
||||
|
||||
peerConnection.ondatachannel = this.onDataChannel;
|
||||
eventEmitter = emitter;
|
||||
|
||||
// Sample code for opening new data channel from Jitsi Meet to the bridge.
|
||||
// Although it's not a requirement to open separate channels from both bridge
|
||||
@@ -179,22 +162,27 @@ var DataChannels =
|
||||
var msgData = event.data;
|
||||
console.info("Got My Data Channel Message:", msgData, dataChannel);
|
||||
};*/
|
||||
}
|
||||
},
|
||||
handleSelectedEndpointEvent: onSelectedEndpointChanged,
|
||||
handlePinnedEndpointEvent: onPinnedEndpointChanged
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
function onSelectedEndpointChanged(userJid)
|
||||
function onSelectedEndpointChanged(userResource)
|
||||
{
|
||||
console.log('selected endpoint changed: ', userJid);
|
||||
console.log('selected endpoint changed: ', userResource);
|
||||
if (_dataChannels && _dataChannels.length != 0)
|
||||
{
|
||||
_dataChannels.some(function (dataChannel) {
|
||||
if (dataChannel.readyState == 'open')
|
||||
{
|
||||
console.log('sending selected endpoint changed '
|
||||
+ 'notification to the bridge: ', userResource);
|
||||
dataChannel.send(JSON.stringify({
|
||||
'colibriClass': 'SelectedEndpointChangedEvent',
|
||||
'selectedEndpoint': (!userJid || userJid == null)
|
||||
? null : userJid
|
||||
'selectedEndpoint':
|
||||
(!userResource || userResource === null)?
|
||||
null : userResource
|
||||
}));
|
||||
|
||||
return true;
|
||||
@@ -203,13 +191,9 @@ function onSelectedEndpointChanged(userJid)
|
||||
}
|
||||
}
|
||||
|
||||
$(document).bind("selectedendpointchanged", function(event, userJid) {
|
||||
onSelectedEndpointChanged(userJid);
|
||||
});
|
||||
|
||||
function onPinnedEndpointChanged(userJid)
|
||||
function onPinnedEndpointChanged(userResource)
|
||||
{
|
||||
console.log('pinned endpoint changed: ', userJid);
|
||||
console.log('pinned endpoint changed: ', userResource);
|
||||
if (_dataChannels && _dataChannels.length != 0)
|
||||
{
|
||||
_dataChannels.some(function (dataChannel) {
|
||||
@@ -217,8 +201,9 @@ function onPinnedEndpointChanged(userJid)
|
||||
{
|
||||
dataChannel.send(JSON.stringify({
|
||||
'colibriClass': 'PinnedEndpointChangedEvent',
|
||||
'pinnedEndpoint': (!userJid || userJid == null)
|
||||
? null : Strophe.getResourceFromJid(userJid)
|
||||
'pinnedEndpoint':
|
||||
(!userResource || userResource == null)?
|
||||
null : userResource
|
||||
}));
|
||||
|
||||
return true;
|
||||
@@ -227,9 +212,5 @@ function onPinnedEndpointChanged(userJid)
|
||||
}
|
||||
}
|
||||
|
||||
$(document).bind("pinnedendpointchanged", function(event, userJid) {
|
||||
onPinnedEndpointChanged(userJid);
|
||||
});
|
||||
|
||||
module.exports = DataChannels;
|
||||
|
||||
|
||||
@@ -1,12 +1,29 @@
|
||||
//var StreamEventTypes = require("../../service/RTC/StreamEventTypes.js");
|
||||
var StreamEventTypes = require("../../service/RTC/StreamEventTypes.js");
|
||||
|
||||
function LocalStream(stream, type, eventEmitter)
|
||||
|
||||
function LocalStream(stream, type, eventEmitter, videoType, isGUMStream)
|
||||
{
|
||||
this.stream = stream;
|
||||
this.eventEmitter = eventEmitter;
|
||||
this.type = type;
|
||||
|
||||
this.videoType = videoType;
|
||||
this.isGUMStream = true;
|
||||
if(isGUMStream === false)
|
||||
this.isGUMStream = isGUMStream;
|
||||
var self = this;
|
||||
if(type == "audio")
|
||||
{
|
||||
this.getTracks = function () {
|
||||
return self.stream.getAudioTracks();
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
this.getTracks = function () {
|
||||
return self.stream.getVideoTracks();
|
||||
};
|
||||
}
|
||||
|
||||
this.stream.onended = function()
|
||||
{
|
||||
self.streamEnded();
|
||||
@@ -23,37 +40,56 @@ LocalStream.prototype.getOriginalStream = function()
|
||||
}
|
||||
|
||||
LocalStream.prototype.isAudioStream = function () {
|
||||
return (this.stream.getAudioTracks() && this.stream.getAudioTracks().length > 0);
|
||||
}
|
||||
return this.type === "audio";
|
||||
};
|
||||
|
||||
LocalStream.prototype.mute = function()
|
||||
LocalStream.prototype.setMute = function(mute)
|
||||
{
|
||||
var ismuted = false;
|
||||
var tracks = [];
|
||||
if(this.type = "audio")
|
||||
|
||||
if((window.location.protocol != "https:" && this.isGUMStream) ||
|
||||
(this.isAudioStream() && this.isGUMStream) || this.videoType === "screen")
|
||||
{
|
||||
tracks = this.stream.getAudioTracks();
|
||||
var tracks = this.getTracks();
|
||||
|
||||
for (var idx = 0; idx < tracks.length; idx++) {
|
||||
tracks[idx].enabled = mute;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
tracks = this.stream.getVideoTracks();
|
||||
if(mute === false) {
|
||||
APP.xmpp.removeStream(this.stream);
|
||||
this.stream.stop();
|
||||
}
|
||||
else
|
||||
{
|
||||
var self = this;
|
||||
APP.RTC.rtcUtils.obtainAudioAndVideoPermissions(
|
||||
(this.isAudioStream() ? ["audio"] : ["video"]),
|
||||
function (stream) {
|
||||
if(self.isAudioStream())
|
||||
{
|
||||
APP.RTC.changeLocalAudio(stream, function () {});
|
||||
}
|
||||
else
|
||||
{
|
||||
APP.RTC.changeLocalVideo(stream, false, function () {});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
for (var idx = 0; idx < tracks.length; idx++) {
|
||||
ismuted = !tracks[idx].enabled;
|
||||
tracks[idx].enabled = !tracks[idx].enabled;
|
||||
}
|
||||
return ismuted;
|
||||
}
|
||||
};
|
||||
|
||||
LocalStream.prototype.isMuted = function () {
|
||||
var tracks = [];
|
||||
if(this.type = "audio")
|
||||
if(this.type == "audio")
|
||||
{
|
||||
tracks = this.stream.getAudioTracks();
|
||||
}
|
||||
else
|
||||
{
|
||||
if(this.stream.ended)
|
||||
return true;
|
||||
tracks = this.stream.getVideoTracks();
|
||||
}
|
||||
for (var idx = 0; idx < tracks.length; idx++) {
|
||||
@@ -63,4 +99,8 @@ LocalStream.prototype.isMuted = function () {
|
||||
return true;
|
||||
}
|
||||
|
||||
LocalStream.prototype.getId = function () {
|
||||
return this.stream.getTracks()[0].id;
|
||||
}
|
||||
|
||||
module.exports = LocalStream;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
////These lines should be uncommented when require works in app.js
|
||||
//var RTCBrowserType = require("../../service/RTC/RTCBrowserType.js");
|
||||
//var StreamEventTypes = require("../../service/RTC/StreamEventTypes.js");
|
||||
//var MediaStreamType = require("../../service/RTC/MediaStreamTypes");
|
||||
var MediaStreamType = require("../../service/RTC/MediaStreamTypes");
|
||||
var StreamEventType = require("../../service/RTC/StreamEventTypes");
|
||||
|
||||
/**
|
||||
* Creates a MediaStream object for the given data, session id and ssrc.
|
||||
@@ -14,7 +13,7 @@
|
||||
*
|
||||
* @constructor
|
||||
*/
|
||||
function MediaStream(data, sid, ssrc, eventEmmiter, browser) {
|
||||
function MediaStream(data, sid, ssrc, browser, eventEmitter) {
|
||||
|
||||
// XXX(gp) to minimize headaches in the future, we should build our
|
||||
// abstractions around tracks and not streams. ORTC is track based API.
|
||||
@@ -32,28 +31,30 @@ function MediaStream(data, sid, ssrc, eventEmmiter, browser) {
|
||||
this.ssrc = ssrc;
|
||||
this.type = (this.stream.getVideoTracks().length > 0)?
|
||||
MediaStreamType.VIDEO_TYPE : MediaStreamType.AUDIO_TYPE;
|
||||
this.videoType = null;
|
||||
this.muted = false;
|
||||
eventEmmiter.emit(StreamEventTypes.EVENT_TYPE_REMOTE_CREATED, this);
|
||||
if(browser == RTCBrowserType.RTC_BROWSER_FIREFOX)
|
||||
{
|
||||
if (!this.getVideoTracks)
|
||||
this.getVideoTracks = function () { return []; };
|
||||
if (!this.getAudioTracks)
|
||||
this.getAudioTracks = function () { return []; };
|
||||
}
|
||||
this.eventEmitter = eventEmitter;
|
||||
}
|
||||
|
||||
|
||||
MediaStream.prototype.getOriginalStream = function()
|
||||
{
|
||||
return this.stream;
|
||||
}
|
||||
};
|
||||
|
||||
MediaStream.prototype.setMute = function (value)
|
||||
{
|
||||
this.stream.muted = value;
|
||||
this.muted = value;
|
||||
}
|
||||
};
|
||||
|
||||
MediaStream.prototype.setVideoType = function (value) {
|
||||
if(this.videoType === value)
|
||||
return;
|
||||
this.videoType = value;
|
||||
this.eventEmitter.emit(StreamEventType.EVENT_TYPE_REMOTE_CHANGED,
|
||||
this.peerjid);
|
||||
};
|
||||
|
||||
|
||||
module.exports = MediaStream;
|
||||
|
||||
@@ -3,14 +3,50 @@ var RTCUtils = require("./RTCUtils.js");
|
||||
var LocalStream = require("./LocalStream.js");
|
||||
var DataChannels = require("./DataChannels");
|
||||
var MediaStream = require("./MediaStream.js");
|
||||
//These lines should be uncommented when require works in app.js
|
||||
//var StreamEventTypes = require("../../service/RTC/StreamEventTypes.js");
|
||||
//var XMPPEvents = require("../service/xmpp/XMPPEvents");
|
||||
var DesktopSharingEventTypes
|
||||
= require("../../service/desktopsharing/DesktopSharingEventTypes");
|
||||
var MediaStreamType = require("../../service/RTC/MediaStreamTypes");
|
||||
var StreamEventTypes = require("../../service/RTC/StreamEventTypes.js");
|
||||
var RTCEvents = require("../../service/RTC/RTCEvents.js");
|
||||
var XMPPEvents = require("../../service/xmpp/XMPPEvents");
|
||||
var UIEvents = require("../../service/UI/UIEvents");
|
||||
|
||||
var eventEmitter = new EventEmitter();
|
||||
|
||||
|
||||
function getMediaStreamUsage()
|
||||
{
|
||||
var result = {
|
||||
audio: true,
|
||||
video: true
|
||||
};
|
||||
|
||||
/** There are some issues with the desktop sharing
|
||||
* when this property is enabled.
|
||||
* WARNING: We must change the implementation to start video/audio if we
|
||||
* receive from the focus that the peer is not muted.
|
||||
|
||||
var isSecureConnection = window.location.protocol == "https:";
|
||||
|
||||
if(config.disableEarlyMediaPermissionRequests || !isSecureConnection)
|
||||
{
|
||||
result = {
|
||||
audio: false,
|
||||
video: false
|
||||
};
|
||||
|
||||
}
|
||||
**/
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
var RTC = {
|
||||
rtcUtils: null,
|
||||
devices: {
|
||||
audio: true,
|
||||
video: true
|
||||
},
|
||||
localStreams: [],
|
||||
remoteStreams: {},
|
||||
localAudio: null,
|
||||
@@ -18,16 +54,25 @@ var RTC = {
|
||||
addStreamListener: function (listener, eventType) {
|
||||
eventEmitter.on(eventType, listener);
|
||||
},
|
||||
addListener: function (type, listener) {
|
||||
eventEmitter.on(type, listener);
|
||||
},
|
||||
removeStreamListener: function (listener, eventType) {
|
||||
if(!(eventType instanceof StreamEventTypes))
|
||||
throw "Illegal argument";
|
||||
|
||||
eventEmitter.removeListener(eventType, listener);
|
||||
},
|
||||
createLocalStream: function (stream, type) {
|
||||
createLocalStream: function (stream, type, change, videoType, isMuted, isGUMStream) {
|
||||
|
||||
var localStream = new LocalStream(stream, type, eventEmitter, videoType, isGUMStream);
|
||||
//in firefox we have only one stream object
|
||||
if(this.localStreams.length == 0 ||
|
||||
this.localStreams[0].getOriginalStream() != stream)
|
||||
this.localStreams.push(localStream);
|
||||
if(isMuted === true)
|
||||
localStream.setMute(false);
|
||||
|
||||
var localStream = new LocalStream(stream, type, eventEmitter);
|
||||
this.localStreams.push(localStream);
|
||||
if(type == "audio")
|
||||
{
|
||||
this.localAudio = localStream;
|
||||
@@ -36,8 +81,11 @@ var RTC = {
|
||||
{
|
||||
this.localVideo = localStream;
|
||||
}
|
||||
eventEmitter.emit(StreamEventTypes.EVENT_TYPE_LOCAL_CREATED,
|
||||
localStream);
|
||||
var eventType = StreamEventTypes.EVENT_TYPE_LOCAL_CREATED;
|
||||
if(change)
|
||||
eventType = StreamEventTypes.EVENT_TYPE_LOCAL_CHANGED;
|
||||
|
||||
eventEmitter.emit(eventType, localStream, isMuted);
|
||||
return localStream;
|
||||
},
|
||||
removeLocalStream: function (stream) {
|
||||
@@ -50,13 +98,14 @@ var RTC = {
|
||||
}
|
||||
},
|
||||
createRemoteStream: function (data, sid, thessrc) {
|
||||
var remoteStream = new MediaStream(data, sid, thessrc, eventEmitter,
|
||||
this.getBrowserType());
|
||||
var jid = data.peerjid || connection.emuc.myroomjid;
|
||||
var remoteStream = new MediaStream(data, sid, thessrc,
|
||||
this.getBrowserType(), eventEmitter);
|
||||
var jid = data.peerjid || APP.xmpp.myJid();
|
||||
if(!this.remoteStreams[jid]) {
|
||||
this.remoteStreams[jid] = {};
|
||||
}
|
||||
this.remoteStreams[jid][remoteStream.type]= remoteStream;
|
||||
eventEmitter.emit(StreamEventTypes.EVENT_TYPE_REMOTE_CREATED, remoteStream);
|
||||
return remoteStream;
|
||||
},
|
||||
getBrowserType: function () {
|
||||
@@ -93,11 +142,35 @@ var RTC = {
|
||||
this.dispose();
|
||||
},
|
||||
start: function () {
|
||||
var self = this;
|
||||
APP.desktopsharing.addListener(
|
||||
function (stream, isUsingScreenStream, callback) {
|
||||
self.changeLocalVideo(stream, isUsingScreenStream, callback);
|
||||
}, DesktopSharingEventTypes.NEW_STREAM_CREATED);
|
||||
APP.xmpp.addListener(XMPPEvents.STREAMS_CHANGED, function (jid, changedStreams) {
|
||||
for(var i = 0; i < changedStreams.length; i++) {
|
||||
var type = changedStreams[i].type;
|
||||
if (type != "audio") {
|
||||
var peerStreams = self.remoteStreams[jid];
|
||||
if(!peerStreams)
|
||||
continue;
|
||||
var videoStream = peerStreams[MediaStreamType.VIDEO_TYPE];
|
||||
if(!videoStream)
|
||||
continue;
|
||||
videoStream.setVideoType(changedStreams[i].type);
|
||||
}
|
||||
}
|
||||
});
|
||||
APP.xmpp.addListener(XMPPEvents.CALL_INCOMING, function(event) {
|
||||
DataChannels.init(event.peerconnection, eventEmitter);
|
||||
});
|
||||
APP.UI.addListener(UIEvents.SELECTED_ENDPOINT,
|
||||
DataChannels.handleSelectedEndpointEvent);
|
||||
APP.UI.addListener(UIEvents.PINNED_ENDPOINT,
|
||||
DataChannels.handlePinnedEndpointEvent);
|
||||
this.rtcUtils = new RTCUtils(this);
|
||||
this.rtcUtils.obtainAudioAndVideoPermissions();
|
||||
},
|
||||
onConferenceCreated: function(event) {
|
||||
DataChannels.bindDataChannelListener(event.peerconnection);
|
||||
this.rtcUtils.obtainAudioAndVideoPermissions(
|
||||
null, null, getMediaStreamUsage());
|
||||
},
|
||||
muteRemoteVideoStream: function (jid, value) {
|
||||
var stream;
|
||||
@@ -109,16 +182,103 @@ var RTC = {
|
||||
}
|
||||
|
||||
if(!stream)
|
||||
return false;
|
||||
return true;
|
||||
|
||||
var isMuted = (value === "true");
|
||||
if (isMuted != stream.muted) {
|
||||
stream.setMute(isMuted);
|
||||
if (value != stream.muted) {
|
||||
stream.setMute(value);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
switchVideoStreams: function (new_stream) {
|
||||
this.localVideo.stream = new_stream;
|
||||
|
||||
this.localStreams = [];
|
||||
|
||||
//in firefox we have only one stream object
|
||||
if (this.localAudio.getOriginalStream() != new_stream)
|
||||
this.localStreams.push(this.localAudio);
|
||||
this.localStreams.push(this.localVideo);
|
||||
},
|
||||
changeLocalVideo: function (stream, isUsingScreenStream, callback) {
|
||||
var oldStream = this.localVideo.getOriginalStream();
|
||||
var type = (isUsingScreenStream? "screen" : "video");
|
||||
var localCallback = callback;
|
||||
if(this.localVideo.isMuted() && this.localVideo.videoType !== type)
|
||||
{
|
||||
localCallback = function() {
|
||||
APP.xmpp.setVideoMute(false, APP.UI.setVideoMuteButtonsState);
|
||||
callback();
|
||||
};
|
||||
}
|
||||
var videoStream = this.rtcUtils.createStream(stream, true);
|
||||
this.localVideo = this.createLocalStream(videoStream, "video", true, type);
|
||||
// Stop the stream to trigger onended event for old stream
|
||||
oldStream.stop();
|
||||
APP.xmpp.switchStreams(videoStream, oldStream,localCallback);
|
||||
},
|
||||
changeLocalAudio: function (stream, callback) {
|
||||
var oldStream = this.localAudio.getOriginalStream();
|
||||
var newStream = this.rtcUtils.createStream(stream);
|
||||
this.localAudio = this.createLocalStream(newStream, "audio", true);
|
||||
// Stop the stream to trigger onended event for old stream
|
||||
oldStream.stop();
|
||||
APP.xmpp.switchStreams(newStream, oldStream, callback, true);
|
||||
},
|
||||
/**
|
||||
* Checks if video identified by given src is desktop stream.
|
||||
* @param videoSrc eg.
|
||||
* blob:https%3A//pawel.jitsi.net/9a46e0bd-131e-4d18-9c14-a9264e8db395
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isVideoSrcDesktop: function (jid) {
|
||||
if(!jid)
|
||||
return false;
|
||||
var isDesktop = false;
|
||||
var stream = null;
|
||||
if (APP.xmpp.myJid() === jid) {
|
||||
// local video
|
||||
stream = this.localVideo;
|
||||
} else {
|
||||
var peerStreams = this.remoteStreams[jid];
|
||||
if(!peerStreams)
|
||||
return false;
|
||||
stream = peerStreams[MediaStreamType.VIDEO_TYPE];
|
||||
}
|
||||
|
||||
if(stream)
|
||||
isDesktop = (stream.videoType === "screen");
|
||||
|
||||
return isDesktop;
|
||||
},
|
||||
setVideoMute: function(mute, callback, options) {
|
||||
if(!this.localVideo)
|
||||
return;
|
||||
|
||||
if (mute == APP.RTC.localVideo.isMuted())
|
||||
{
|
||||
APP.xmpp.sendVideoInfoPresence(mute);
|
||||
if(callback)
|
||||
callback(mute);
|
||||
}
|
||||
else
|
||||
{
|
||||
APP.RTC.localVideo.setMute(!mute);
|
||||
APP.xmpp.setVideoMute(
|
||||
mute,
|
||||
callback,
|
||||
options);
|
||||
}
|
||||
},
|
||||
setDeviceAvailability: function (devices) {
|
||||
if(!devices)
|
||||
return;
|
||||
if(devices.audio === true || devices.audio === false)
|
||||
this.devices.audio = devices.audio;
|
||||
if(devices.video === true || devices.video === false)
|
||||
this.devices.video = devices.video;
|
||||
eventEmitter.emit(RTCEvents.AVAILABLE_DEVICES_CHANGED, this.devices);
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = RTC;
|
||||
|
||||
@@ -1,61 +1,52 @@
|
||||
//This should be uncommented when app.js supports require
|
||||
//var RTCBrowserType = require("../../service/RTC/RTCBrowserType.js");
|
||||
var RTCBrowserType = require("../../service/RTC/RTCBrowserType.js");
|
||||
var Resolutions = require("../../service/RTC/Resolutions");
|
||||
|
||||
var currentResolution = null;
|
||||
|
||||
function getPreviousResolution(resolution) {
|
||||
if(!Resolutions[resolution])
|
||||
return null;
|
||||
var order = Resolutions[resolution].order;
|
||||
var res = null;
|
||||
var resName = null;
|
||||
for(var i in Resolutions)
|
||||
{
|
||||
var tmp = Resolutions[i];
|
||||
if(res == null || (res.order < tmp.order && tmp.order < order))
|
||||
{
|
||||
resName = i;
|
||||
res = tmp;
|
||||
}
|
||||
}
|
||||
return resName;
|
||||
}
|
||||
|
||||
function setResolutionConstraints(constraints, resolution, isAndroid)
|
||||
{
|
||||
if (resolution && !constraints.video || isAndroid) {
|
||||
constraints.video = { mandatory: {}, optional: [] };// same behaviour as true
|
||||
}
|
||||
// see https://code.google.com/p/chromium/issues/detail?id=143631#c9 for list of supported resolutions
|
||||
switch (resolution) {
|
||||
// 16:9 first
|
||||
case '1080':
|
||||
case 'fullhd':
|
||||
constraints.video.mandatory.minWidth = 1920;
|
||||
constraints.video.mandatory.minHeight = 1080;
|
||||
break;
|
||||
case '720':
|
||||
case 'hd':
|
||||
constraints.video.mandatory.minWidth = 1280;
|
||||
constraints.video.mandatory.minHeight = 720;
|
||||
break;
|
||||
case '360':
|
||||
constraints.video.mandatory.minWidth = 640;
|
||||
constraints.video.mandatory.minHeight = 360;
|
||||
break;
|
||||
case '180':
|
||||
constraints.video.mandatory.minWidth = 320;
|
||||
constraints.video.mandatory.minHeight = 180;
|
||||
break;
|
||||
// 4:3
|
||||
case '960':
|
||||
constraints.video.mandatory.minWidth = 960;
|
||||
constraints.video.mandatory.minHeight = 720;
|
||||
break;
|
||||
case '640':
|
||||
case 'vga':
|
||||
constraints.video.mandatory.minWidth = 640;
|
||||
constraints.video.mandatory.minHeight = 480;
|
||||
break;
|
||||
case '320':
|
||||
|
||||
if(Resolutions[resolution])
|
||||
{
|
||||
constraints.video.mandatory.minWidth = Resolutions[resolution].width;
|
||||
constraints.video.mandatory.minHeight = Resolutions[resolution].height;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isAndroid) {
|
||||
constraints.video.mandatory.minWidth = 320;
|
||||
constraints.video.mandatory.minHeight = 240;
|
||||
break;
|
||||
default:
|
||||
if (isAndroid) {
|
||||
constraints.video.mandatory.minWidth = 320;
|
||||
constraints.video.mandatory.minHeight = 240;
|
||||
constraints.video.mandatory.maxFrameRate = 15;
|
||||
}
|
||||
break;
|
||||
constraints.video.mandatory.maxFrameRate = 15;
|
||||
}
|
||||
}
|
||||
|
||||
if (constraints.video.mandatory.minWidth)
|
||||
constraints.video.mandatory.maxWidth = constraints.video.mandatory.minWidth;
|
||||
if (constraints.video.mandatory.minHeight)
|
||||
constraints.video.mandatory.maxHeight = constraints.video.mandatory.minHeight;
|
||||
}
|
||||
|
||||
|
||||
function getConstraints(um, resolution, bandwidth, fps, desktopStream, isAndroid)
|
||||
{
|
||||
var constraints = {audio: false, video: false};
|
||||
@@ -115,7 +106,9 @@ function getConstraints(um, resolution, bandwidth, fps, desktopStream, isAndroid
|
||||
}
|
||||
}
|
||||
|
||||
setResolutionConstraints(constraints, resolution, isAndroid);
|
||||
if (um.indexOf('video') >= 0) {
|
||||
setResolutionConstraints(constraints, resolution, isAndroid);
|
||||
}
|
||||
|
||||
if (bandwidth) { // doesn't work currently, see webrtc issue 1846
|
||||
if (!constraints.video) constraints.video = {mandatory: {}, optional: []};//same behaviour as true
|
||||
@@ -137,12 +130,22 @@ function RTCUtils(RTCService)
|
||||
if (navigator.mozGetUserMedia) {
|
||||
console.log('This appears to be Firefox');
|
||||
var version = parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1], 10);
|
||||
if (version >= 22) {
|
||||
if (version >= 40
|
||||
&& config.useBundle && config.useRtcpMux) {
|
||||
this.peerconnection = mozRTCPeerConnection;
|
||||
this.browser = RTCBrowserType.RTC_BROWSER_FIREFOX;
|
||||
this.getUserMedia = navigator.mozGetUserMedia.bind(navigator);
|
||||
this.pc_constraints = {};
|
||||
this.attachMediaStream = function (element, stream) {
|
||||
// srcObject is being standardized and FF will eventually
|
||||
// support that unprefixed. FF also supports the
|
||||
// "element.src = URL.createObjectURL(...)" combo, but that
|
||||
// will be deprecated in favour of srcObject.
|
||||
//
|
||||
// https://groups.google.com/forum/#!topic/mozilla.dev.media/pKOiioXonJg
|
||||
// https://github.com/webrtc/samples/issues/302
|
||||
if(!element[0])
|
||||
return;
|
||||
element[0].mozSrcObject = stream;
|
||||
element[0].play();
|
||||
};
|
||||
@@ -155,14 +158,21 @@ function RTCUtils(RTCService)
|
||||
return tracks[0].id.replace(/[\{,\}]/g,"");
|
||||
};
|
||||
this.getVideoSrc = function (element) {
|
||||
if(!element)
|
||||
return null;
|
||||
return element.mozSrcObject;
|
||||
};
|
||||
this.setVideoSrc = function (element, src) {
|
||||
element.mozSrcObject = src;
|
||||
if(element)
|
||||
element.mozSrcObject = src;
|
||||
};
|
||||
RTCSessionDescription = mozRTCSessionDescription;
|
||||
RTCIceCandidate = mozRTCIceCandidate;
|
||||
} else {
|
||||
window.location.href = 'unsupported_browser.html';
|
||||
return;
|
||||
}
|
||||
|
||||
} else if (navigator.webkitGetUserMedia) {
|
||||
console.log('This appears to be Chrome');
|
||||
this.peerconnection = webkitRTCPeerConnection;
|
||||
@@ -177,10 +187,13 @@ function RTCUtils(RTCService)
|
||||
return stream.id.replace(/[\{,\}]/g,"");
|
||||
};
|
||||
this.getVideoSrc = function (element) {
|
||||
if(!element)
|
||||
return null;
|
||||
return element.getAttribute("src");
|
||||
};
|
||||
this.setVideoSrc = function (element, src) {
|
||||
element.setAttribute("src", src);
|
||||
if(element)
|
||||
element.setAttribute("src", src);
|
||||
};
|
||||
// DTLS should now be enabled by default but..
|
||||
this.pc_constraints = {'optional': [{'DtlsSrtpKeyAgreement': 'true'}]};
|
||||
@@ -202,16 +215,9 @@ function RTCUtils(RTCService)
|
||||
{
|
||||
try { console.log('Browser does not appear to be WebRTC-capable'); } catch (e) { }
|
||||
|
||||
window.location.href = 'webrtcrequired.html';
|
||||
window.location.href = 'unsupported_browser.html';
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.browser !== RTCBrowserType.RTC_BROWSER_CHROME &&
|
||||
config.enableFirefoxSupport !== true) {
|
||||
window.location.href = 'chromeonly.html';
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -219,6 +225,7 @@ RTCUtils.prototype.getUserMediaWithConstraints = function(
|
||||
um, success_callback, failure_callback, resolution,bandwidth, fps,
|
||||
desktopStream)
|
||||
{
|
||||
currentResolution = resolution;
|
||||
// Check if we are running on Android device
|
||||
var isAndroid = navigator.userAgent.indexOf('Android') != -1;
|
||||
|
||||
@@ -227,41 +234,23 @@ RTCUtils.prototype.getUserMediaWithConstraints = function(
|
||||
|
||||
var isFF = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
||||
|
||||
var self = this;
|
||||
|
||||
try {
|
||||
if (config.enableSimulcast
|
||||
&& constraints.video
|
||||
&& constraints.video.chromeMediaSource !== 'screen'
|
||||
&& constraints.video.chromeMediaSource !== 'desktop'
|
||||
&& !isAndroid
|
||||
|
||||
// We currently do not support FF, as it doesn't have multistream support.
|
||||
&& !isFF) {
|
||||
simulcast.getUserMedia(constraints, function (stream) {
|
||||
console.log('onUserMediaSuccess');
|
||||
success_callback(stream);
|
||||
},
|
||||
function (error) {
|
||||
console.warn('Failed to get access to local media. Error ', error);
|
||||
if (failure_callback) {
|
||||
failure_callback(error);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
this.getUserMedia(constraints,
|
||||
function (stream) {
|
||||
console.log('onUserMediaSuccess');
|
||||
success_callback(stream);
|
||||
},
|
||||
function (error) {
|
||||
console.warn('Failed to get access to local media. Error ',
|
||||
error, constraints);
|
||||
if (failure_callback) {
|
||||
failure_callback(error);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
this.getUserMedia(constraints,
|
||||
function (stream) {
|
||||
console.log('onUserMediaSuccess');
|
||||
self.setAvailableDevices(um, true);
|
||||
success_callback(stream);
|
||||
},
|
||||
function (error) {
|
||||
self.setAvailableDevices(um, false);
|
||||
console.warn('Failed to get access to local media. Error ',
|
||||
error, constraints);
|
||||
if (failure_callback) {
|
||||
failure_callback(error);
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('GUM failed: ', e);
|
||||
if(failure_callback) {
|
||||
@@ -270,73 +259,214 @@ RTCUtils.prototype.getUserMediaWithConstraints = function(
|
||||
}
|
||||
};
|
||||
|
||||
RTCUtils.prototype.setAvailableDevices = function (um, available) {
|
||||
var devices = {};
|
||||
if(um.indexOf("video") != -1)
|
||||
{
|
||||
devices.video = available;
|
||||
}
|
||||
if(um.indexOf("audio") != -1)
|
||||
{
|
||||
devices.audio = available;
|
||||
}
|
||||
this.service.setDeviceAvailability(devices);
|
||||
}
|
||||
|
||||
/**
|
||||
* We ask for audio and video combined stream in order to get permissions and
|
||||
* not to ask twice.
|
||||
*/
|
||||
RTCUtils.prototype.obtainAudioAndVideoPermissions = function() {
|
||||
RTCUtils.prototype.obtainAudioAndVideoPermissions =
|
||||
function(devices, callback, usageOptions)
|
||||
{
|
||||
var self = this;
|
||||
// Get AV
|
||||
var cb = function (stream) {
|
||||
console.log('got', stream, stream.getAudioTracks().length, stream.getVideoTracks().length);
|
||||
self.handleLocalStream(stream);
|
||||
trackUsage('localMedia', {
|
||||
audio: stream.getAudioTracks().length,
|
||||
video: stream.getVideoTracks().length
|
||||
});
|
||||
|
||||
var successCallback = function (stream) {
|
||||
if(callback)
|
||||
callback(stream, usageOptions);
|
||||
else
|
||||
self.successCallback(stream, usageOptions);
|
||||
};
|
||||
var self = this;
|
||||
this.getUserMediaWithConstraints(
|
||||
['audio', 'video'],
|
||||
cb,
|
||||
function (error) {
|
||||
console.error('failed to obtain audio/video stream - trying audio only', error);
|
||||
self.getUserMediaWithConstraints(
|
||||
['audio'],
|
||||
cb,
|
||||
function (error) {
|
||||
console.error('failed to obtain audio/video stream - stop', error);
|
||||
trackUsage('localMediaError', {
|
||||
media: error.media || 'video',
|
||||
name : error.name
|
||||
});
|
||||
messageHandler.showError("Error",
|
||||
"Failed to obtain permissions to use the local microphone" +
|
||||
"and/or camera.");
|
||||
}
|
||||
);
|
||||
|
||||
if(!devices)
|
||||
devices = ['audio', 'video'];
|
||||
|
||||
var newDevices = [];
|
||||
|
||||
|
||||
if(usageOptions)
|
||||
for(var i = 0; i < devices.length; i++)
|
||||
{
|
||||
var device = devices[i];
|
||||
if(usageOptions[device] === true)
|
||||
newDevices.push(device);
|
||||
}
|
||||
else
|
||||
newDevices = devices;
|
||||
|
||||
if(newDevices.length === 0)
|
||||
{
|
||||
successCallback();
|
||||
return;
|
||||
}
|
||||
|
||||
if (navigator.mozGetUserMedia) {
|
||||
|
||||
// With FF we can't split the stream into audio and video because FF
|
||||
// doesn't support media stream constructors. So, we need to get the
|
||||
// audio stream separately from the video stream using two distinct GUM
|
||||
// calls. Not very user friendly :-( but we don't have many other
|
||||
// options neither.
|
||||
//
|
||||
// Note that we pack those 2 streams in a single object and pass it to
|
||||
// the successCallback method.
|
||||
|
||||
self.getUserMediaWithConstraints(
|
||||
['audio'],
|
||||
function (audioStream) {
|
||||
self.getUserMediaWithConstraints(
|
||||
['video'],
|
||||
function (videoStream) {
|
||||
return self.successCallback({
|
||||
audioStream: audioStream,
|
||||
videoStream: videoStream
|
||||
});
|
||||
},
|
||||
function (error) {
|
||||
console.error('failed to obtain video stream - stop',
|
||||
error);
|
||||
return self.successCallback(null);
|
||||
},
|
||||
config.resolution || '360');
|
||||
},
|
||||
function (error) {
|
||||
console.error('failed to obtain audio stream - stop',
|
||||
error);
|
||||
return self.successCallback(null);
|
||||
}
|
||||
);
|
||||
} else {
|
||||
this.getUserMediaWithConstraints(
|
||||
newDevices,
|
||||
function (stream) {
|
||||
successCallback(stream);
|
||||
},
|
||||
config.resolution || '360');
|
||||
function (error) {
|
||||
self.errorCallback(error);
|
||||
},
|
||||
config.resolution || '360');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RTCUtils.prototype.handleLocalStream = function(stream)
|
||||
RTCUtils.prototype.successCallback = function (stream, usageOptions) {
|
||||
// If this is FF, the stream parameter is *not* a MediaStream object, it's
|
||||
// an object with two properties: audioStream, videoStream.
|
||||
if(stream && !navigator.mozGetUserMedia)
|
||||
console.log('got', stream, stream.getAudioTracks().length,
|
||||
stream.getVideoTracks().length);
|
||||
this.handleLocalStream(stream, usageOptions);
|
||||
};
|
||||
|
||||
RTCUtils.prototype.errorCallback = function (error) {
|
||||
var self = this;
|
||||
console.error('failed to obtain audio/video stream - trying audio only', error);
|
||||
var resolution = getPreviousResolution(currentResolution);
|
||||
if(typeof error == "object" && error.constraintName && error.name
|
||||
&& (error.name == "ConstraintNotSatisfiedError" ||
|
||||
error.name == "OverconstrainedError") &&
|
||||
(error.constraintName == "minWidth" || error.constraintName == "maxWidth" ||
|
||||
error.constraintName == "minHeight" || error.constraintName == "maxHeight")
|
||||
&& resolution != null)
|
||||
{
|
||||
self.getUserMediaWithConstraints(['audio', 'video'],
|
||||
function (stream) {
|
||||
return self.successCallback(stream);
|
||||
}, function (error) {
|
||||
return self.errorCallback(error);
|
||||
}, resolution);
|
||||
}
|
||||
else
|
||||
{
|
||||
self.getUserMediaWithConstraints(
|
||||
['audio'],
|
||||
function (stream) {
|
||||
return self.successCallback(stream);
|
||||
},
|
||||
function (error) {
|
||||
console.error('failed to obtain audio/video stream - stop',
|
||||
error);
|
||||
return self.successCallback(null);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RTCUtils.prototype.handleLocalStream = function(stream, usageOptions)
|
||||
{
|
||||
// If this is FF, the stream parameter is *not* a MediaStream object, it's
|
||||
// an object with two properties: audioStream, videoStream.
|
||||
var audioStream, videoStream;
|
||||
if(window.webkitMediaStream)
|
||||
{
|
||||
var audioStream = new webkitMediaStream();
|
||||
var videoStream = new webkitMediaStream();
|
||||
var audioTracks = stream.getAudioTracks();
|
||||
var videoTracks = stream.getVideoTracks();
|
||||
for (var i = 0; i < audioTracks.length; i++) {
|
||||
audioStream.addTrack(audioTracks[i]);
|
||||
audioStream = new webkitMediaStream();
|
||||
videoStream = new webkitMediaStream();
|
||||
if(stream) {
|
||||
var audioTracks = stream.getAudioTracks();
|
||||
|
||||
for (var i = 0; i < audioTracks.length; i++) {
|
||||
audioStream.addTrack(audioTracks[i]);
|
||||
}
|
||||
|
||||
var videoTracks = stream.getVideoTracks();
|
||||
|
||||
for (i = 0; i < videoTracks.length; i++) {
|
||||
videoStream.addTrack(videoTracks[i]);
|
||||
}
|
||||
}
|
||||
|
||||
this.service.createLocalStream(audioStream, "audio");
|
||||
|
||||
for (i = 0; i < videoTracks.length; i++) {
|
||||
videoStream.addTrack(videoTracks[i]);
|
||||
}
|
||||
|
||||
|
||||
this.service.createLocalStream(videoStream, "video");
|
||||
}
|
||||
else
|
||||
{//firefox
|
||||
this.service.createLocalStream(stream, "stream");
|
||||
audioStream = stream.audioStream;
|
||||
videoStream = stream.videoStream;
|
||||
}
|
||||
|
||||
var audioMuted = (usageOptions && usageOptions.audio === false),
|
||||
videoMuted = (usageOptions && usageOptions.video === false);
|
||||
|
||||
var audioGUM = (!usageOptions || usageOptions.audio !== false),
|
||||
videoGUM = (!usageOptions || usageOptions.video !== false);
|
||||
|
||||
|
||||
this.service.createLocalStream(audioStream, "audio", null, null,
|
||||
audioMuted, audioGUM);
|
||||
|
||||
this.service.createLocalStream(videoStream, "video", null, null,
|
||||
videoMuted, videoGUM);
|
||||
};
|
||||
|
||||
RTCUtils.prototype.createStream = function(stream, isVideo)
|
||||
{
|
||||
var newStream = null;
|
||||
if(window.webkitMediaStream)
|
||||
{
|
||||
newStream = new webkitMediaStream();
|
||||
if(newStream)
|
||||
{
|
||||
var tracks = (isVideo? stream.getVideoTracks() : stream.getAudioTracks());
|
||||
|
||||
for (i = 0; i < tracks.length; i++) {
|
||||
newStream.addTrack(tracks[i]);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = RTCUtils;
|
||||
}
|
||||
else
|
||||
newStream = stream;
|
||||
|
||||
return newStream;
|
||||
};
|
||||
|
||||
module.exports = RTCUtils;
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"name": "RTC",
|
||||
"version": "0.0.1",
|
||||
"main": "RTC.js",
|
||||
"description": "Provedes media streams and data channels utilities for Jitsi Meet",
|
||||
"dependencies": {
|
||||
}
|
||||
}
|
||||
811
modules/UI/UI.js
Normal file
@@ -0,0 +1,811 @@
|
||||
var UI = {};
|
||||
|
||||
var VideoLayout = require("./videolayout/VideoLayout.js");
|
||||
var AudioLevels = require("./audio_levels/AudioLevels.js");
|
||||
var Prezi = require("./prezi/Prezi.js");
|
||||
var Etherpad = require("./etherpad/Etherpad.js");
|
||||
var Chat = require("./side_pannels/chat/Chat.js");
|
||||
var Toolbar = require("./toolbars/Toolbar");
|
||||
var ToolbarToggler = require("./toolbars/ToolbarToggler");
|
||||
var BottomToolbar = require("./toolbars/BottomToolbar");
|
||||
var ContactList = require("./side_pannels/contactlist/ContactList");
|
||||
var Avatar = require("./avatar/Avatar");
|
||||
var EventEmitter = require("events");
|
||||
var SettingsMenu = require("./side_pannels/settings/SettingsMenu");
|
||||
var Settings = require("./../settings/Settings");
|
||||
var PanelToggler = require("./side_pannels/SidePanelToggler");
|
||||
var RoomNameGenerator = require("./welcome_page/RoomnameGenerator");
|
||||
UI.messageHandler = require("./util/MessageHandler");
|
||||
var messageHandler = UI.messageHandler;
|
||||
var Authentication = require("./authentication/Authentication");
|
||||
var UIUtil = require("./util/UIUtil");
|
||||
var NicknameHandler = require("./util/NicknameHandler");
|
||||
var CQEvents = require("../../service/connectionquality/CQEvents");
|
||||
var DesktopSharingEventTypes
|
||||
= require("../../service/desktopsharing/DesktopSharingEventTypes");
|
||||
var RTCEvents = require("../../service/RTC/RTCEvents");
|
||||
var StreamEventTypes = require("../../service/RTC/StreamEventTypes");
|
||||
var XMPPEvents = require("../../service/xmpp/XMPPEvents");
|
||||
var MemberEvents = require("../../service/members/Events");
|
||||
|
||||
var eventEmitter = new EventEmitter();
|
||||
var roomName = null;
|
||||
|
||||
|
||||
function notifyForInitialMute()
|
||||
{
|
||||
messageHandler.notify(null, "notify.mutedTitle", "connected",
|
||||
"notify.muted", null, {timeOut: 120000});
|
||||
}
|
||||
|
||||
function setupPrezi()
|
||||
{
|
||||
$("#reloadPresentationLink").click(function()
|
||||
{
|
||||
Prezi.reloadPresentation();
|
||||
});
|
||||
}
|
||||
|
||||
function setupChat()
|
||||
{
|
||||
Chat.init();
|
||||
$("#toggle_smileys").click(function() {
|
||||
Chat.toggleSmileys();
|
||||
});
|
||||
}
|
||||
|
||||
function setupToolbars() {
|
||||
Toolbar.init(UI);
|
||||
Toolbar.setupButtonsFromConfig();
|
||||
BottomToolbar.init();
|
||||
}
|
||||
|
||||
function streamHandler(stream, isMuted) {
|
||||
switch (stream.type)
|
||||
{
|
||||
case "audio":
|
||||
VideoLayout.changeLocalAudio(stream, isMuted);
|
||||
break;
|
||||
case "video":
|
||||
VideoLayout.changeLocalVideo(stream, isMuted);
|
||||
break;
|
||||
case "stream":
|
||||
VideoLayout.changeLocalStream(stream, isMuted);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function onXmppConnectionFailed(stropheErrorMsg) {
|
||||
|
||||
var title = APP.translation.generateTranslatonHTML(
|
||||
"dialog.error");
|
||||
|
||||
var message;
|
||||
if (stropheErrorMsg) {
|
||||
message = APP.translation.generateTranslatonHTML(
|
||||
"dialog.connectErrorWithMsg", {msg: stropheErrorMsg});
|
||||
} else {
|
||||
message = APP.translation.generateTranslatonHTML(
|
||||
"dialog.connectError");
|
||||
}
|
||||
|
||||
messageHandler.openDialog(
|
||||
title, message, true, {}, function (e, v, m, f) { return false; });
|
||||
}
|
||||
|
||||
function onDisposeConference(unload) {
|
||||
Toolbar.showAuthenticateButton(false);
|
||||
}
|
||||
|
||||
function onDisplayNameChanged(jid, displayName) {
|
||||
ContactList.onDisplayNameChange(jid, displayName);
|
||||
SettingsMenu.onDisplayNameChange(jid, displayName);
|
||||
VideoLayout.onDisplayNameChanged(jid, displayName);
|
||||
}
|
||||
|
||||
function registerListeners() {
|
||||
APP.RTC.addStreamListener(streamHandler, StreamEventTypes.EVENT_TYPE_LOCAL_CREATED);
|
||||
|
||||
APP.RTC.addStreamListener(streamHandler, StreamEventTypes.EVENT_TYPE_LOCAL_CHANGED);
|
||||
APP.RTC.addStreamListener(function (stream) {
|
||||
VideoLayout.onRemoteStreamAdded(stream);
|
||||
}, StreamEventTypes.EVENT_TYPE_REMOTE_CREATED);
|
||||
APP.RTC.addStreamListener(function (jid) {
|
||||
VideoLayout.onVideoTypeChanged(jid);
|
||||
}, StreamEventTypes.EVENT_TYPE_REMOTE_CHANGED);
|
||||
APP.RTC.addListener(RTCEvents.LASTN_CHANGED, onLastNChanged);
|
||||
APP.RTC.addListener(RTCEvents.DOMINANTSPEAKER_CHANGED, function (resourceJid) {
|
||||
VideoLayout.onDominantSpeakerChanged(resourceJid);
|
||||
});
|
||||
APP.RTC.addListener(RTCEvents.LASTN_ENDPOINT_CHANGED,
|
||||
function (lastNEndpoints, endpointsEnteringLastN, stream) {
|
||||
VideoLayout.onLastNEndpointsChanged(lastNEndpoints,
|
||||
endpointsEnteringLastN, stream);
|
||||
});
|
||||
APP.RTC.addListener(RTCEvents.AVAILABLE_DEVICES_CHANGED,
|
||||
function (devices) {
|
||||
VideoLayout.setDeviceAvailabilityIcons(null, devices);
|
||||
})
|
||||
APP.statistics.addAudioLevelListener(function(jid, audioLevel)
|
||||
{
|
||||
var resourceJid;
|
||||
if(jid === APP.statistics.LOCAL_JID)
|
||||
{
|
||||
resourceJid = AudioLevels.LOCAL_LEVEL;
|
||||
if(APP.RTC.localAudio.isMuted())
|
||||
{
|
||||
audioLevel = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
resourceJid = Strophe.getResourceFromJid(jid);
|
||||
}
|
||||
|
||||
AudioLevels.updateAudioLevel(resourceJid, audioLevel,
|
||||
UI.getLargeVideoState().userResourceJid);
|
||||
});
|
||||
APP.desktopsharing.addListener(function () {
|
||||
ToolbarToggler.showDesktopSharingButton();
|
||||
}, DesktopSharingEventTypes.INIT);
|
||||
APP.desktopsharing.addListener(
|
||||
Toolbar.changeDesktopSharingButtonState,
|
||||
DesktopSharingEventTypes.SWITCHING_DONE);
|
||||
APP.connectionquality.addListener(CQEvents.LOCALSTATS_UPDATED,
|
||||
VideoLayout.updateLocalConnectionStats);
|
||||
APP.connectionquality.addListener(CQEvents.REMOTESTATS_UPDATED,
|
||||
VideoLayout.updateConnectionStats);
|
||||
APP.connectionquality.addListener(CQEvents.STOP,
|
||||
VideoLayout.onStatsStop);
|
||||
APP.xmpp.addListener(XMPPEvents.CONNECTION_FAILED, onXmppConnectionFailed);
|
||||
APP.xmpp.addListener(XMPPEvents.DISPOSE_CONFERENCE, onDisposeConference);
|
||||
APP.xmpp.addListener(XMPPEvents.GRACEFUL_SHUTDOWN, function () {
|
||||
messageHandler.openMessageDialog(
|
||||
'dialog.serviceUnavailable',
|
||||
'dialog.gracefulShutdown'
|
||||
);
|
||||
});
|
||||
APP.xmpp.addListener(XMPPEvents.RESERVATION_ERROR, function (code, msg) {
|
||||
var title = APP.translation.generateTranslatonHTML(
|
||||
"dialog.reservationError");
|
||||
var message = APP.translation.generateTranslatonHTML(
|
||||
"dialog.reservationErrorMsg", {code: code, msg: msg});
|
||||
messageHandler.openDialog(
|
||||
title,
|
||||
message,
|
||||
true, {},
|
||||
function (event, value, message, formVals)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
);
|
||||
});
|
||||
APP.xmpp.addListener(XMPPEvents.KICKED, function () {
|
||||
messageHandler.openMessageDialog("dialog.sessTerminated",
|
||||
"dialog.kickMessage");
|
||||
});
|
||||
APP.xmpp.addListener(XMPPEvents.MUC_DESTROYED, function (reason) {
|
||||
//FIXME: use Session Terminated from translation, but
|
||||
// 'reason' text comes from XMPP packet and is not translated
|
||||
var title = APP.translation.generateTranslatonHTML("dialog.sessTerminated");
|
||||
messageHandler.openDialog(
|
||||
title, reason, true, {},
|
||||
function (event, value, message, formVals)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
);
|
||||
});
|
||||
APP.xmpp.addListener(XMPPEvents.BRIDGE_DOWN, function () {
|
||||
messageHandler.showError("dialog.error",
|
||||
"dialog.bridgeUnavailable");
|
||||
});
|
||||
APP.xmpp.addListener(XMPPEvents.USER_ID_CHANGED, function (from, id) {
|
||||
Avatar.setUserAvatar(from, id);
|
||||
});
|
||||
APP.xmpp.addListener(XMPPEvents.STREAMS_CHANGED, function (jid, changedStreams) {
|
||||
for(stream in changedStreams)
|
||||
{
|
||||
// might need to update the direction if participant just went from sendrecv to recvonly
|
||||
if (stream.type === 'video' || stream.type === 'screen') {
|
||||
var el = $('#participant_' + Strophe.getResourceFromJid(jid) + '>video');
|
||||
switch (stream.direction) {
|
||||
case 'sendrecv':
|
||||
el.show();
|
||||
break;
|
||||
case 'recvonly':
|
||||
el.hide();
|
||||
// FIXME: Check if we have to change large video
|
||||
//VideoLayout.updateLargeVideo(el);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
APP.xmpp.addListener(XMPPEvents.DISPLAY_NAME_CHANGED, onDisplayNameChanged);
|
||||
APP.xmpp.addListener(XMPPEvents.MUC_JOINED, onMucJoined);
|
||||
APP.xmpp.addListener(XMPPEvents.LOCAL_ROLE_CHANGED, onLocalRoleChanged);
|
||||
APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_JOINED, onMucMemberJoined);
|
||||
APP.xmpp.addListener(XMPPEvents.MUC_ROLE_CHANGED, onMucRoleChanged);
|
||||
APP.xmpp.addListener(XMPPEvents.PRESENCE_STATUS, onMucPresenceStatus);
|
||||
APP.xmpp.addListener(XMPPEvents.SUBJECT_CHANGED, chatSetSubject);
|
||||
APP.xmpp.addListener(XMPPEvents.MESSAGE_RECEIVED, updateChatConversation);
|
||||
APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_LEFT, onMucMemberLeft);
|
||||
APP.xmpp.addListener(XMPPEvents.PASSWORD_REQUIRED, onPasswordRequired);
|
||||
APP.xmpp.addListener(XMPPEvents.CHAT_ERROR_RECEIVED, chatAddError);
|
||||
APP.xmpp.addListener(XMPPEvents.ETHERPAD, initEtherpad);
|
||||
APP.xmpp.addListener(XMPPEvents.AUTHENTICATION_REQUIRED,
|
||||
onAuthenticationRequired);
|
||||
APP.xmpp.addListener(XMPPEvents.DEVICE_AVAILABLE,
|
||||
function (resource, devices) {
|
||||
VideoLayout.setDeviceAvailabilityIcons(resource, devices);
|
||||
});
|
||||
|
||||
APP.members.addListener(MemberEvents.DTMF_SUPPORT_CHANGED,
|
||||
onDtmfSupportChanged);
|
||||
APP.xmpp.addListener(XMPPEvents.START_MUTED, function (audio, video) {
|
||||
SettingsMenu.setStartMuted(audio, video);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Mutes/unmutes the local video.
|
||||
*
|
||||
* @param mute <tt>true</tt> to mute the local video; otherwise, <tt>false</tt>
|
||||
* @param options an object which specifies optional arguments such as the
|
||||
* <tt>boolean</tt> key <tt>byUser</tt> with default value <tt>true</tt> which
|
||||
* specifies whether the method was initiated in response to a user command (in
|
||||
* contrast to an automatic decision taken by the application logic)
|
||||
*/
|
||||
function setVideoMute(mute, options) {
|
||||
APP.RTC.setVideoMute(mute,
|
||||
UI.setVideoMuteButtonsState,
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
function bindEvents()
|
||||
{
|
||||
/**
|
||||
* Resizes and repositions videos in full screen mode.
|
||||
*/
|
||||
$(document).on('webkitfullscreenchange mozfullscreenchange fullscreenchange',
|
||||
function () {
|
||||
VideoLayout.resizeLargeVideoContainer();
|
||||
VideoLayout.positionLarge();
|
||||
}
|
||||
);
|
||||
|
||||
$(window).resize(function () {
|
||||
VideoLayout.resizeLargeVideoContainer();
|
||||
VideoLayout.positionLarge();
|
||||
});
|
||||
}
|
||||
|
||||
UI.start = function (init) {
|
||||
document.title = interfaceConfig.APP_NAME;
|
||||
if(config.enableWelcomePage && window.location.pathname == "/" &&
|
||||
(!window.localStorage.welcomePageDisabled || window.localStorage.welcomePageDisabled == "false"))
|
||||
{
|
||||
$("#videoconference_page").hide();
|
||||
var setupWelcomePage = require("./welcome_page/WelcomePage");
|
||||
setupWelcomePage();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (interfaceConfig.SHOW_JITSI_WATERMARK) {
|
||||
var leftWatermarkDiv
|
||||
= $("#largeVideoContainer div[class='watermark leftwatermark']");
|
||||
|
||||
leftWatermarkDiv.css({display: 'block'});
|
||||
leftWatermarkDiv.parent().get(0).href
|
||||
= interfaceConfig.JITSI_WATERMARK_LINK;
|
||||
}
|
||||
|
||||
if (interfaceConfig.SHOW_BRAND_WATERMARK) {
|
||||
var rightWatermarkDiv
|
||||
= $("#largeVideoContainer div[class='watermark rightwatermark']");
|
||||
|
||||
rightWatermarkDiv.css({display: 'block'});
|
||||
rightWatermarkDiv.parent().get(0).href
|
||||
= interfaceConfig.BRAND_WATERMARK_LINK;
|
||||
rightWatermarkDiv.get(0).style.backgroundImage
|
||||
= "url(images/rightwatermark.png)";
|
||||
}
|
||||
|
||||
if (interfaceConfig.SHOW_POWERED_BY) {
|
||||
$("#largeVideoContainer>a[class='poweredby']").css({display: 'block'});
|
||||
}
|
||||
|
||||
$("#welcome_page").hide();
|
||||
|
||||
VideoLayout.resizeLargeVideoContainer();
|
||||
$("#videospace").mousemove(function () {
|
||||
return ToolbarToggler.showToolbar();
|
||||
});
|
||||
// Set the defaults for prompt dialogs.
|
||||
jQuery.prompt.setDefaults({persistent: false});
|
||||
|
||||
VideoLayout.init(eventEmitter);
|
||||
AudioLevels.init();
|
||||
NicknameHandler.init(eventEmitter);
|
||||
registerListeners();
|
||||
bindEvents();
|
||||
setupPrezi();
|
||||
setupToolbars();
|
||||
setupChat();
|
||||
|
||||
|
||||
document.title = interfaceConfig.APP_NAME;
|
||||
|
||||
$("#downloadlog").click(function (event) {
|
||||
dump(event.target);
|
||||
});
|
||||
|
||||
if(config.enableWelcomePage && window.location.pathname == "/" &&
|
||||
(!window.localStorage.welcomePageDisabled || window.localStorage.welcomePageDisabled == "false"))
|
||||
{
|
||||
$("#videoconference_page").hide();
|
||||
var setupWelcomePage = require("./welcome_page/WelcomePage");
|
||||
setupWelcomePage();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$("#welcome_page").hide();
|
||||
|
||||
// Display notice message at the top of the toolbar
|
||||
if (config.noticeMessage) {
|
||||
$('#noticeText').text(config.noticeMessage);
|
||||
$('#notice').css({display: 'block'});
|
||||
}
|
||||
|
||||
document.getElementById('largeVideo').volume = 0;
|
||||
|
||||
if (!$('#settings').is(':visible')) {
|
||||
console.log('init');
|
||||
init();
|
||||
} else {
|
||||
loginInfo.onsubmit = function (e) {
|
||||
if (e.preventDefault) e.preventDefault();
|
||||
$('#settings').hide();
|
||||
init();
|
||||
};
|
||||
}
|
||||
|
||||
toastr.options = {
|
||||
"closeButton": true,
|
||||
"debug": false,
|
||||
"positionClass": "notification-bottom-right",
|
||||
"onclick": null,
|
||||
"showDuration": "300",
|
||||
"hideDuration": "1000",
|
||||
"timeOut": "2000",
|
||||
"extendedTimeOut": "1000",
|
||||
"showEasing": "swing",
|
||||
"hideEasing": "linear",
|
||||
"showMethod": "fadeIn",
|
||||
"hideMethod": "fadeOut",
|
||||
"reposition": function() {
|
||||
if(PanelToggler.isVisible()) {
|
||||
$("#toast-container").addClass("notification-bottom-right-center");
|
||||
} else {
|
||||
$("#toast-container").removeClass("notification-bottom-right-center");
|
||||
}
|
||||
},
|
||||
"newestOnTop": false
|
||||
};
|
||||
|
||||
SettingsMenu.init();
|
||||
|
||||
};
|
||||
|
||||
function chatAddError(errorMessage, originalText)
|
||||
{
|
||||
return Chat.chatAddError(errorMessage, originalText);
|
||||
};
|
||||
|
||||
function chatSetSubject(text)
|
||||
{
|
||||
return Chat.chatSetSubject(text);
|
||||
};
|
||||
|
||||
function updateChatConversation(from, displayName, message) {
|
||||
return Chat.updateChatConversation(from, displayName, message);
|
||||
};
|
||||
|
||||
function onMucJoined(jid, info) {
|
||||
Toolbar.updateRoomUrl(window.location.href);
|
||||
var meHTML = APP.translation.generateTranslatonHTML("me");
|
||||
$("#localNick").html(Strophe.getResourceFromJid(jid) + " (" + meHTML + ")");
|
||||
|
||||
var settings = Settings.getSettings();
|
||||
// Add myself to the contact list.
|
||||
ContactList.addContact(jid, settings.email || settings.uid);
|
||||
|
||||
// Once we've joined the muc show the toolbar
|
||||
ToolbarToggler.showToolbar();
|
||||
|
||||
var displayName = !config.displayJids
|
||||
? info.displayName : Strophe.getResourceFromJid(jid);
|
||||
|
||||
if (displayName)
|
||||
onDisplayNameChanged('localVideoContainer', displayName);
|
||||
|
||||
|
||||
VideoLayout.mucJoined();
|
||||
}
|
||||
|
||||
function initEtherpad(name) {
|
||||
Etherpad.init(name);
|
||||
}
|
||||
|
||||
function onMucMemberLeft(jid) {
|
||||
console.log('left.muc', jid);
|
||||
var displayName = $('#participant_' + Strophe.getResourceFromJid(jid) +
|
||||
'>.displayname').html();
|
||||
messageHandler.notify(displayName,'notify.somebody',
|
||||
'disconnected',
|
||||
'notify.disconnected');
|
||||
if(!config.startAudioMuted ||
|
||||
config.startAudioMuted > APP.members.size())
|
||||
UIUtil.playSoundNotification('userLeft');
|
||||
// Need to call this with a slight delay, otherwise the element couldn't be
|
||||
// found for some reason.
|
||||
// XXX(gp) it works fine without the timeout for me (with Chrome 38).
|
||||
window.setTimeout(function () {
|
||||
var container = document.getElementById(
|
||||
'participant_' + Strophe.getResourceFromJid(jid));
|
||||
if (container) {
|
||||
ContactList.removeContact(jid);
|
||||
VideoLayout.removeConnectionIndicator(jid);
|
||||
// hide here, wait for video to close before removing
|
||||
$(container).hide();
|
||||
VideoLayout.resizeThumbnails();
|
||||
}
|
||||
}, 10);
|
||||
|
||||
VideoLayout.participantLeft(jid);
|
||||
|
||||
};
|
||||
|
||||
|
||||
function onLocalRoleChanged(jid, info, pres, isModerator)
|
||||
{
|
||||
|
||||
console.info("My role changed, new role: " + info.role);
|
||||
onModeratorStatusChanged(isModerator);
|
||||
VideoLayout.showModeratorIndicator();
|
||||
SettingsMenu.onRoleChanged();
|
||||
|
||||
if (isModerator) {
|
||||
Authentication.closeAuthenticationWindow();
|
||||
messageHandler.notify(null, "notify.me",
|
||||
'connected', "notify.moderator");
|
||||
}
|
||||
}
|
||||
|
||||
function onModeratorStatusChanged(isModerator) {
|
||||
|
||||
Toolbar.showSipCallButton(isModerator);
|
||||
Toolbar.showRecordingButton(
|
||||
isModerator); //&&
|
||||
// FIXME:
|
||||
// Recording visible if
|
||||
// there are at least 2(+ 1 focus) participants
|
||||
//Object.keys(connection.emuc.members).length >= 3);
|
||||
}
|
||||
|
||||
function onPasswordRequired(callback) {
|
||||
// password is required
|
||||
Toolbar.lockLockButton();
|
||||
var message = '<h2 data-i18n="dialog.passwordRequired">';
|
||||
message += APP.translation.translateString(
|
||||
"dialog.passwordRequired");
|
||||
message += '</h2>' +
|
||||
'<input name="lockKey" type="text" data-i18n=' +
|
||||
'"[placeholder]dialog.password" placeholder="' +
|
||||
APP.translation.translateString("dialog.password") +
|
||||
'" autofocus>';
|
||||
|
||||
messageHandler.openTwoButtonDialog(null, null, null, message,
|
||||
true,
|
||||
"dialog.Ok",
|
||||
function (e, v, m, f) {},
|
||||
null,
|
||||
function (e, v, m, f) {
|
||||
if (v) {
|
||||
var lockKey = f.lockKey;
|
||||
if (lockKey) {
|
||||
Toolbar.setSharedKey(lockKey);
|
||||
callback(lockKey);
|
||||
}
|
||||
}
|
||||
},
|
||||
':input:first'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* The dialpad button is shown iff there is at least one member that supports
|
||||
* DTMF (e.g. jigasi).
|
||||
*/
|
||||
function onDtmfSupportChanged(dtmfSupport) {
|
||||
//TODO: enable when the UI is ready
|
||||
//Toolbar.showDialPadButton(dtmfSupport);
|
||||
}
|
||||
|
||||
function onMucMemberJoined(jid, id, displayName) {
|
||||
messageHandler.notify(displayName,'notify.somebody',
|
||||
'connected',
|
||||
'notify.connected');
|
||||
|
||||
if(!config.startAudioMuted ||
|
||||
config.startAudioMuted > APP.members.size())
|
||||
UIUtil.playSoundNotification('userJoined');
|
||||
// Add Peer's container
|
||||
VideoLayout.ensurePeerContainerExists(jid,id);
|
||||
}
|
||||
|
||||
function onMucPresenceStatus( jid, info) {
|
||||
VideoLayout.setPresenceStatus(
|
||||
'participant_' + Strophe.getResourceFromJid(jid), info.status);
|
||||
}
|
||||
|
||||
function onMucRoleChanged(role, displayName) {
|
||||
VideoLayout.showModeratorIndicator();
|
||||
|
||||
if (role === 'moderator') {
|
||||
var messageKey, messageOptions = {};
|
||||
if (!displayName) {
|
||||
messageKey = "notify.grantedToUnknown";
|
||||
}
|
||||
else
|
||||
{
|
||||
messageKey = "notify.grantedTo";
|
||||
messageOptions = {to: displayName};
|
||||
}
|
||||
messageHandler.notify(
|
||||
displayName,'notify.somebody',
|
||||
'connected', messageKey,
|
||||
messageOptions);
|
||||
}
|
||||
}
|
||||
|
||||
function onAuthenticationRequired(intervalCallback) {
|
||||
Authentication.openAuthenticationDialog(
|
||||
roomName, intervalCallback, function () {
|
||||
Toolbar.authenticateClicked();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
function onLastNChanged(oldValue, newValue) {
|
||||
if (config.muteLocalVideoIfNotInLastN) {
|
||||
setVideoMute(!newValue, { 'byUser': false });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
UI.toggleSmileys = function () {
|
||||
Chat.toggleSmileys();
|
||||
};
|
||||
|
||||
UI.getSettings = function () {
|
||||
return Settings.getSettings();
|
||||
};
|
||||
|
||||
UI.toggleFilmStrip = function () {
|
||||
return BottomToolbar.toggleFilmStrip();
|
||||
};
|
||||
|
||||
UI.toggleChat = function () {
|
||||
return BottomToolbar.toggleChat();
|
||||
};
|
||||
|
||||
UI.toggleContactList = function () {
|
||||
return BottomToolbar.toggleContactList();
|
||||
};
|
||||
|
||||
UI.inputDisplayNameHandler = function (value) {
|
||||
VideoLayout.inputDisplayNameHandler(value);
|
||||
};
|
||||
|
||||
|
||||
UI.getLargeVideoState = function()
|
||||
{
|
||||
return VideoLayout.getLargeVideoState();
|
||||
};
|
||||
|
||||
UI.generateRoomName = function() {
|
||||
if(roomName)
|
||||
return roomName;
|
||||
var roomnode = null;
|
||||
var path = window.location.pathname;
|
||||
|
||||
// determinde the room node from the url
|
||||
// TODO: just the roomnode or the whole bare jid?
|
||||
if (config.getroomnode && typeof config.getroomnode === 'function') {
|
||||
// custom function might be responsible for doing the pushstate
|
||||
roomnode = config.getroomnode(path);
|
||||
} else {
|
||||
/* fall back to default strategy
|
||||
* this is making assumptions about how the URL->room mapping happens.
|
||||
* It currently assumes deployment at root, with a rewrite like the
|
||||
* following one (for nginx):
|
||||
location ~ ^/([a-zA-Z0-9]+)$ {
|
||||
rewrite ^/(.*)$ / break;
|
||||
}
|
||||
*/
|
||||
if (path.length > 1) {
|
||||
roomnode = path.substr(1).toLowerCase();
|
||||
} else {
|
||||
var word = RoomNameGenerator.generateRoomWithoutSeparator();
|
||||
roomnode = word.toLowerCase();
|
||||
|
||||
window.history.pushState('VideoChat',
|
||||
'Room: ' + word, window.location.pathname + word);
|
||||
}
|
||||
}
|
||||
|
||||
roomName = roomnode + '@' + config.hosts.muc;
|
||||
return roomName;
|
||||
};
|
||||
|
||||
|
||||
UI.connectionIndicatorShowMore = function(id)
|
||||
{
|
||||
return VideoLayout.connectionIndicators[id].showMore();
|
||||
};
|
||||
|
||||
UI.showLoginPopup = function(callback)
|
||||
{
|
||||
console.log('password is required');
|
||||
var message = '<h2 data-i18n="dialog.passwordRequired">';
|
||||
message += APP.translation.translateString(
|
||||
"dialog.passwordRequired");
|
||||
message += '</h2>' +
|
||||
'<input name="username" type="text" ' +
|
||||
'placeholder="user@domain.net" autofocus>' +
|
||||
'<input name="password" ' +
|
||||
'type="password" data-i18n="[placeholder]dialog.userPassword"' +
|
||||
' placeholder="user password">';
|
||||
UI.messageHandler.openTwoButtonDialog(null, null, null, message,
|
||||
true,
|
||||
"dialog.Ok",
|
||||
function (e, v, m, f) {
|
||||
if (v) {
|
||||
if (f.username !== null && f.password != null) {
|
||||
callback(f.username, f.password);
|
||||
}
|
||||
}
|
||||
},
|
||||
null, null, ':input:first'
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
UI.checkForNicknameAndJoin = function () {
|
||||
|
||||
Authentication.closeAuthenticationDialog();
|
||||
Authentication.stopInterval();
|
||||
|
||||
var nick = null;
|
||||
if (config.useNicks) {
|
||||
nick = window.prompt('Your nickname (optional)');
|
||||
}
|
||||
APP.xmpp.joinRoom(roomName, config.useNicks, nick);
|
||||
};
|
||||
|
||||
|
||||
function dump(elem, filename) {
|
||||
elem = elem.parentNode;
|
||||
elem.download = filename || 'meetlog.json';
|
||||
elem.href = 'data:application/json;charset=utf-8,\n';
|
||||
var data = APP.xmpp.populateData();
|
||||
var metadata = {};
|
||||
metadata.time = new Date();
|
||||
metadata.url = window.location.href;
|
||||
metadata.ua = navigator.userAgent;
|
||||
var log = APP.xmpp.getLogger();
|
||||
if (log) {
|
||||
metadata.xmpp = log;
|
||||
}
|
||||
data.metadata = metadata;
|
||||
elem.href += encodeURIComponent(JSON.stringify(data, null, ' '));
|
||||
return false;
|
||||
}
|
||||
|
||||
UI.getRoomName = function () {
|
||||
return roomName;
|
||||
};
|
||||
|
||||
UI.setInitialMuteFromFocus = function (muteAudio, muteVideo) {
|
||||
if(muteAudio || muteVideo) notifyForInitialMute();
|
||||
if(muteAudio) UI.setAudioMuted(true);
|
||||
if(muteVideo) UI.setVideoMute(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mutes/unmutes the local video.
|
||||
*/
|
||||
UI.toggleVideo = function () {
|
||||
setVideoMute(!APP.RTC.localVideo.isMuted());
|
||||
};
|
||||
|
||||
/**
|
||||
* Mutes / unmutes audio for the local participant.
|
||||
*/
|
||||
UI.toggleAudio = function() {
|
||||
UI.setAudioMuted(!APP.RTC.localAudio.isMuted());
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets muted audio state for the local participant.
|
||||
*/
|
||||
UI.setAudioMuted = function (mute, earlyMute) {
|
||||
var audioMute = null;
|
||||
if(earlyMute)
|
||||
audioMute = function (mute, cb) {
|
||||
return APP.xmpp.sendAudioInfoPresence(mute, cb);
|
||||
};
|
||||
else
|
||||
audioMute = function (mute, cb) {
|
||||
return APP.xmpp.setAudioMute(mute, cb);
|
||||
}
|
||||
if(!audioMute(mute, function () {
|
||||
VideoLayout.showLocalAudioIndicator(mute);
|
||||
|
||||
UIUtil.buttonClick("#mute", "icon-microphone icon-mic-disabled");
|
||||
}))
|
||||
{
|
||||
// We still click the button.
|
||||
UIUtil.buttonClick("#mute", "icon-microphone icon-mic-disabled");
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
UI.addListener = function (type, listener) {
|
||||
eventEmitter.on(type, listener);
|
||||
}
|
||||
|
||||
UI.clickOnVideo = function (videoNumber) {
|
||||
var remoteVideos = $(".videocontainer:not(#mixedstream)");
|
||||
if (remoteVideos.length > videoNumber) {
|
||||
remoteVideos[videoNumber].click();
|
||||
}
|
||||
}
|
||||
|
||||
//Used by torture
|
||||
UI.showToolbar = function () {
|
||||
return ToolbarToggler.showToolbar();
|
||||
}
|
||||
|
||||
//Used by torture
|
||||
UI.dockToolbar = function (isDock) {
|
||||
return ToolbarToggler.dockToolbar(isDock);
|
||||
}
|
||||
|
||||
UI.setVideoMuteButtonsState = function (mute) {
|
||||
var video = $('#video');
|
||||
var communicativeClass = "icon-camera";
|
||||
var muteClass = "icon-camera icon-camera-disabled";
|
||||
|
||||
if (mute) {
|
||||
video.removeClass(communicativeClass);
|
||||
video.addClass(muteClass);
|
||||
} else {
|
||||
video.removeClass(muteClass);
|
||||
video.addClass(communicativeClass);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
UI.setVideoMute = setVideoMute;
|
||||
|
||||
module.exports = UI;
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
var CanvasUtil = require("./CanvasUtils");
|
||||
|
||||
var ASDrawContext = $('#activeSpeakerAudioLevel')[0].getContext('2d');
|
||||
|
||||
function initActiveSpeakerAudioLevels() {
|
||||
var ASRadius = interfaceConfig.ACTIVE_SPEAKER_AVATAR_SIZE / 2;
|
||||
var ASCenter = (interfaceConfig.ACTIVE_SPEAKER_AVATAR_SIZE + ASRadius) / 2;
|
||||
|
||||
// Draw a circle.
|
||||
ASDrawContext.arc(ASCenter, ASCenter, ASRadius, 0, 2 * Math.PI);
|
||||
|
||||
// Add a shadow around the circle
|
||||
ASDrawContext.shadowColor = interfaceConfig.SHADOW_COLOR;
|
||||
ASDrawContext.shadowOffsetX = 0;
|
||||
ASDrawContext.shadowOffsetY = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* The audio Levels plugin.
|
||||
*/
|
||||
@@ -6,11 +23,15 @@ var AudioLevels = (function(my) {
|
||||
|
||||
my.LOCAL_LEVEL = 'local';
|
||||
|
||||
my.init = function () {
|
||||
initActiveSpeakerAudioLevels();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the audio level canvas for the given peerJid. If the canvas
|
||||
* didn't exist we create it.
|
||||
*/
|
||||
my.updateAudioLevelCanvas = function (peerJid) {
|
||||
my.updateAudioLevelCanvas = function (peerJid, VideoLayout) {
|
||||
var resourceJid = null;
|
||||
var videoSpanId = null;
|
||||
if (!peerJid)
|
||||
@@ -66,7 +87,7 @@ var AudioLevels = (function(my) {
|
||||
* which we draw the audio level
|
||||
* @param audioLevel the newAudio level to render
|
||||
*/
|
||||
my.updateAudioLevel = function (resourceJid, audioLevel) {
|
||||
my.updateAudioLevel = function (resourceJid, audioLevel, largeVideoResourceJid) {
|
||||
drawAudioLevelCanvas(resourceJid, audioLevel);
|
||||
|
||||
var videoSpanId = getVideoSpanId(resourceJid);
|
||||
@@ -85,51 +106,33 @@ var AudioLevels = (function(my) {
|
||||
drawContext.drawImage(canvasCache, 0, 0);
|
||||
|
||||
if(resourceJid === AudioLevels.LOCAL_LEVEL) {
|
||||
if(!connection.emuc.myroomjid) {
|
||||
if(!APP.xmpp.myJid()) {
|
||||
return;
|
||||
}
|
||||
resourceJid = Strophe.getResourceFromJid(connection.emuc.myroomjid);
|
||||
resourceJid = APP.xmpp.myResource();
|
||||
}
|
||||
|
||||
if(resourceJid === VideoLayout.getLargeVideoState().userResourceJid) {
|
||||
AudioLevels.updateActiveSpeakerAudioLevel(audioLevel);
|
||||
if(resourceJid === largeVideoResourceJid) {
|
||||
window.requestAnimationFrame(function () {
|
||||
AudioLevels.updateActiveSpeakerAudioLevel(audioLevel);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
my.updateActiveSpeakerAudioLevel = function(audioLevel) {
|
||||
var drawContext = $('#activeSpeakerAudioLevel')[0].getContext('2d');
|
||||
var r = interfaceConfig.ACTIVE_SPEAKER_AVATAR_SIZE / 2;
|
||||
var center = (interfaceConfig.ACTIVE_SPEAKER_AVATAR_SIZE + r) / 2;
|
||||
if($("#activeSpeaker").css("visibility") == "hidden")
|
||||
return;
|
||||
|
||||
// Save the previous state of the context.
|
||||
drawContext.save();
|
||||
|
||||
drawContext.clearRect(0, 0, 300, 300);
|
||||
ASDrawContext.clearRect(0, 0, 300, 300);
|
||||
if(audioLevel == 0)
|
||||
return;
|
||||
|
||||
// Draw a circle.
|
||||
drawContext.arc(center, center, r, 0, 2 * Math.PI);
|
||||
ASDrawContext.shadowBlur = getShadowLevel(audioLevel);
|
||||
|
||||
// Add a shadow around the circle
|
||||
drawContext.shadowColor = interfaceConfig.SHADOW_COLOR;
|
||||
drawContext.shadowBlur = getShadowLevel(audioLevel);
|
||||
drawContext.shadowOffsetX = 0;
|
||||
drawContext.shadowOffsetY = 0;
|
||||
|
||||
// Fill the shape.
|
||||
drawContext.fill();
|
||||
|
||||
drawContext.save();
|
||||
|
||||
drawContext.restore();
|
||||
|
||||
|
||||
drawContext.arc(center, center, r, 0, 2 * Math.PI);
|
||||
|
||||
drawContext.clip();
|
||||
drawContext.clearRect(0, 0, 277, 200);
|
||||
|
||||
// Restore the previous context state.
|
||||
drawContext.restore();
|
||||
ASDrawContext.fill();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -219,8 +222,8 @@ var AudioLevels = (function(my) {
|
||||
function getVideoSpanId(resourceJid) {
|
||||
var videoSpanId = null;
|
||||
if (resourceJid === AudioLevels.LOCAL_LEVEL
|
||||
|| (connection.emuc.myroomjid && resourceJid
|
||||
=== Strophe.getResourceFromJid(connection.emuc.myroomjid)))
|
||||
|| (APP.xmpp.myResource() && resourceJid
|
||||
=== APP.xmpp.myResource()))
|
||||
videoSpanId = 'localVideoContainer';
|
||||
else
|
||||
videoSpanId = 'participant_' + resourceJid;
|
||||
@@ -258,3 +261,5 @@ var AudioLevels = (function(my) {
|
||||
return my;
|
||||
|
||||
})(AudioLevels || {});
|
||||
|
||||
module.exports = AudioLevels;
|
||||
@@ -107,3 +107,5 @@ var CanvasUtil = (function(my) {
|
||||
|
||||
return my;
|
||||
})(CanvasUtil || {});
|
||||
|
||||
module.exports = CanvasUtil;
|
||||
124
modules/UI/authentication/Authentication.js
Normal file
@@ -0,0 +1,124 @@
|
||||
/* global $, APP*/
|
||||
|
||||
var LoginDialog = require('./LoginDialog');
|
||||
var Moderator = require('../../xmpp/moderator');
|
||||
|
||||
/* Initial "authentication required" dialog */
|
||||
var authDialog = null;
|
||||
/* Loop retry ID that wits for other user to create the room */
|
||||
var authRetryId = null;
|
||||
var authenticationWindow = null;
|
||||
|
||||
var Authentication = {
|
||||
openAuthenticationDialog: function (roomName, intervalCallback, callback) {
|
||||
// This is the loop that will wait for the room to be created by
|
||||
// someone else. 'auth_required.moderator' will bring us back here.
|
||||
authRetryId = window.setTimeout(intervalCallback, 5000);
|
||||
// Show prompt only if it's not open
|
||||
if (authDialog !== null) {
|
||||
return;
|
||||
}
|
||||
// extract room name from 'room@muc.server.net'
|
||||
var room = roomName.substr(0, roomName.indexOf('@'));
|
||||
|
||||
var title
|
||||
= APP.translation.generateTranslatonHTML("dialog.WaitingForHost");
|
||||
var msg
|
||||
= APP.translation.generateTranslatonHTML(
|
||||
"dialog.WaitForHostMsg", {room: room});
|
||||
|
||||
var buttonTxt
|
||||
= APP.translation.generateTranslatonHTML("dialog.IamHost");
|
||||
var buttons = [];
|
||||
buttons.push({title: buttonTxt, value: "authNow"});
|
||||
|
||||
authDialog = APP.UI.messageHandler.openDialog(
|
||||
title,
|
||||
msg,
|
||||
true,
|
||||
buttons,
|
||||
function (onSubmitEvent, submitValue) {
|
||||
|
||||
// Do not close the dialog yet
|
||||
onSubmitEvent.preventDefault();
|
||||
|
||||
// Open login popup
|
||||
if (submitValue === 'authNow') {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
closeAuthenticationWindow: function () {
|
||||
if (authenticationWindow) {
|
||||
authenticationWindow.close();
|
||||
authenticationWindow = null;
|
||||
}
|
||||
},
|
||||
xmppAuthenticate: function () {
|
||||
|
||||
var loginDialog = LoginDialog.show(
|
||||
function (connection, state) {
|
||||
if (!state) {
|
||||
// User cancelled
|
||||
loginDialog.close();
|
||||
return;
|
||||
} else if (state == APP.xmpp.Status.CONNECTED) {
|
||||
|
||||
loginDialog.close();
|
||||
|
||||
Authentication.stopInterval();
|
||||
Authentication.closeAuthenticationDialog();
|
||||
|
||||
// Close the connection as anonymous one will be used
|
||||
// to create the conference. Session-id will authorize
|
||||
// the request.
|
||||
connection.disconnect();
|
||||
|
||||
var roomName = APP.UI.generateRoomName();
|
||||
Moderator.allocateConferenceFocus(roomName, function () {
|
||||
// If it's not "on the fly" authentication now join
|
||||
// the conference room
|
||||
if (!APP.xmpp.getMUCJoined()) {
|
||||
APP.UI.checkForNicknameAndJoin();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, true);
|
||||
},
|
||||
focusAuthenticationWindow: function () {
|
||||
// If auth window exists just bring it to the front
|
||||
if (authenticationWindow) {
|
||||
authenticationWindow.focus();
|
||||
return;
|
||||
}
|
||||
},
|
||||
closeAuthenticationDialog: function () {
|
||||
// Close authentication dialog if opened
|
||||
if (authDialog) {
|
||||
authDialog.close();
|
||||
authDialog = null;
|
||||
}
|
||||
},
|
||||
createAuthenticationWindow: function (callback, url) {
|
||||
authenticationWindow = APP.UI.messageHandler.openCenteredPopup(
|
||||
url, 910, 660,
|
||||
// On closed
|
||||
function () {
|
||||
// Close authentication dialog if opened
|
||||
Authentication.closeAuthenticationDialog();
|
||||
callback();
|
||||
authenticationWindow = null;
|
||||
});
|
||||
return authenticationWindow;
|
||||
},
|
||||
stopInterval: function () {
|
||||
// Clear retry interval, so that we don't call 'doJoinAfterFocus' twice
|
||||
if (authRetryId) {
|
||||
window.clearTimeout(authRetryId);
|
||||
authRetryId = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = Authentication;
|
||||
228
modules/UI/authentication/LoginDialog.js
Normal file
@@ -0,0 +1,228 @@
|
||||
/* global $, APP, config*/
|
||||
|
||||
var XMPP = require('../../xmpp/xmpp');
|
||||
var Moderator = require('../../xmpp/moderator');
|
||||
|
||||
//FIXME: use LoginDialog to add retries to XMPP.connect method used when
|
||||
// anonymous domain is not enabled
|
||||
|
||||
/**
|
||||
* Creates new <tt>Dialog</tt> instance.
|
||||
* @param callback <tt>function(Strophe.Connection, Strophe.Status)</tt> called
|
||||
* when we either fail to connect or succeed(check Strophe.Status).
|
||||
* @param obtainSession <tt>true</tt> if we want to send ConferenceIQ to Jicofo
|
||||
* in order to create session-id after the connection is established.
|
||||
* @constructor
|
||||
*/
|
||||
function Dialog(callback, obtainSession) {
|
||||
|
||||
var self = this;
|
||||
|
||||
var stop = false;
|
||||
|
||||
var connection = APP.xmpp.createConnection();
|
||||
|
||||
var message = '<h2 data-i18n="dialog.passwordRequired">';
|
||||
message += APP.translation.translateString("dialog.passwordRequired");
|
||||
message += '</h2>' +
|
||||
'<input name="username" type="text" ' +
|
||||
'placeholder="user@domain.net" autofocus>' +
|
||||
'<input name="password" ' +
|
||||
'type="password" data-i18n="[placeholder]dialog.userPassword"' +
|
||||
' placeholder="user password">';
|
||||
|
||||
var okButton = APP.translation.generateTranslatonHTML("dialog.Ok");
|
||||
|
||||
var cancelButton = APP.translation.generateTranslatonHTML("dialog.Cancel");
|
||||
|
||||
var states = {
|
||||
login: {
|
||||
html: message,
|
||||
buttons: [
|
||||
{ title: okButton, value: true},
|
||||
{ title: cancelButton, value: false}
|
||||
],
|
||||
focus: ':input:first',
|
||||
submit: function (e, v, m, f) {
|
||||
e.preventDefault();
|
||||
if (v) {
|
||||
var jid = f.username;
|
||||
var password = f.password;
|
||||
if (jid && password) {
|
||||
stop = false;
|
||||
connection.reset();
|
||||
connDialog.goToState('connecting');
|
||||
connection.connect(jid, password, stateHandler);
|
||||
}
|
||||
} else {
|
||||
// User cancelled
|
||||
stop = true;
|
||||
callback();
|
||||
}
|
||||
}
|
||||
},
|
||||
connecting: {
|
||||
title: APP.translation.translateString('dialog.connecting'),
|
||||
html: '<div id="connectionStatus"></div>',
|
||||
buttons: [],
|
||||
defaultButton: 0
|
||||
},
|
||||
finished: {
|
||||
title: APP.translation.translateString('dialog.error'),
|
||||
html: '<div id="errorMessage"></div>',
|
||||
buttons: [
|
||||
{
|
||||
title: APP.translation.translateString('dialog.retry'),
|
||||
value: 'retry'
|
||||
},
|
||||
{
|
||||
title: APP.translation.translateString('dialog.Cancel'),
|
||||
value: 'cancel'
|
||||
},
|
||||
],
|
||||
defaultButton: 0,
|
||||
submit: function (e, v, m, f) {
|
||||
e.preventDefault();
|
||||
if (v === 'retry')
|
||||
connDialog.goToState('login');
|
||||
else
|
||||
callback();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var connDialog
|
||||
= APP.UI.messageHandler.openDialogWithStates(states,
|
||||
{ persistent: true, closeText: '' }, null);
|
||||
|
||||
var stateHandler = function (status, message) {
|
||||
if (stop) {
|
||||
return;
|
||||
}
|
||||
|
||||
var translateKey = "connection." + XMPP.getStatusString(status);
|
||||
var statusStr = APP.translation.translateString(translateKey);
|
||||
|
||||
// Display current state
|
||||
var connectionStatus =
|
||||
connDialog.getState('connecting').find('#connectionStatus');
|
||||
|
||||
connectionStatus.text(statusStr);
|
||||
|
||||
switch (status) {
|
||||
case XMPP.Status.CONNECTED:
|
||||
|
||||
stop = true;
|
||||
if (!obtainSession) {
|
||||
callback(connection, status);
|
||||
return;
|
||||
}
|
||||
// Obtaining session-id status
|
||||
connectionStatus.text(
|
||||
APP.translation.translateString(
|
||||
'connection.FETCH_SESSION_ID'));
|
||||
|
||||
// Authenticate with Jicofo and obtain session-id
|
||||
var roomName = APP.UI.generateRoomName();
|
||||
|
||||
// Jicofo will return new session-id when connected
|
||||
// from authenticated domain
|
||||
connection.sendIQ(
|
||||
Moderator.createConferenceIq(roomName),
|
||||
function (result) {
|
||||
|
||||
connectionStatus.text(
|
||||
APP.translation.translateString(
|
||||
'connection.GOT_SESSION_ID'));
|
||||
|
||||
stop = true;
|
||||
|
||||
// Parse session-id
|
||||
Moderator.parseSessionId(result);
|
||||
|
||||
callback(connection, status);
|
||||
},
|
||||
function (error) {
|
||||
console.error("Auth on the fly failed", error);
|
||||
|
||||
stop = true;
|
||||
|
||||
var errorMsg =
|
||||
APP.translation.translateString(
|
||||
'connection.GET_SESSION_ID_ERROR') +
|
||||
$(error).find('>error').attr('code');
|
||||
|
||||
self.displayError(errorMsg);
|
||||
|
||||
connection.disconnect();
|
||||
});
|
||||
|
||||
break;
|
||||
case XMPP.Status.AUTHFAIL:
|
||||
case XMPP.Status.CONNFAIL:
|
||||
case XMPP.Status.DISCONNECTED:
|
||||
|
||||
stop = true;
|
||||
|
||||
callback(connection, status);
|
||||
|
||||
var errorMessage = statusStr;
|
||||
|
||||
if (message)
|
||||
{
|
||||
errorMessage += ': ' + message;
|
||||
}
|
||||
self.displayError(errorMessage);
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Displays error message in 'finished' state which allows either to cancel
|
||||
* or retry.
|
||||
* @param message the final message to be displayed.
|
||||
*/
|
||||
this.displayError = function (message) {
|
||||
|
||||
var finishedState = connDialog.getState('finished');
|
||||
|
||||
var errorMessageElem = finishedState.find('#errorMessage');
|
||||
errorMessageElem.text(message);
|
||||
|
||||
connDialog.goToState('finished');
|
||||
};
|
||||
|
||||
/**
|
||||
* Closes LoginDialog.
|
||||
*/
|
||||
this.close = function () {
|
||||
stop = true;
|
||||
connDialog.close();
|
||||
};
|
||||
}
|
||||
|
||||
var LoginDialog = {
|
||||
|
||||
/**
|
||||
* Displays login prompt used to establish new XMPP connection. Given
|
||||
* <tt>callback(Strophe.Connection, Strophe.Status)</tt> function will be
|
||||
* called when we connect successfully(status === CONNECTED) or when we fail
|
||||
* to do so. On connection failure program can call Dialog.close() method in
|
||||
* order to cancel or do nothing to let the user retry.
|
||||
* @param callback <tt>function(Strophe.Connection, Strophe.Status)</tt>
|
||||
* called when we either fail to connect or succeed(check
|
||||
* Strophe.Status).
|
||||
* @param obtainSession <tt>true</tt> if we want to send ConferenceIQ to
|
||||
* Jicofo in order to create session-id after the connection is
|
||||
* established.
|
||||
* @returns {Dialog}
|
||||
*/
|
||||
show: function (callback, obtainSession) {
|
||||
return new Dialog(callback, obtainSession);
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = LoginDialog;
|
||||
@@ -1,15 +1,57 @@
|
||||
var Avatar = (function(my) {
|
||||
var users = {};
|
||||
var activeSpeakerJid;
|
||||
var Settings = require("../../settings/Settings");
|
||||
var MediaStreamType = require("../../../service/RTC/MediaStreamTypes");
|
||||
|
||||
var users = {};
|
||||
var activeSpeakerJid;
|
||||
|
||||
function setVisibility(selector, show) {
|
||||
if (selector && selector.length > 0) {
|
||||
selector.css("visibility", show ? "visible" : "hidden");
|
||||
}
|
||||
}
|
||||
|
||||
function isUserMuted(jid) {
|
||||
// XXX(gp) we may want to rename this method to something like
|
||||
// isUserStreaming, for example.
|
||||
if (jid && jid != APP.xmpp.myJid()) {
|
||||
var resource = Strophe.getResourceFromJid(jid);
|
||||
if (!require("../videolayout/VideoLayout").isInLastN(resource)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if(jid && jid == APP.xmpp.myJid())
|
||||
{
|
||||
var localVideo = APP.RTC.localVideo;
|
||||
return (!localVideo || localVideo.isMuted());
|
||||
}
|
||||
|
||||
if (!APP.RTC.remoteStreams[jid] || !APP.RTC.remoteStreams[jid][MediaStreamType.VIDEO_TYPE]) {
|
||||
return null;
|
||||
}
|
||||
return APP.RTC.remoteStreams[jid][MediaStreamType.VIDEO_TYPE].muted;
|
||||
}
|
||||
|
||||
function getGravatarUrl(id, size) {
|
||||
if(id === APP.xmpp.myJid() || !id) {
|
||||
id = Settings.getSettings().uid;
|
||||
}
|
||||
return 'https://www.gravatar.com/avatar/' +
|
||||
MD5.hexdigest(id.trim().toLowerCase()) +
|
||||
"?d=wavatar&size=" + (size || "30");
|
||||
}
|
||||
|
||||
var Avatar = {
|
||||
|
||||
/**
|
||||
* Sets the user's avatar in the settings menu(if local user), contact list
|
||||
* and thumbnail
|
||||
* @param jid jid of the user
|
||||
* @param id email or userID to be used as a hash
|
||||
*/
|
||||
my.setUserAvatar = function(jid, id) {
|
||||
if(id) {
|
||||
if(users[jid] === id) {
|
||||
setUserAvatar: function (jid, id) {
|
||||
if (id) {
|
||||
if (users[jid] === id) {
|
||||
return;
|
||||
}
|
||||
users[jid] = id;
|
||||
@@ -22,19 +64,19 @@ var Avatar = (function(my) {
|
||||
|
||||
// set the avatar in the settings menu if it is local user and get the
|
||||
// local video container
|
||||
if(jid === connection.emuc.myroomjid) {
|
||||
if (jid === APP.xmpp.myJid()) {
|
||||
$('#avatar').get(0).src = thumbUrl;
|
||||
thumbnail = $('#localVideoContainer');
|
||||
}
|
||||
|
||||
// set the avatar in the contact list
|
||||
var contact = $('#' + resourceJid + '>img');
|
||||
if(contact && contact.length > 0) {
|
||||
if (contact && contact.length > 0) {
|
||||
contact.get(0).src = contactListUrl;
|
||||
}
|
||||
|
||||
// set the avatar in the thumbnail
|
||||
if(avatar && avatar.length > 0) {
|
||||
if (avatar && avatar.length > 0) {
|
||||
avatar[0].src = thumbUrl;
|
||||
} else {
|
||||
if (thumbnail && thumbnail.length > 0) {
|
||||
@@ -48,10 +90,10 @@ var Avatar = (function(my) {
|
||||
|
||||
//if the user is the current active speaker - update the active speaker
|
||||
// avatar
|
||||
if(jid === activeSpeakerJid) {
|
||||
Avatar.updateActiveSpeakerAvatarSrc(jid);
|
||||
if (jid === activeSpeakerJid) {
|
||||
this.updateActiveSpeakerAvatarSrc(jid);
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Hides or shows the user's avatar
|
||||
@@ -59,23 +101,23 @@ var Avatar = (function(my) {
|
||||
* @param show whether we should show the avatar or not
|
||||
* video because there is no dominant speaker and no focused speaker
|
||||
*/
|
||||
my.showUserAvatar = function(jid, show) {
|
||||
if(users[jid]) {
|
||||
showUserAvatar: function (jid, show) {
|
||||
if (users[jid]) {
|
||||
var resourceJid = Strophe.getResourceFromJid(jid);
|
||||
var video = $('#participant_' + resourceJid + '>video');
|
||||
var avatar = $('#avatar_' + resourceJid);
|
||||
|
||||
if(jid === connection.emuc.myroomjid) {
|
||||
if (jid === APP.xmpp.myJid()) {
|
||||
video = $('#localVideoWrapper>video');
|
||||
}
|
||||
if(show === undefined || show === null) {
|
||||
if (show === undefined || show === null) {
|
||||
show = isUserMuted(jid);
|
||||
}
|
||||
|
||||
//if the user is the currently focused, the dominant speaker or if
|
||||
//there is no focused and no dominant speaker and the large video is
|
||||
//currently shown
|
||||
if (activeSpeakerJid === jid && VideoLayout.isLargeVideoOnTop()) {
|
||||
if (activeSpeakerJid === jid && require("../videolayout/VideoLayout").isLargeVideoOnTop()) {
|
||||
setVisibility($("#largeVideo"), !show);
|
||||
setVisibility($('#activeSpeaker'), show);
|
||||
setVisibility(avatar, false);
|
||||
@@ -83,66 +125,38 @@ var Avatar = (function(my) {
|
||||
} else {
|
||||
if (video && video.length > 0) {
|
||||
setVisibility(video, !show);
|
||||
setVisibility(avatar, show);
|
||||
}
|
||||
setVisibility(avatar, show);
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the src of the active speaker avatar
|
||||
* @param jid of the current active speaker
|
||||
*/
|
||||
my.updateActiveSpeakerAvatarSrc = function(jid) {
|
||||
if(!jid) {
|
||||
jid = connection.emuc.findJidFromResource(
|
||||
VideoLayout.getLargeVideoState().userResourceJid);
|
||||
updateActiveSpeakerAvatarSrc: function (jid) {
|
||||
if (!jid) {
|
||||
jid = APP.xmpp.findJidFromResource(
|
||||
require("../videolayout/VideoLayout").getLargeVideoState().userResourceJid);
|
||||
}
|
||||
var avatar = $("#activeSpeakerAvatar")[0];
|
||||
var url = getGravatarUrl(users[jid],
|
||||
interfaceConfig.ACTIVE_SPEAKER_AVATAR_SIZE);
|
||||
if(jid === activeSpeakerJid && avatar.src === url) {
|
||||
if (jid === activeSpeakerJid && avatar.src === url) {
|
||||
return;
|
||||
}
|
||||
activeSpeakerJid = jid;
|
||||
var isMuted = isUserMuted(jid);
|
||||
if(jid && isMuted !== null) {
|
||||
if (jid && isMuted !== null) {
|
||||
avatar.src = url;
|
||||
setVisibility($("#largeVideo"), !isMuted);
|
||||
Avatar.showUserAvatar(jid, isMuted);
|
||||
}
|
||||
};
|
||||
|
||||
function setVisibility(selector, show) {
|
||||
if (selector && selector.length > 0) {
|
||||
selector.css("visibility", show ? "visible" : "hidden");
|
||||
}
|
||||
}
|
||||
|
||||
function isUserMuted(jid) {
|
||||
// XXX(gp) we may want to rename this method to something like
|
||||
// isUserStreaming, for example.
|
||||
if (jid && jid != connection.emuc.myroomjid) {
|
||||
var resource = Strophe.getResourceFromJid(jid);
|
||||
if (!VideoLayout.isInLastN(resource)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (!RTC.remoteStreams[jid] || !RTC.remoteStreams[jid][MediaStreamType.VIDEO_TYPE]) {
|
||||
return null;
|
||||
}
|
||||
return RTC.remoteStreams[jid][MediaStream.VIDEO_TYPE].muted;
|
||||
}
|
||||
|
||||
function getGravatarUrl(id, size) {
|
||||
if(id === connection.emuc.myroomjid || !id) {
|
||||
id = SettingsMenu.getUID();
|
||||
}
|
||||
return 'https://www.gravatar.com/avatar/' +
|
||||
MD5.hexdigest(id.trim().toLowerCase()) +
|
||||
"?d=wavatar&size=" + (size || "30");
|
||||
}
|
||||
|
||||
return my;
|
||||
}(Avatar || {}));
|
||||
module.exports = Avatar;
|
||||
180
modules/UI/etherpad/Etherpad.js
Normal file
@@ -0,0 +1,180 @@
|
||||
/* global $, config,
|
||||
setLargeVideoVisible, Util */
|
||||
|
||||
var VideoLayout = require("../videolayout/VideoLayout");
|
||||
var Prezi = require("../prezi/Prezi");
|
||||
var UIUtil = require("../util/UIUtil");
|
||||
|
||||
var etherpadName = null;
|
||||
var etherpadIFrame = null;
|
||||
var domain = null;
|
||||
var options = "?showControls=true&showChat=false&showLineNumbers=true&useMonospaceFont=false";
|
||||
|
||||
|
||||
/**
|
||||
* Resizes the etherpad.
|
||||
*/
|
||||
function resize() {
|
||||
if ($('#etherpad>iframe').length) {
|
||||
var remoteVideos = $('#remoteVideos');
|
||||
var availableHeight
|
||||
= window.innerHeight - remoteVideos.outerHeight();
|
||||
var availableWidth = UIUtil.getAvailableVideoWidth();
|
||||
|
||||
$('#etherpad>iframe').width(availableWidth);
|
||||
$('#etherpad>iframe').height(availableHeight);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the Etherpad button and adds it to the toolbar.
|
||||
*/
|
||||
function enableEtherpadButton() {
|
||||
if (!$('#etherpadButton').is(":visible"))
|
||||
$('#etherpadButton').css({display: 'inline-block'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the IFrame for the etherpad.
|
||||
*/
|
||||
function createIFrame() {
|
||||
etherpadIFrame = document.createElement('iframe');
|
||||
etherpadIFrame.src = domain + etherpadName + options;
|
||||
etherpadIFrame.frameBorder = 0;
|
||||
etherpadIFrame.scrolling = "no";
|
||||
etherpadIFrame.width = $('#largeVideoContainer').width() || 640;
|
||||
etherpadIFrame.height = $('#largeVideoContainer').height() || 480;
|
||||
etherpadIFrame.setAttribute('style', 'visibility: hidden;');
|
||||
|
||||
document.getElementById('etherpad').appendChild(etherpadIFrame);
|
||||
|
||||
etherpadIFrame.onload = function() {
|
||||
|
||||
document.domain = document.domain;
|
||||
bubbleIframeMouseMove(etherpadIFrame);
|
||||
setTimeout(function() {
|
||||
// the iframes inside of the etherpad are
|
||||
// not yet loaded when the etherpad iframe is loaded
|
||||
var outer = etherpadIFrame.
|
||||
contentDocument.getElementsByName("ace_outer")[0];
|
||||
bubbleIframeMouseMove(outer);
|
||||
var inner = outer.
|
||||
contentDocument.getElementsByName("ace_inner")[0];
|
||||
bubbleIframeMouseMove(inner);
|
||||
}, 2000);
|
||||
};
|
||||
}
|
||||
|
||||
function bubbleIframeMouseMove(iframe){
|
||||
var existingOnMouseMove = iframe.contentWindow.onmousemove;
|
||||
iframe.contentWindow.onmousemove = function(e){
|
||||
if(existingOnMouseMove) existingOnMouseMove(e);
|
||||
var evt = document.createEvent("MouseEvents");
|
||||
var boundingClientRect = iframe.getBoundingClientRect();
|
||||
evt.initMouseEvent(
|
||||
"mousemove",
|
||||
true, // bubbles
|
||||
false, // not cancelable
|
||||
window,
|
||||
e.detail,
|
||||
e.screenX,
|
||||
e.screenY,
|
||||
e.clientX + boundingClientRect.left,
|
||||
e.clientY + boundingClientRect.top,
|
||||
e.ctrlKey,
|
||||
e.altKey,
|
||||
e.shiftKey,
|
||||
e.metaKey,
|
||||
e.button,
|
||||
null // no related element
|
||||
);
|
||||
iframe.dispatchEvent(evt);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* On video selected event.
|
||||
*/
|
||||
$(document).bind('video.selected', function (event, isPresentation) {
|
||||
if (config.etherpad_base && etherpadIFrame && etherpadIFrame.style.visibility !== 'hidden')
|
||||
Etherpad.toggleEtherpad(isPresentation);
|
||||
});
|
||||
|
||||
|
||||
var Etherpad = {
|
||||
/**
|
||||
* Initializes the etherpad.
|
||||
*/
|
||||
init: function (name) {
|
||||
|
||||
if (config.etherpad_base && !etherpadName && name) {
|
||||
|
||||
domain = config.etherpad_base;
|
||||
|
||||
etherpadName = name;
|
||||
|
||||
enableEtherpadButton();
|
||||
|
||||
/**
|
||||
* Resizes the etherpad, when the window is resized.
|
||||
*/
|
||||
$(window).resize(function () {
|
||||
resize();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Opens/hides the Etherpad.
|
||||
*/
|
||||
toggleEtherpad: function (isPresentation) {
|
||||
if (!etherpadIFrame)
|
||||
createIFrame();
|
||||
|
||||
var largeVideo = null;
|
||||
if (Prezi.isPresentationVisible())
|
||||
largeVideo = $('#presentation>iframe');
|
||||
else
|
||||
largeVideo = $('#largeVideo');
|
||||
|
||||
if ($('#etherpad>iframe').css('visibility') === 'hidden') {
|
||||
$('#activeSpeaker').css('visibility', 'hidden');
|
||||
largeVideo.fadeOut(300, function () {
|
||||
if (Prezi.isPresentationVisible()) {
|
||||
largeVideo.css({opacity: '0'});
|
||||
} else {
|
||||
VideoLayout.setLargeVideoVisible(false);
|
||||
}
|
||||
});
|
||||
|
||||
$('#etherpad>iframe').fadeIn(300, function () {
|
||||
document.body.style.background = '#eeeeee';
|
||||
$('#etherpad>iframe').css({visibility: 'visible'});
|
||||
$('#etherpad').css({zIndex: 2});
|
||||
});
|
||||
}
|
||||
else if ($('#etherpad>iframe')) {
|
||||
$('#etherpad>iframe').fadeOut(300, function () {
|
||||
$('#etherpad>iframe').css({visibility: 'hidden'});
|
||||
$('#etherpad').css({zIndex: 0});
|
||||
document.body.style.background = 'black';
|
||||
});
|
||||
|
||||
if (!isPresentation) {
|
||||
$('#largeVideo').fadeIn(300, function () {
|
||||
VideoLayout.setLargeVideoVisible(true);
|
||||
});
|
||||
}
|
||||
}
|
||||
resize();
|
||||
},
|
||||
|
||||
isVisible: function() {
|
||||
var etherpadIframe = $('#etherpad>iframe');
|
||||
return etherpadIframe && etherpadIframe.is(':visible');
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
module.exports = Etherpad;
|
||||