Skip to content

Commit 3324a6f

Browse files
committed
Merge branch 'release-0.23'
2 parents 26d1e2e + 27b9491 commit 3324a6f

File tree

15 files changed

+4177
-8277
lines changed

15 files changed

+4177
-8277
lines changed

debian/changelog

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
spreed-webrtc-server (0.23.3) precise; urgency=low
2+
3+
* Improved room bar room change and leave buttons.
4+
* Never hide room bar completely.
5+
* Stay in prior room when join fails.
6+
* Stay in prior room when PIN prompt was aborted.
7+
* Updated to PDF.js 1.0.907.
8+
* Enhanced example CSP to support for PDF and WebODF presentations.
9+
* Fixed Firefox screen sharing interop.
10+
* Fixed Firefox file transfer interop.
11+
* Fixed peer connection to create and offer when user media failed.
12+
* Only show room bar when there is no peer.
13+
* Hide welcome screen when there is a peer.
14+
* Avoid dead ends in room join UI when connection is lost and reestablished.
15+
* Avoid showing settings automatically when not connected or still in authorizing phase.
16+
* Added some missing CSS classes to allow easier UI mods.
17+
18+
-- Simon Eisenmann <[email protected]> Fri, 19 Dec 2014 17:15:10 +0100
19+
120
spreed-webrtc-server (0.23.2) precise; urgency=low
221

322
* Do not build combined Javascript in strict mode to avoid compatibility issues.

server.conf.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,9 @@ serverRealm = local
107107
; The currently recommended CSP is:
108108
; default-src 'self';
109109
; style-src 'self' 'unsafe-inline';
110-
; img-src 'self' data:;
111-
; connect-src 'self' wss://server:port/ws;
110+
; img-src 'self' data: blob:;
111+
; connect-src 'self' wss://server:port/ws blob:;
112+
; font-src 'self' data: blob:;
112113
;contentSecurityPolicy =
113114
; Content-Security-Policy-Report-Only HTTP response header value. Use this
114115
; to test your CSP before putting it into production.

