Simplifies code, reduces the scope of "try".
This commit is contained in:
parent
8d162609e0
commit
adefa40dcc
|
@ -1294,19 +1294,18 @@ export default {
|
||||||
|
|
||||||
APP.UI.addListener(UIEvents.PINNED_ENDPOINT, (smallVideo, isPinned) => {
|
APP.UI.addListener(UIEvents.PINNED_ENDPOINT, (smallVideo, isPinned) => {
|
||||||
var smallVideoId = smallVideo.getId();
|
var smallVideoId = smallVideo.getId();
|
||||||
try {
|
if (smallVideo.getVideoType() === VIDEO_CONTAINER_TYPE
|
||||||
if (smallVideo.getVideoType() === VIDEO_CONTAINER_TYPE
|
&& !APP.conference.isLocalId(smallVideoId)) {
|
||||||
&& !APP.conference.isLocalId(smallVideoId))
|
|
||||||
if (isPinned)
|
// When the library starts supporting multiple pins we would
|
||||||
room.pinParticipant(smallVideoId);
|
// pass the isPinned parameter together with the identifier,
|
||||||
// When the library starts supporting multiple pins we would
|
// but currently we send null to indicate that we unpin the
|
||||||
// pass the isPinned parameter together with the identifier,
|
// last pinned.
|
||||||
// but currently we send null to indicate that we unpin the
|
try {
|
||||||
// last pinned.
|
room.pinParticipant(isPinned ? smallVideoId : null);
|
||||||
else
|
} catch (e) {
|
||||||
room.pinParticipant(null);
|
reportError(e);
|
||||||
} catch (e) {
|
}
|
||||||
reportError(e);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue