function onIsVideoOnChanged()

in WebPortal/Scripts/multivideo.js [210:236]


        function onIsVideoOnChanged(val) {
            var channel = skypeParticipant.video.channels(0);
            var container = channel.stream.source.sink.container;
            if (val) {
                $('#videoWindow').show();
                // subscribe to remote video
                if (conversation.isGroupConversation() && !channel.isStarted()) {
                    var renderWindow = document.getElementById("video0");
                    renderWindow.innerHTML = '';
                    if (!container()) {
                        // if container is not set, set it and then call
                        // isStarted after that promise returns
                        container.set(renderWindow).then(function () {
                            channel.isStarted(true);
                        });
                    } else {
                        channel.isStarted(true);
                    }
                }
            } else {
                if (conversation.isGroupConversation() && channel.isStarted() && channel.isStarted.set.enabled()) {
                    // unsubscribe to remote video
                    channel.isStarted(false);
                    $('#videoWindow').hide();
                }
            }
        }