static/js/controllers/usersettingscontroller.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
define([], function() {
2424

2525
// UsersettingsController
26-
return ["$scope", "$element", "mediaStream", "safeApply", function($scope, $element, mediaStream, safeApply) {
26+
return ["$scope", "$element", "mediaStream", "safeApply", "$window", function($scope, $element, mediaStream, safeApply, $window) {
2727

2828
$scope.withUsersForget = true;
2929

@@ -65,7 +65,10 @@ define([], function() {
6565

6666
this.forgetUserid = function() {
6767
mediaStream.users.forget();
68-
mediaStream.connector.forgetAndReconnect();
68+
mediaStream.webrtc.doHangup("forgetUserid");
69+
$window.setTimeout(function() {
70+
mediaStream.connector.forgetAndReconnect();
71+
}, 0);
6972
};
7073

7174
}];

static/js/directives/page.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ define(['text!partials/page.html', 'text!partials/page/welcome.html'], function(
3333
});
3434
$scope.$on("room.random", function(ev, roomdata) {
3535
// Show welcome page on room random events.
36+
$scope.layout.roombar = false;
3637
$timeout(function() {
3738
$scope.page = "page/welcome.html";
3839
});

static/js/directives/presentation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ define(['jquery', 'underscore', 'text!partials/presentation.html', 'bigscreen'],
429429
};
430430

431431
var connector = function(token, peercall) {
432-
console.log("XXX connector", token, peercall, peers);
432+
//console.log("XXX connector", token, peercall, peers);
433433
if (peers.hasOwnProperty(peercall.id)) {
434434
// Already got a connection.
435435
return;

static/js/directives/roombar.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
define(['underscore', 'angular', 'text!partials/roombar.html'], function(_, angular, template) {
2424

2525
// roomBar
26-
return ["$window", "rooms", function($window, rooms) {
26+
return ["$window", "rooms", "$timeout", function($window, rooms, $timeout) {
2727

2828
var link = function($scope, $element) {
2929

@@ -33,7 +33,7 @@ define(['underscore', 'angular', 'text!partials/roombar.html'], function(_, angu
3333
};
3434

3535
//console.log("roomBar directive link", arguments);
36-
$scope.layout.roombar = true;
36+
//$scope.layout.roombar = true;
3737

3838
$scope.save = function() {
3939
if ($scope.roombarform.$invalid) {
@@ -52,6 +52,9 @@ define(['underscore', 'angular', 'text!partials/roombar.html'], function(_, angu
5252

5353
$scope.$on("room.updated", function(ev, room) {
5454
$scope.currentRoomName = $scope.newRoomName = room.Name;
55+
if ($scope.currentRoomName && !$scope.peer) {
56+
$scope.layout.roombar = true;
57+
}
5558
});
5659

5760
$scope.$on("room.left", clearRoomName);
@@ -63,7 +66,9 @@ define(['underscore', 'angular', 'text!partials/roombar.html'], function(_, angu
6366
});
6467

6568
$scope.$watch("layout.roombar", function(value) {
66-
$element.find("input").focus();
69+
$timeout(function() {
70+
$element.find("input").focus();
71+
});
6772
});
6873

6974
$scope.$watch("peer", function(peer) {

static/js/directives/settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ define(['jquery', 'underscore', 'text!partials/settings.html'], function($, _, t
146146
});
147147

148148
$scope.maybeShowSettings = function() {
149-
if ($scope.autoshowSettings) {
149+
if ($scope.autoshowSettings && mediaStream.connector.connected && !appData.authorizing()) {
150150
$scope.autoshowSettings = false;
151151
if (!$scope.loadedUser) {
152152
$scope.layout.settings = true;

static/js/libs/pdf/compatibility.js

Lines changed: 48 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -167,35 +167,49 @@ if (typeof PDFJS === 'undefined') {
167167
// The worker will be using XHR, so we can save time and disable worker.
168168
PDFJS.disableWorker = true;
169169

170+
Object.defineProperty(xhrPrototype, 'responseType', {
171+
get: function xmlHttpRequestGetResponseType() {
172+
return this._responseType || 'text';
173+
},
174+
set: function xmlHttpRequestSetResponseType(value) {
175+
if (value === 'text' || value === 'arraybuffer') {
176+
this._responseType = value;
177+
if (value === 'arraybuffer' &&
178+
typeof this.overrideMimeType === 'function') {
179+
this.overrideMimeType('text/plain; charset=x-user-defined');
180+
}
181+
}
182+
}
183+
});
184+
170185
// Support: IE9
171186
if (typeof VBArray !== 'undefined') {
172187
Object.defineProperty(xhrPrototype, 'response', {
173188
get: function xmlHttpRequestResponseGet() {
174-
return new Uint8Array(new VBArray(this.responseBody).toArray());
189+
if (this.responseType === 'arraybuffer') {
190+
return new Uint8Array(new VBArray(this.responseBody).toArray());
191+
} else {
192+
return this.responseText;
193+
}
175194
}
176195
});
177196
return;
178197
}
179198

180-
// other browsers
181-
function responseTypeSetter() {
182-
// will be only called to set "arraybuffer"
183-
this.overrideMimeType('text/plain; charset=x-user-defined');
184-
}
185-
if (typeof xhr.overrideMimeType === 'function') {
186-
Object.defineProperty(xhrPrototype, 'responseType',
187-
{ set: responseTypeSetter });
188-
}
189-
function responseGetter() {
190-
var text = this.responseText;
191-
var i, n = text.length;
192-
var result = new Uint8Array(n);
193-
for (i = 0; i < n; ++i) {
194-
result[i] = text.charCodeAt(i) & 0xFF;
199+
Object.defineProperty(xhrPrototype, 'response', {
200+
get: function xmlHttpRequestResponseGet() {
201+
if (this.responseType !== 'arraybuffer') {
202+
return this.responseText;
203+
}
204+
var text = this.responseText;
205+
var i, n = text.length;
206+
var result = new Uint8Array(n);
207+
for (i = 0; i < n; ++i) {
208+
result[i] = text.charCodeAt(i) & 0xFF;
209+
}
210+
return result.buffer;
195211
}
196-
return result.buffer;
197-
}
198-
Object.defineProperty(xhrPrototype, 'response', { get: responseGetter });
212+
});
199213
})();
200214

201215
// window.btoa (base64 encode function) ?
@@ -237,7 +251,7 @@ if (typeof PDFJS === 'undefined') {
237251
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
238252
window.atob = function (input) {
239253
input = input.replace(/=+$/, '');
240-
if (input.length % 4 == 1) {
254+
if (input.length % 4 === 1) {
241255
throw new Error('bad atob input');
242256
}
243257
for (
@@ -293,7 +307,7 @@ if (typeof PDFJS === 'undefined') {
293307
var dataset = {};
294308
for (var j = 0, jj = this.attributes.length; j < jj; j++) {
295309
var attribute = this.attributes[j];
296-
if (attribute.name.substring(0, 5) != 'data-') {
310+
if (attribute.name.substring(0, 5) !== 'data-') {
297311
continue;
298312
}
299313
var key = attribute.name.substring(5).replace(/\-([a-z])/g,
@@ -416,7 +430,7 @@ if (typeof PDFJS === 'undefined') {
416430
function isDisabled(node) {
417431
return node.disabled || (node.parentNode && isDisabled(node.parentNode));
418432
}
419-
if (navigator.userAgent.indexOf('Opera') != -1) {
433+
if (navigator.userAgent.indexOf('Opera') !== -1) {
420434
// use browser detection since we cannot feature-check this bug
421435
document.addEventListener('click', ignoreIfTargetDisabled, true);
422436
}
@@ -467,6 +481,7 @@ if (typeof PDFJS === 'undefined') {
467481

468482
if (isSafari || isOldAndroid) {
469483
PDFJS.disableRange = true;
484+
PDFJS.disableStream = true;
470485
}
471486
})();
472487

@@ -481,7 +496,7 @@ if (typeof PDFJS === 'undefined') {
481496
}
482497
})();
483498

484-
// Support: IE<11, Chrome<21, Android<4.4
499+
// Support: IE<11, Chrome<21, Android<4.4, Safari<6
485500
(function checkSetPresenceInImageData() {
486501
// IE < 11 will use window.CanvasPixelArray which lacks set function.
487502
if (window.CanvasPixelArray) {
@@ -495,21 +510,21 @@ if (typeof PDFJS === 'undefined') {
495510
} else {
496511
// Old Chrome and Android use an inaccessible CanvasPixelArray prototype.
497512
// Because we cannot feature detect it, we rely on user agent parsing.
498-
var polyfill = false;
513+
var polyfill = false, versionMatch;
499514
if (navigator.userAgent.indexOf('Chrom') >= 0) {
500-
var versionMatch = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
501-
if (versionMatch && parseInt(versionMatch[2]) < 21) {
502-
// Chrome < 21 lacks the set function.
503-
polyfill = true;
504-
}
515+
versionMatch = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
516+
// Chrome < 21 lacks the set function.
517+
polyfill = versionMatch && parseInt(versionMatch[2]) < 21;
505518
} else if (navigator.userAgent.indexOf('Android') >= 0) {
506519
// Android < 4.4 lacks the set function.
507520
// Android >= 4.4 will contain Chrome in the user agent,
508521
// thus pass the Chrome check above and not reach this block.
509-
var isOldAndroid = /Android\s[0-4][^\d]/g.test(navigator.userAgent);
510-
if (isOldAndroid) {
511-
polyfill = true;
512-
}
522+
polyfill = /Android\s[0-4][^\d]/g.test(navigator.userAgent);
523+
} else if (navigator.userAgent.indexOf('Safari') >= 0) {
524+
versionMatch = navigator.userAgent.
525+
match(/Version\/([0-9]+)\.([0-9]+)\.([0-9]+) Safari\//);
526+
// Safari < 6 lacks the set function.
527+
polyfill = versionMatch && parseInt(versionMatch[1]) < 6;
513528
}
514529

515530
if (polyfill) {

0 commit comments

Comments
 (0)