|
@@ -143,7 +143,7 @@ var Chat = (function (my) {
|
143
|
143
|
var chatspace = $('#chatspace');
|
144
|
144
|
var videospace = $('#videospace');
|
145
|
145
|
|
146
|
|
- var chatSize = (chatspace.is(":visible")) ? [0, 0] : Chat.getChatSize();
|
|
146
|
+ var chatSize = (Chat.isVisible()) ? [0, 0] : Chat.getChatSize();
|
147
|
147
|
var videospaceWidth = window.innerWidth - chatSize[0];
|
148
|
148
|
var videospaceHeight = window.innerHeight;
|
149
|
149
|
var videoSize
|
|
@@ -160,97 +160,64 @@ var Chat = (function (my) {
|
160
|
160
|
var thumbnailSize = VideoLayout.calculateThumbnailSize(videospaceWidth);
|
161
|
161
|
var thumbnailsWidth = thumbnailSize[0];
|
162
|
162
|
var thumbnailsHeight = thumbnailSize[1];
|
163
|
|
-
|
164
|
|
- if (chatspace.is(":visible")) {
|
165
|
|
- videospace.animate({right: chatSize[0],
|
166
|
|
- width: videospaceWidth,
|
167
|
|
- height: videospaceHeight},
|
168
|
|
- {queue: false,
|
169
|
|
- duration: 500});
|
170
|
|
-
|
171
|
|
- $('#remoteVideos').animate({height: thumbnailsHeight},
|
|
163
|
+ var completeFunction = Chat.isVisible() ?
|
|
164
|
+ function() {} : function () {
|
|
165
|
+ scrollChatToBottom();
|
|
166
|
+ chatspace.trigger('shown');
|
|
167
|
+ };
|
|
168
|
+
|
|
169
|
+ videospace.animate({right: chatSize[0],
|
|
170
|
+ width: videospaceWidth,
|
|
171
|
+ height: videospaceHeight},
|
|
172
|
+ {queue: false,
|
|
173
|
+ duration: 500,
|
|
174
|
+ complete: completeFunction});
|
|
175
|
+
|
|
176
|
+ $('#remoteVideos').animate({height: thumbnailsHeight},
|
|
177
|
+ {queue: false,
|
|
178
|
+ duration: 500});
|
|
179
|
+
|
|
180
|
+ $('#remoteVideos>span').animate({height: thumbnailsHeight,
|
|
181
|
+ width: thumbnailsWidth},
|
172
|
182
|
{queue: false,
|
173
|
|
- duration: 500});
|
174
|
|
-
|
175
|
|
- $('#remoteVideos>span').animate({height: thumbnailsHeight,
|
176
|
|
- width: thumbnailsWidth},
|
|
183
|
+ duration: 500,
|
|
184
|
+ complete: function() {
|
|
185
|
+ $(document).trigger(
|
|
186
|
+ "remotevideo.resized",
|
|
187
|
+ [thumbnailsWidth,
|
|
188
|
+ thumbnailsHeight]);
|
|
189
|
+ }});
|
|
190
|
+
|
|
191
|
+ $('#largeVideoContainer').animate({ width: videospaceWidth,
|
|
192
|
+ height: videospaceHeight},
|
177
|
193
|
{queue: false,
|
178
|
|
- duration: 500,
|
179
|
|
- complete: function() {
|
180
|
|
- $(document).trigger(
|
181
|
|
- "remotevideo.resized",
|
182
|
|
- [thumbnailsWidth,
|
183
|
|
- thumbnailsHeight]);
|
184
|
|
- }});
|
185
|
|
-
|
186
|
|
- $('#largeVideoContainer').animate({ width: videospaceWidth,
|
187
|
|
- height: videospaceHeight},
|
188
|
|
- {queue: false,
|
189
|
|
- duration: 500
|
190
|
|
- });
|
191
|
|
-
|
192
|
|
- $('#largeVideo').animate({ width: videoWidth,
|
193
|
|
- height: videoHeight,
|
194
|
|
- top: verticalIndent,
|
195
|
|
- bottom: verticalIndent,
|
196
|
|
- left: horizontalIndent,
|
197
|
|
- right: horizontalIndent},
|
198
|
|
- { queue: false,
|
199
|
|
- duration: 500
|
200
|
|
- });
|
201
|
|
-
|
202
|
|
- $('#chatspace').hide("slide", { direction: "right",
|
|
194
|
+ duration: 500
|
|
195
|
+ });
|
|
196
|
+
|
|
197
|
+ $('#largeVideo').animate({ width: videoWidth,
|
|
198
|
+ height: videoHeight,
|
|
199
|
+ top: verticalIndent,
|
|
200
|
+ bottom: verticalIndent,
|
|
201
|
+ left: horizontalIndent,
|
|
202
|
+ right: horizontalIndent},
|
|
203
|
+ { queue: false,
|
|
204
|
+ duration: 500
|
|
205
|
+ }
|
|
206
|
+ );
|
|
207
|
+
|
|
208
|
+ if (Chat.isVisible()) {
|
|
209
|
+ chatspace.hide("slide", { direction: "right",
|
203
|
210
|
queue: false,
|
204
|
211
|
duration: 500});
|
205
|
212
|
}
|
206
|
213
|
else {
|
207
|
214
|
// Undock the toolbar when the chat is shown and if we're in a
|
208
|
215
|
// video mode.
|
209
|
|
- if (VideoLayout.isLargeVideoVisible())
|
|
216
|
+ if (VideoLayout.isLargeVideoVisible()) {
|
210
|
217
|
ToolbarToggler.dockToolbar(false);
|
|
218
|
+ }
|
211
|
219
|
|
212
|
|
- videospace.animate({right: chatSize[0],
|
213
|
|
- width: videospaceWidth,
|
214
|
|
- height: videospaceHeight},
|
215
|
|
- {queue: false,
|
216
|
|
- duration: 500,
|
217
|
|
- complete: function () {
|
218
|
|
- scrollChatToBottom();
|
219
|
|
- chatspace.trigger('shown');
|
220
|
|
- }
|
221
|
|
- });
|
222
|
|
-
|
223
|
|
- $('#remoteVideos').animate({height: thumbnailsHeight},
|
224
|
|
- {queue: false,
|
225
|
|
- duration: 500});
|
226
|
|
-
|
227
|
|
- $('#remoteVideos>span').animate({height: thumbnailsHeight,
|
228
|
|
- width: thumbnailsWidth},
|
229
|
|
- {queue: false,
|
230
|
|
- duration: 500,
|
231
|
|
- complete: function() {
|
232
|
|
- $(document).trigger(
|
233
|
|
- "remotevideo.resized",
|
234
|
|
- [thumbnailsWidth, thumbnailsHeight]);
|
235
|
|
- }});
|
236
|
|
-
|
237
|
|
- $('#largeVideoContainer').animate({ width: videospaceWidth,
|
238
|
|
- height: videospaceHeight},
|
239
|
|
- {queue: false,
|
240
|
|
- duration: 500
|
241
|
|
- });
|
242
|
|
-
|
243
|
|
- $('#largeVideo').animate({ width: videoWidth,
|
244
|
|
- height: videoHeight,
|
245
|
|
- top: verticalIndent,
|
246
|
|
- bottom: verticalIndent,
|
247
|
|
- left: horizontalIndent,
|
248
|
|
- right: horizontalIndent},
|
249
|
|
- {queue: false,
|
250
|
|
- duration: 500
|
251
|
|
- });
|
252
|
|
-
|
253
|
|
- $('#chatspace').show("slide", { direction: "right",
|
|
220
|
+ chatspace.show("slide", { direction: "right",
|
254
|
221
|
queue: false,
|
255
|
222
|
duration: 500,
|
256
|
223
|
complete: function () {
|