Comparar commits

...

43 Commits

Autor SHA1 Mensagem Data
sualko 01691684b1 build v0.7.0 2014-03-07 12:05:35 +01:00
sualko 2f4d3aea65 Add comments and translations 2014-03-07 11:43:42 +01:00
sualko f1d622897f Add translations 2014-03-07 11:42:48 +01:00
sualko a845a1b9a0 Fix fullscreen for firefox 2014-03-07 11:42:26 +01:00
sualko f6c03beb27 build 0.6.1-alpha3 2014-03-06 17:33:42 +01:00
sualko ee59715b18 implement XEP-0184 2014-03-06 17:27:57 +01:00
sualko fc1970d3bc fix storage check 2014-03-06 13:14:56 +01:00
sualko a3d831af9c reduce initial timeout 2014-03-06 12:34:13 +01:00
sualko ae0c381dec - Fix own avatar
- Add new event loaded.roster.jsxc
2014-03-06 12:27:38 +01:00
sualko 0a117a20fb Fix own avatar on slave 2014-03-06 12:00:17 +01:00
sualko 27a9c25584 Rename chief/sidekick to master/slave 2014-03-06 11:56:48 +01:00
sualko fd3fdcd8f2 minor otr changes 2014-03-06 11:06:28 +01:00
sualko 8387176029 Adjust webrtc error handling 2014-03-05 14:25:23 +01:00
sualko 9bccf83565 Add more debugging for webrtc 2014-03-05 14:24:27 +01:00
sualko d3812e3a15 Add own default avatar 2014-03-05 14:05:41 +01:00
sualko 8cc2a0e6a4 enhance otr error handling 2014-03-05 13:40:27 +01:00
sualko d2dea6d67c build 0.6.1-alpha2 2014-03-04 14:16:42 +01:00
sualko e627a7e51b Add option for default avatar 2014-03-04 14:12:46 +01:00
sualko 07f2389b4e - Add sound for notices
- Add comments
- Fix debug function
2014-03-04 12:59:40 +01:00
sualko fdd0768f38 build 0.6.1-alpha 2014-03-03 17:29:38 +01:00
sualko e1e366ac55 - add mute/unmute option
- mute if status is dnd
2014-03-03 17:27:54 +01:00
sualko 671f874797 Add sound notifications for incoming messages and calls (implements https://github.com/sualko/ojsxc/pull/13) 2014-03-03 15:34:48 +01:00
sualko 3d2753aea1 Add 2 new events (accept/reject) 2014-03-03 15:32:57 +01:00
sualko 59ab53a553 - fix friendship response dialog
- fix shared roster item removel
- update & extend hover info
- handle presence of type unsubscribed
- remove footer if offline
2014-03-03 14:14:19 +01:00
Klaus 1ddcef660c fix #13 2014-03-01 18:43:51 +01:00
sualko 5056c45c5c bump version 2014-02-28 15:17:29 +01:00
sualko 3c5521d386 fix webrtc bug 2014-02-28 15:15:45 +01:00
sualko 1f54406abd fix otr error handling 2014-02-28 14:48:10 +01:00
sualko a580cf49f0 Display own avatar 2014-02-28 13:42:15 +01:00
sualko 33098bc4d5 Correct list toggle 2014-02-28 12:56:20 +01:00
sualko ab2d866ff9 Fix typo 2014-02-28 12:46:12 +01:00
sualko 3b7c7ffbed - Fix chrome notification
- Add multi tab support for notices
2014-02-28 12:43:59 +01:00
sualko 5b0f842c72 Fix master/slave negotiation 2014-02-28 12:07:56 +01:00
sualko d5bb8225cc Merge branch 'master' of https://github.com/sualko/jsxc 2014-02-28 11:04:32 +01:00
sualko 6db4ce1242 Add option to change presence state 2014-02-28 11:04:28 +01:00
Klaus 0e197e22b3 fix https://github.com/sualko/ojsxc/issues/4
Prosody didn't include the "to" attribute.
2014-01-31 21:36:10 +01:00
sualko 13b018b053 Add support for all available presence states 2014-01-29 17:48:04 +01:00
sualko 181d586730 - change roster bottom
- add notices
- don't interrupt active dialog (e.g. video session)
2014-01-29 15:17:26 +01:00
sualko 9a9cbfff5a update strophe.jingle 2014-01-28 15:08:04 +01:00
sualko 32514ea25d rebuild version 2014-01-28 14:56:13 +01:00
sualko 1e074075e3 bump version 2014-01-28 14:47:40 +01:00
sualko f89a856b7e - add debug log window
- fix debug function (fix https://github.com/sualko/ojsxc/issues/4)
2014-01-28 14:38:10 +01:00
sualko 411baae280 - Add debug log window
- Add more log functions with different levels
2014-01-28 10:57:56 +01:00
18 arquivos alterados com 6383 adições e 3014 exclusões
+38
Ver Arquivo
@@ -1,3 +1,41 @@
v0.7.0 / 2014-03-07
===
- add sound notifications
- add support for custom default avatars
- add support for XEP-0184 (Message Delivery Receipts)
- update & extend hover info
- handle presence of type unsubscribed
- remove roster footer if offline
- enhance otr error handling
- enhance translations
- reduce initial timeout
- fix notices
- fix friendship response dialog
- fix shared roster item removel
- fix debug function
- fix webrtc bug
- fix storage check
- fix firefox fullscreen
v0.6.0 / 2014-02-28
===
- add notice stack (for e.g. friendship requests)
- add option to change presence
- support all available presence states
- display own avatar
- fix issue with prosody
- fix multi-tab support
- fix chrome notifications
- fix otr error handling
- fix webrtc bug
v0.5.2 / 2014-01-28
===
- update strophe.js to v1.1.3
- fix debug function (fix initial presence)
- add debug log window
- add warn|error debug functions
v0.5.1 / 2014-01-27
===
- fix chat window after call
+1 -1
Ver Arquivo
@@ -1,6 +1,6 @@
{
"name": "jsxc",
"version": "0.5.1",
"version": "0.7.0",
"description": "Real-time chat app",
"homepage": "http://jsxc.org/",
"license": "MIT",
+917 -246
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+60 -16
Ver Arquivo
@@ -1,5 +1,5 @@
/**
* jsxc v0.5.1 - 2014-01-27
* jsxc v0.7.0 - 2014-03-07
*
* Copyright (c) 2014 Klaus Herberth <klaus@jsxc.org> <br>
* Released under the MIT license
@@ -7,7 +7,7 @@
* Please see http://jsxc.org/
*
* @author Klaus Herberth <klaus@jsxc.org>
* @version 0.5.1
* @version 0.7.0
*/
/* jsxc, Strophe, SDPUtil, getUserMediaWithConstraints, setupRTC, jQuery */
@@ -36,7 +36,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
</div>\
<!-- <button type="button" class="jsxc_mute_local">%%mute_my_audio%%</button>\
<button type="button" class="jsxc_pause_local">%%pause_my_video%%</button> --> \
<button type="button" class="jsxc_chat">%%chat%%</button>\
<button type="button" class="jsxc_showchat">%%chat%%</button>\
<button type="button" class="jsxc_fullscreen">%%fullscreen%%</button>\
<button type="button" class="jsxc_info">%%Info%%</button>\
</div>\
@@ -89,7 +89,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
*/
init: function() {
var self = jsxc.webrtc;
// shortcut
self.conn = jsxc.xmpp.conn;
@@ -122,6 +122,10 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
$(document).on('iceconnectionstatechange.jingle', $.proxy(self.onIceConnectionStateChanged, self));
$(document).on('nostuncandidates.jingle', $.proxy(self.noStunCandidates, self));
$(document).on('error.jingle', function(ev, sid, error) {
jsxc.error('[JINGLE]', error);
});
if (self.conn.caps) {
$(document).on('caps.strophe', $.proxy(self.onCaps, self));
}
@@ -257,6 +261,8 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
var status = $('.jsxc_webrtc .jsxc_status');
var duration = (typeof d === 'undefined' || d === null) ? 4000 : d;
jsxc.debug('[Webrtc]', txt);
if (status.html()) {
// attach old messages
txt = status.html() + '<br />' + txt;
@@ -399,11 +405,14 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
var dialog = jsxc.gui.dialog.open(jsxc.gui.template.get('incomingCall', jsxc.jidToCid(jid)));
dialog.find('.jsxc_accept').click(function() {
$(document).trigger('accept.call.jsxc');
self.reqUserMedia();
});
dialog.find('.jsxc_reject').click(function() {
jsxc.gui.dialog.close();
$(document).trigger('reject.call.jsxc');
sess.sendTerminate('decline');
sess.terminate();
@@ -420,7 +429,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
* @param reason Reason for termination
* @param [text] Optional explanation
*/
onCallTerminated: function(event, sid, reason, text) {
onCallTerminated: function(event, sid, reason, text) {
this.setStatus('call terminated ' + sid + (reason ? (': ' + reason + ' ' + text) : ''));
if (this.localStream) {
@@ -433,7 +442,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
this.conn.jingle.localStream = null;
this.localStream = null;
this.remoteStream = null;
$('#jsxc_windowList > ul').prepend($('#jsxc_dialog .jsxc_chatarea > ul > li').detach());
$(document).off('cleanup.dialog.jsxc');
@@ -462,7 +471,6 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
*/
onRemoteStreamAdded: function(event, data, sid) {
this.setStatus('Remote stream for session ' + sid + ' added.');
jsxc.debug('Stream data', data);
var stream = data.stream;
this.remoteStream = stream;
@@ -582,8 +590,6 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
return;
}
self.conn.jingle.terminate(null, 'init fail');
$(document).off('cleanup.dialog.jsxc');
setTimeout(function() {
jsxc.gui.showAlert("Sorry, we couldn't establish a connection. Maybe your buddy is offline.");
@@ -593,7 +599,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
self.conn.jingle.initiate(jid, self.conn.jid.toLowerCase());
},
'mediafailure.jingle': function() {
jsxc.gui.dialog.close();
}
});
@@ -714,11 +720,11 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
var toggleMulti = function(elem, open) {
$('#jsxc_dialog .jsxc_multi > div').not(elem).slideUp();
var opt = {
complete: jsxc.gui.dialog.resize
complete: jsxc.gui.dialog.resize
};
if (open) {
elem.slideDown(opt);
} else {
@@ -727,9 +733,9 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
};
var win = jsxc.gui.window.open(jsxc.jidToCid(jid));
$('#jsxc_dialog .jsxc_chatarea ul').append(win.detach());
$('#jsxc_dialog .jsxc_hangUp').click(function() {
jsxc.webrtc.hangUp();
});
@@ -743,7 +749,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
toggleMulti($('#jsxc_dialog .jsxc_snapshotbar'));
});
$('#jsxc_dialog .jsxc_chat').click(function() {
$('#jsxc_dialog .jsxc_showchat').click(function() {
toggleMulti($('#jsxc_dialog .jsxc_chatarea'));
});
@@ -792,4 +798,42 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
$(document).on('attached.jsxc', jsxc.webrtc.init);
}
});
$.extend(jsxc.l10n.en, {
Please_allow_access_to_microphone_and_camera: 'Please allow access to microphone and camera.',
Incoming_call: 'Incoming call',
from: 'from',
Do_you_want_to_accept_the_call_from: 'Do you want to accept the call from',
Reject: 'Reject',
Accept: 'Accept',
hang_up: 'hang up',
snapshot: 'snapshot',
mute_my_audio: 'mute my audio',
pause_my_video: 'pause my video',
fullscreen: 'fullscreen',
Info: 'Info',
Local_IP: 'Local IP',
Remote_IP: 'Remote IP',
Local_Fingerprint: 'Local fingerprint',
Remote_Fingerprint: 'Remote fingerprint',
});
$.extend(jsxc.l10n.de, {
Please_allow_access_to_microphone_and_camera: 'Bitte erlaube den Zugriff auf Kamera und Mikrofon.',
Incoming_call: 'Eingehender Anruf',
from: 'von',
Do_you_want_to_accept_the_call_from: 'Möchtest Du den Anruf annehmen von',
Reject: 'Ablehnen',
Accept: 'Annehmen',
hang_up: 'Auflegen',
snapshot: 'Schnappschuss',
mute_my_audio: 'Mein Ton aus',
pause_my_video: 'Mein Video pausieren',
fullscreen: 'Vollbild',
Info: 'Info',
Local_IP: 'Lokale IP',
Remote_IP: 'Remote IP',
Local_Fingerprint: 'Lokaler Fingerprint',
Remote_Fingerprint: 'Remote Fingerprint',
});
}(jQuery));
+9 -8
Ver Arquivo
@@ -14,15 +14,15 @@
var doc = document.documentElement;
return ('requestFullscreen' in doc) ||
('mozRequestFullscreen' in doc && document.mozFullscreenEnabled) ||
('mozRequestFullScreen' in doc && document.mozFullScreenEnabled) ||
('webkitRequestFullscreen' in doc);
}
function requestFullscreen(elem) {
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.mozRequestFullscreen) {
elem.mozRequestFullscreen();
} else if (elem.mozRequestFullScreen) {
elem.mozRequestFullScreen();
} else if (elem.webkitRequestFullscreen) {
elem.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
}
@@ -38,7 +38,7 @@
function cancelFullscreen() {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozCancelFullscreen) {
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
@@ -61,16 +61,17 @@
var self = this;
$(self).on('fullscreenerror mozfullscreenerror webkitfullscreenerror msfullscreenerror', function() {
// Chrome trigger event on self, Firefox on document
$(self).add(document).on('fullscreenerror mozfullscreenerror webkitfullscreenerror msfullscreenerror', function() {
$(document).trigger('error.fullscreen');
});
$(self).on('fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange', function() {
if (fullscreenStatus()){
$(self).add(document).on('fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange', function() {
if (fullscreenStatus()){
$(document).trigger('enabled.fullscreen');
}else{
$(document).trigger('disabled.fullscreen');
$(self).off('fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange');
$(self).add(document).off('fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange');
}
});
+10 -7
Ver Arquivo
@@ -2089,7 +2089,7 @@
})
}
OTR.prototype.io = function (msg) {
OTR.prototype.io = function (msg, uid) {
// buffer
this.outgoing = this.outgoing.concat(msg)
@@ -2099,7 +2099,7 @@
if (!first) {
if (!self.outgoing.length) return
var msg = self.outgoing.shift()
self.trigger('io', [msg])
self.trigger('io', [msg, uid])
}
setTimeout(send, first ? 0 : self.send_interval)
}(true))
@@ -2405,17 +2405,17 @@
this.trigger('status', [CONST.STATUS_SEND_QUERY])
}
OTR.prototype.sendMsg = function (msg) {
OTR.prototype.sendMsg = function (msg, uid) {
if ( this.REQUIRE_ENCRYPTION ||
this.msgstate !== CONST.MSGSTATE_PLAINTEXT
) {
msg = CryptoJS.enc.Utf8.parse(msg)
msg = msg.toString(CryptoJS.enc.Latin1)
}
this._sendMsg(msg)
this._sendMsg(msg, null, uid)
}
OTR.prototype._sendMsg = function (msg, internal) {
OTR.prototype._sendMsg = function (msg, internal, uid) {
if (!internal) { // a user or sm msg
switch (this.msgstate) {
@@ -2440,7 +2440,7 @@
}
}
if (msg) this.io(msg)
if (msg) this.io(msg, uid)
}
OTR.prototype.receiveMsg = function (msg) {
@@ -2463,7 +2463,10 @@
case 'data':
if ( msg.version === CONST.OTR_VERSION_3 &&
this.checkInstanceTags(msg.instance_tags)
) return // ignore
) {
this.error('Unknown instance tag.')
return // ignore
}
msg.msg = this.handleDataMsg(msg)
msg.encrypted = true
break
+7 -3
Ver Arquivo
@@ -119,9 +119,13 @@
return null;
},
hasFeatureByJid: function(jid, feature) {
if (this._jidVerIndex[jid]) {
var length = ($.isArray(feature)) ? feature.length : 1;
for (i = 0; i < length; i++) {
if (this._jidVerIndex[jid] && feature !== null && typeof feature !== 'undefined') {
if(!$.isArray(feature)){
feature = $.makeArray(feature);
};
var i;
for (i = 0; i < feature.length; i++) {
if (this._knownCapabilities[this._jidVerIndex[jid]]['features'].indexOf(feature[i]) < 0)
return false;
}
@@ -1,5 +1,8 @@
/* jshint -W117 */
function TraceablePeerConnection(ice_config, constraints) {
var setupRTC, getUserMediaWithConstraints, TraceablePeerConnection;
(function($){
TraceablePeerConnection = function(ice_config, constraints) {
var self = this;
var RTCPeerconnection = navigator.mozGetUserMedia ? mozRTCPeerConnection : webkitRTCPeerConnection;
this.peerconnection = new RTCPeerconnection(ice_config, constraints);
@@ -176,7 +179,7 @@ TraceablePeerConnection.prototype.getStats = function(callback) {
// mozilla chrome compat layer -- very similar to adapter.js
function setupRTC() {
setupRTC = function (){
var RTC = null;
if (navigator.mozGetUserMedia) {
console.log('This appears to be Firefox');
@@ -229,9 +232,9 @@ function setupRTC() {
try { console.log('Browser does not appear to be WebRTC-capable'); } catch (e) { }
}
return RTC;
}
};
function getUserMediaWithConstraints(um, resolution, bandwidth, fps) {
getUserMediaWithConstraints = function(um, resolution, bandwidth, fps) {
var constraints = {audio: false, video: false};
if (um.indexOf('video') >= 0) {
@@ -324,3 +327,4 @@ function getUserMediaWithConstraints(um, resolution, bandwidth, fps) {
$(document).trigger('mediafailure.jingle');
}
}
}(jQuery));
+2
Ver Arquivo
@@ -1,4 +1,5 @@
/* jshint -W117 */
(function($){
Strophe.addConnectionPlugin('jingle', {
connection: null,
sessions: {},
@@ -257,3 +258,4 @@ Strophe.addConnectionPlugin('jingle', {
// implement push?
}
});
}(jQuery));
+5 -1
Ver Arquivo
@@ -1,6 +1,9 @@
/* jshint -W117 */
var SDP;
(function($){
// SDP STUFF
function SDP(sdp) {
SDP = function(sdp) {
this.media = sdp.split('\r\nm=');
for (var i = 1; i < this.media.length; i++) {
this.media[i] = 'm=' + this.media[i];
@@ -807,3 +810,4 @@ SDPUtil = {
return line + '\r\n';
}
};
}(jQuery));
@@ -1,6 +1,9 @@
/* jshint -W117 */
// Jingle stuff
function JingleSession(me, sid, connection) {
var JingleSession;
(function($){
JingleSession = function(me, sid, connection) {
this.me = me;
this.sid = sid;
this.connection = connection;
@@ -853,3 +856,4 @@ JingleSession.prototype.getStats = function (interval) {
return this.statsinterval;
};
}(jQuery));
+2166 -1229
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+914 -243
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+58 -14
Ver Arquivo
@@ -24,7 +24,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
</div>\
<!-- <button type="button" class="jsxc_mute_local">%%mute_my_audio%%</button>\
<button type="button" class="jsxc_pause_local">%%pause_my_video%%</button> --> \
<button type="button" class="jsxc_chat">%%chat%%</button>\
<button type="button" class="jsxc_showchat">%%chat%%</button>\
<button type="button" class="jsxc_fullscreen">%%fullscreen%%</button>\
<button type="button" class="jsxc_info">%%Info%%</button>\
</div>\
@@ -77,7 +77,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
*/
init: function() {
var self = jsxc.webrtc;
// shortcut
self.conn = jsxc.xmpp.conn;
@@ -110,6 +110,10 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
$(document).on('iceconnectionstatechange.jingle', $.proxy(self.onIceConnectionStateChanged, self));
$(document).on('nostuncandidates.jingle', $.proxy(self.noStunCandidates, self));
$(document).on('error.jingle', function(ev, sid, error) {
jsxc.error('[JINGLE]', error);
});
if (self.conn.caps) {
$(document).on('caps.strophe', $.proxy(self.onCaps, self));
}
@@ -245,6 +249,8 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
var status = $('.jsxc_webrtc .jsxc_status');
var duration = (typeof d === 'undefined' || d === null) ? 4000 : d;
jsxc.debug('[Webrtc]', txt);
if (status.html()) {
// attach old messages
txt = status.html() + '<br />' + txt;
@@ -387,11 +393,14 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
var dialog = jsxc.gui.dialog.open(jsxc.gui.template.get('incomingCall', jsxc.jidToCid(jid)));
dialog.find('.jsxc_accept').click(function() {
$(document).trigger('accept.call.jsxc');
self.reqUserMedia();
});
dialog.find('.jsxc_reject').click(function() {
jsxc.gui.dialog.close();
$(document).trigger('reject.call.jsxc');
sess.sendTerminate('decline');
sess.terminate();
@@ -408,7 +417,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
* @param reason Reason for termination
* @param [text] Optional explanation
*/
onCallTerminated: function(event, sid, reason, text) {
onCallTerminated: function(event, sid, reason, text) {
this.setStatus('call terminated ' + sid + (reason ? (': ' + reason + ' ' + text) : ''));
if (this.localStream) {
@@ -421,7 +430,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
this.conn.jingle.localStream = null;
this.localStream = null;
this.remoteStream = null;
$('#jsxc_windowList > ul').prepend($('#jsxc_dialog .jsxc_chatarea > ul > li').detach());
$(document).off('cleanup.dialog.jsxc');
@@ -450,7 +459,6 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
*/
onRemoteStreamAdded: function(event, data, sid) {
this.setStatus('Remote stream for session ' + sid + ' added.');
jsxc.debug('Stream data', data);
var stream = data.stream;
this.remoteStream = stream;
@@ -570,8 +578,6 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
return;
}
self.conn.jingle.terminate(null, 'init fail');
$(document).off('cleanup.dialog.jsxc');
setTimeout(function() {
jsxc.gui.showAlert("Sorry, we couldn't establish a connection. Maybe your buddy is offline.");
@@ -581,7 +587,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
self.conn.jingle.initiate(jid, self.conn.jid.toLowerCase());
},
'mediafailure.jingle': function() {
jsxc.gui.dialog.close();
}
});
@@ -702,11 +708,11 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
var toggleMulti = function(elem, open) {
$('#jsxc_dialog .jsxc_multi > div').not(elem).slideUp();
var opt = {
complete: jsxc.gui.dialog.resize
complete: jsxc.gui.dialog.resize
};
if (open) {
elem.slideDown(opt);
} else {
@@ -715,9 +721,9 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
};
var win = jsxc.gui.window.open(jsxc.jidToCid(jid));
$('#jsxc_dialog .jsxc_chatarea ul').append(win.detach());
$('#jsxc_dialog .jsxc_hangUp').click(function() {
jsxc.webrtc.hangUp();
});
@@ -731,7 +737,7 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
toggleMulti($('#jsxc_dialog .jsxc_snapshotbar'));
});
$('#jsxc_dialog .jsxc_chat').click(function() {
$('#jsxc_dialog .jsxc_showchat').click(function() {
toggleMulti($('#jsxc_dialog .jsxc_chatarea'));
});
@@ -780,4 +786,42 @@ jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
$(document).on('attached.jsxc', jsxc.webrtc.init);
}
});
$.extend(jsxc.l10n.en, {
Please_allow_access_to_microphone_and_camera: 'Please allow access to microphone and camera.',
Incoming_call: 'Incoming call',
from: 'from',
Do_you_want_to_accept_the_call_from: 'Do you want to accept the call from',
Reject: 'Reject',
Accept: 'Accept',
hang_up: 'hang up',
snapshot: 'snapshot',
mute_my_audio: 'mute my audio',
pause_my_video: 'pause my video',
fullscreen: 'fullscreen',
Info: 'Info',
Local_IP: 'Local IP',
Remote_IP: 'Remote IP',
Local_Fingerprint: 'Local fingerprint',
Remote_Fingerprint: 'Remote fingerprint',
});
$.extend(jsxc.l10n.de, {
Please_allow_access_to_microphone_and_camera: 'Bitte erlaube den Zugriff auf Kamera und Mikrofon.',
Incoming_call: 'Eingehender Anruf',
from: 'von',
Do_you_want_to_accept_the_call_from: 'Möchtest Du den Anruf annehmen von',
Reject: 'Ablehnen',
Accept: 'Annehmen',
hang_up: 'Auflegen',
snapshot: 'Schnappschuss',
mute_my_audio: 'Mein Ton aus',
pause_my_video: 'Mein Video pausieren',
fullscreen: 'Vollbild',
Info: 'Info',
Local_IP: 'Lokale IP',
Remote_IP: 'Remote IP',
Local_Fingerprint: 'Lokaler Fingerprint',
Remote_Fingerprint: 'Remote Fingerprint',
});
}(jQuery));
+9 -8
Ver Arquivo
@@ -14,15 +14,15 @@
var doc = document.documentElement;
return ('requestFullscreen' in doc) ||
('mozRequestFullscreen' in doc && document.mozFullscreenEnabled) ||
('mozRequestFullScreen' in doc && document.mozFullScreenEnabled) ||
('webkitRequestFullscreen' in doc);
}
function requestFullscreen(elem) {
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.mozRequestFullscreen) {
elem.mozRequestFullscreen();
} else if (elem.mozRequestFullScreen) {
elem.mozRequestFullScreen();
} else if (elem.webkitRequestFullscreen) {
elem.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
}
@@ -38,7 +38,7 @@
function cancelFullscreen() {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozCancelFullscreen) {
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
@@ -61,16 +61,17 @@
var self = this;
$(self).on('fullscreenerror mozfullscreenerror webkitfullscreenerror msfullscreenerror', function() {
// Chrome trigger event on self, Firefox on document
$(self).add(document).on('fullscreenerror mozfullscreenerror webkitfullscreenerror msfullscreenerror', function() {
$(document).trigger('error.fullscreen');
});
$(self).on('fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange', function() {
if (fullscreenStatus()){
$(self).add(document).on('fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange', function() {
if (fullscreenStatus()){
$(document).trigger('enabled.fullscreen');
}else{
$(document).trigger('disabled.fullscreen');
$(self).off('fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange');
$(self).add(document).off('fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange');
}
});
+7 -3
Ver Arquivo
@@ -119,9 +119,13 @@
return null;
},
hasFeatureByJid: function(jid, feature) {
if (this._jidVerIndex[jid]) {
var length = ($.isArray(feature)) ? feature.length : 1;
for (i = 0; i < length; i++) {
if (this._jidVerIndex[jid] && feature !== null && typeof feature !== 'undefined') {
if(!$.isArray(feature)){
feature = $.makeArray(feature);
};
var i;
for (i = 0; i < feature.length; i++) {
if (this._knownCapabilities[this._jidVerIndex[jid]]['features'].indexOf(feature[i]) < 0)
return false;
}
+2166 -1229
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff