|
@@ -154,9 +154,10 @@ class FollowMe {
|
154
|
154
|
|
155
|
155
|
this._nextOnStage(smallVideo, isPinned);
|
156
|
156
|
|
157
|
|
- this._sharedDocumentToggled
|
158
|
|
- .bind(this, this._UI.getSharedDocumentManager().isVisible());
|
159
|
|
-
|
|
157
|
+ // check whether shared document is enabled/initialized
|
|
158
|
+ if(this._UI.getSharedDocumentManager())
|
|
159
|
+ this._sharedDocumentToggled
|
|
160
|
+ .bind(this, this._UI.getSharedDocumentManager().isVisible());
|
160
|
161
|
}
|
161
|
162
|
|
162
|
163
|
/**
|
|
@@ -352,10 +353,13 @@ class FollowMe {
|
352
|
353
|
_onNextOnStage(id) {
|
353
|
354
|
var clickId = null;
|
354
|
355
|
var pin;
|
|
356
|
+ // if there is an id which is not pinned we schedule it for pin only the
|
|
357
|
+ // first time
|
355
|
358
|
if(typeof id !== 'undefined' && !VideoLayout.isPinned(id)) {
|
356
|
359
|
clickId = id;
|
357
|
360
|
pin = true;
|
358
|
361
|
}
|
|
362
|
+ // if there is no id, but we have a pinned one, let's unpin
|
359
|
363
|
else if (typeof id == 'undefined' && VideoLayout.getPinnedId()) {
|
360
|
364
|
clickId = VideoLayout.getPinnedId();
|
361
|
365
|
pin = false;
|