Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var idleTime = 0;
- var doubleNotif = false;
- var autoPoke = false;
- var lengthdisplay = false;
- //UI INJECT
- document.getElementById("chatTextWrapper").innerHTML +=
- "<center><div style='display:none; background:white;' id='infoPanel'></div></center>" +
- "<div style='position: absolute; top:5px; right: 21px; border-radius: 5px; padding: 4px;' id='hiddenmenu'><a href='#' onclick='openCloseMenu()' class='btn btn-danger' style='width:100%;'>EPIK MENU</a></div>" +
- "<form id='asmomenu' style='display:none; position: absolute; top:5px; right: 21px; background: grey; border-radius: 5px; padding: 4px;' id='asmodeus_form' action=''>" +
- " <font style='border-radius:5px; background:red;padding:2px 2px 2px 2px;'>ASMODEUS PANEL</font><br>" +
- " <a href='#' id='initialiser' onclick='initSocket()' class='btn btn-primary' style='width:100%;'>Initalise Abilities</a>" +
- " <a href='#' onclick='openCloseMenu()' class='btn btn-danger' style='width:100%;'>Close Menu</a>" +
- " <div id='menu'></div>"
- "</form>";
- //MENU BOOL OPEN-CLOSE
- var menudisplay = ["block", "none"];
- function openCloseMenu() {
- document.getElementById('asmomenu').style.display = menudisplay[0];
- document.getElementById('hiddenmenu').style.display = menudisplay[1];
- swapTemp = menudisplay[0];
- swapTemp2 = menudisplay[1];
- menudisplay[0] = swapTemp2;
- menudisplay[1] = swapTemp;
- }
- //MENU BOOL SHOW LENGTH
- var showhide = ["block", "none"];
- function showContentLength() {
- document.getElementById('infoPanel').style.display = showhide[0];
- swapTemp = showhide[0];
- swapTemp2 = showhide[1];
- showhide[0] = swapTemp2;
- showhide[1] = swapTemp;
- }
- //VARIABLE TIMER INTERVAL
- setInterval(function () { //JUST USE A TIMER, COULD USE A HANDLER
- try {
- //DYNAMIC ADDED BUTTONS
- document.getElementById('parrot').innerHTML = "PARROT [" + doubleNotif + "]";
- document.getElementById('poke').innerHTML = "AUTO POKE [" + autoPoke + "]";
- document.getElementById('contentlength').innerHTML = "SHOW LENGTH [" + lengthdisplay + "]";
- //Emoji :E REPLACE
- if (document.getElementsByClassName('emojionearea-editor')[0].innerHTML.indexOf(":E") > -1) {
- document.getElementsByClassName('emojionearea-editor')[0].innerHTML = document.getElementsByClassName('emojionearea-editor')[0].innerHTML.replace(":E", ":sunglasses:");
- }
- //CONTENT LENGTH DISPLAY
- document.getElementById('infoPanel').innerHTML = "Content Length: " + document.getElementsByClassName('emojionearea-editor')[0].innerHTML.length;
- //ZALGO----------------------------------------------------------
- if (document.getElementsByClassName('emojionearea-editor')[0].innerHTML.indexOf("#") > -1) {
- asmodeus_textarea('asmodeus_txt');
- }
- //End ZALGO-------------------------------------------------------
- } catch (ex) {
- console.log("ERROR: " + ex);
- }
- }, 100);
- //var pressed = false;
- //document.querySelector('#message').addEventListener('keypress',function(e) {
- // var key = e.which || e.keyCode;
- // if(key === 13) {
- // pressed = true;
- // console.log("Pressed");
- // }
- //});
- //ZALGO---------------------------------------------------------------
- function asmodeus_textarea(id) {
- var p = document.getElementById(id);
- var el = document.getElementsByClassName('emojionearea-editor')[0].innerHTML.replace("#", "").replace("<br>", "");
- var txt = el;
- var newtxt = '';
- for (var i = 0; i < txt.length; i++) {
- if (is_asmodeus_char(txt.substr(i, 1)))
- continue;
- var num_up;
- var num_mid;
- var num_down;
- //add the normal character
- newtxt += txt.substr(i, 1);
- //options
- if (document.getElementById('asmodeus_opt_mini').checked) {
- num_up = rand(8);
- num_mid = rand(2);
- num_down = rand(8);
- }
- else if (document.getElementById('asmodeus_opt_normal').checked) {
- num_up = rand(16) / 2 + 1;
- num_mid = rand(6) / 2;
- num_down = rand(16) / 2 + 1;
- }
- else //maxi
- {
- num_up = rand(64) / 4 + 3;
- num_mid = rand(16) / 4 + 1;
- num_down = rand(64) / 4 + 3;
- }
- if (document.getElementById('asmodeus_opt_up').checked)
- for (var j = 0; j < num_up; j++)
- newtxt += rand_asmodeus(asmodeus_up);
- if (document.getElementById('asmodeus_opt_mid').checked)
- for (var j = 0; j < num_mid; j++)
- newtxt += rand_asmodeus(asmodeus_mid);
- if (document.getElementById('asmodeus_opt_down').checked)
- for (var j = 0; j < num_down; j++)
- newtxt += rand_asmodeus(asmodeus_down);
- }
- document.getElementsByClassName('emojionearea-editor')[0].innerHTML = newtxt;
- //done
- }
- var asmodeus_up = [
- '\u030d', /* ̍ */ '\u030e', /* ̎ */ '\u0304', /* ̄ */ '\u0305', /* ̅ */
- '\u033f', /* ̿ */ '\u0311', /* ̑ */ '\u0306', /* ̆ */ '\u0310', /* ̐ */
- '\u0352', /* ͒ */ '\u0357', /* ͗ */ '\u0351', /* ͑ */ '\u0307', /* ̇ */
- '\u0308', /* ̈ */ '\u030a', /* ̊ */ '\u0342', /* ͂ */ '\u0343', /* ̓ */
- '\u0344', /* ̈́ */ '\u034a', /* ͊ */ '\u034b', /* ͋ */ '\u034c', /* ͌ */
- '\u0303', /* ̃ */ '\u0302', /* ̂ */ '\u030c', /* ̌ */ '\u0350', /* ͐ */
- '\u0300', /* ̀ */ '\u0301', /* ́ */ '\u030b', /* ̋ */ '\u030f', /* ̏ */
- '\u0312', /* ̒ */ '\u0313', /* ̓ */ '\u0314', /* ̔ */ '\u033d', /* ̽ */
- '\u0309', /* ̉ */ '\u0363', /* ͣ */ '\u0364', /* ͤ */ '\u0365', /* ͥ */
- '\u0366', /* ͦ */ '\u0367', /* ͧ */ '\u0368', /* ͨ */ '\u0369', /* ͩ */
- '\u036a', /* ͪ */ '\u036b', /* ͫ */ '\u036c', /* ͬ */ '\u036d', /* ͭ */
- '\u036e', /* ͮ */ '\u036f', /* ͯ */ '\u033e', /* ̾ */ '\u035b', /* ͛ */
- '\u0346', /* ͆ */ '\u031a' /* ̚ */
- ];
- var asmodeus_down = [
- '\u0316', /* ̖ */ '\u0317', /* ̗ */ '\u0318', /* ̘ */ '\u0319', /* ̙ */
- '\u031c', /* ̜ */ '\u031d', /* ̝ */ '\u031e', /* ̞ */ '\u031f', /* ̟ */
- '\u0320', /* ̠ */ '\u0324', /* ̤ */ '\u0325', /* ̥ */ '\u0326', /* ̦ */
- '\u0329', /* ̩ */ '\u032a', /* ̪ */ '\u032b', /* ̫ */ '\u032c', /* ̬ */
- '\u032d', /* ̭ */ '\u032e', /* ̮ */ '\u032f', /* ̯ */ '\u0330', /* ̰ */
- '\u0331', /* ̱ */ '\u0332', /* ̲ */ '\u0333', /* ̳ */ '\u0339', /* ̹ */
- '\u033a', /* ̺ */ '\u033b', /* ̻ */ '\u033c', /* ̼ */ '\u0345', /* ͅ */
- '\u0347', /* ͇ */ '\u0348', /* ͈ */ '\u0349', /* ͉ */ '\u034d', /* ͍ */
- '\u034e', /* ͎ */ '\u0353', /* ͓ */ '\u0354', /* ͔ */ '\u0355', /* ͕ */
- '\u0356', /* ͖ */ '\u0359', /* ͙ */ '\u035a', /* ͚ */ '\u0323' /* ̣ */
- ];
- var asmodeus_mid = [
- '\u0315', /* ̕ */ '\u031b', /* ̛ */ '\u0340', /* ̀ */ '\u0341', /* ́ */
- '\u0358', /* ͘ */ '\u0321', /* ̡ */ '\u0322', /* ̢ */ '\u0327', /* ̧ */
- '\u0328', /* ̨ */ '\u0334', /* ̴ */ '\u0335', /* ̵ */ '\u0336', /* ̶ */
- '\u034f', /* ͏ */ '\u035c', /* ͜ */ '\u035d', /* ͝ */ '\u035e', /* ͞ */
- '\u035f', /* ͟ */ '\u0360', /* ͠ */ '\u0362', /* ͢ */ '\u0338', /* ̸ */
- '\u0337', /* ̷ */ '\u0361', /* ͡ */ '\u0489' /* ҉_ */
- ];
- function rand(max) {
- return Math.floor(Math.random() * max);
- }
- function rand_asmodeus(array) {
- var ind = Math.floor(Math.random() * array.length);
- return array[ind];
- }
- function toggle(id) {
- if (document.getElementById(id).style.display == "none")
- document.getElementById(id).style.display = "block";
- else
- document.getElementById(id).style.display = "none";
- }
- function is_asmodeus_char(c) {
- var i;
- for (i = 0; i < asmodeus_up.length; i++)
- if (c == asmodeus_up[i])
- return true;
- for (i = 0; i < asmodeus_down.length; i++)
- if (c == asmodeus_down[i])
- return true;
- for (i = 0; i < asmodeus_mid.length; i++)
- if (c == asmodeus_mid[i])
- return true;
- return false;
- }
- //End ZALGO------------------------------------------------------------
- $(function () {
- // $("body").on("shown.bs.tab", '#ctabs a[data-toggle="tab"]', function(a) {
- // "all" == $(a.target).data("dest") && void 0 !== roomUserLists[$(a.target).data("roomid")] && $('a[data-target="#users"]').parent("li").hasClass("active") && usersListTitleChange(roomUserLists[$(a.target).data("roomid")].items.length, $(".chat-tabs .avatar-list-item.active a").find("strong").text());
- // $('#ctabs a[data-toggle="tab"]').removeClass("active");
- // $(a.target).addClass("active");
- // $(a.target).children(".num-container").hide();
- // $(a.target).children(".num-container").children(".num-circle").html("0");
- // scrollToBottom($(".chat-area > .tab-pane.active .chat-text"));
- // $(".emojionearea-editor").focus()
- // });
- // $("body").on("click", ".chat-tabs-closer", function(a) {
- // a.stopPropagation();
- // $tab = $(this).parent("a");
- // "all" == $tab.data("dest") ? leaveRoom($tab.data("roomid"), function() {
- // delete roomUserLists[$tab.data("roomid")];
- // closeChatTab($tab.data("roomid"), !0)
- // }) : closeChatTab($tab.data("dest"), !1)
- // })
- });
- function newChatTab(a, b, c, f, e) {
- // f = "all" == c ? "<strong>" + f + "</strong>" : f;
- // $(".chat-tabs").append('<li class="avatar-list-item"><a data-target="' + a + '" data-roomid="' + b + '" data-dest="' + c + '" class="ct-tab btn btn-xs btn-primary-outline" data-toggle="tab"><span class="chat-tabs-title">' + f + '</span><span class="chat-tabs-closer">×</span></a></li>');
- // $(".chat-area").append('<div id="ct_' + e + '" class="tab-pane"><div class="chat-text" style="font-size:' + $("#optTextSize").val() + 'px;" data-id="' + e + '"></div></div>')
- }
- function closeChatTab(a, b) {
- // b ? ($('#ctabs a[data-target="#ct_' + a + ", #ul_" + a + '"]').parent("li").remove(), $("#ul_" + a).remove()) : $('#ctabs a[data-target="#ct_' + a + '"]').parent("li").remove();
- // $("#ct_" + a).remove();
- // 0 === $(".chat-tabs li").length ? ($("#userLists, #chatArea").css("visibility", "hidden"), $("#roomsList_modal").modal("show")) : (0 !== $(".chat-tabs li.active").length && 0 !== $("#users .tab-pane.active").length || $(".chat-tabs li").children('a[data-dest="all"]').first().click(), 1 == $(".chat-tabs li").children('a[data-dest="all"]').length && $(".chat-tabs li").children('a[data-dest="all"]').children(".chat-tabs-closer").css("visibility", "hidden"), 0 === $(".chat-tabs li").children('a[data-dest="all"]').length && ($(".chat-tabs").html(""), $(".chat-area").html(""), $("#userLists, #chatArea").css("visibility", "hidden"), $("#roomsList_modal").modal("show")))
- }
- function onNewMessageReceivedInActiveTab() {
- // isActive || (count++, document.title = "(" + parseInt(count, 10) + ") Chat | EpikChat")
- }
- $(function () {
- // $("body").on("blur", ".tab-pane > .form-group > input.search:text", function(a) {
- // $(this).val("");
- // $(this).parents(".tab-pane").is("#ul_viewers") ? viewersList.search() : $(this).parents(".tab-pane").is("#ul_blocked") ? blockedList.search() : roomUserLists[$(this).parents(".tab-pane").data("roomid")].search()
- // });
- // $("body").on("click", "a.tcLink", function(a) {
- // a.preventDefault();
- // openLink($(this).attr("href"))
- // });
- // $("#youTube-content").resizable({
- // handles: "sw",
- // aspectRatio: !0,
- // alsoResize: "#ytplayer",
- // maxHeight: 360,
- // maxWidth: 640,
- // minHeight: 72,
- // minWidth: 128,
- // start: function(a, b) {
- // $("#ytplayer").css("pointer-events", "none")
- // },
- // stop: function(a, b) {
- // $("#ytplayer").css("pointer-events", "auto")
- // }
- // })
- });
- function youtubePlayer(a, b) {
- // switch (a) {
- // case "open":
- // $("#ytplayer").show();
- // $("#ytplayer").attr("src", "https://www.youtube.com/embed/" + b + "?disablekb=1&rel=0&theme=light&playsinline=1");
- // $(".avatar-list-item.yticon").hide();
- // $(".avatar-list-item.ytminmax").removeClass("max");
- // $(".ytresize").removeClass("max");
- // $("#youTube-content").fadeIn();
- // break;
- // case "close":
- // $("#youTube-content").hide();
- // $("#ytplayer").attr("src", "about:blank");
- // break;
- // case "minmax":
- // $("#ytplayer").toggle(), $(".ytresize").toggleClass("max"), $(".avatar-list-item.ytminmax").toggleClass("max"), $("#ytcontrols .avatar-list-item.yticon").fadeToggle(150, "linear")
- // }
- }
- $(function () {
- // $("body").on("click", "#ytcontrols .avatar-list-item", function() {
- // youtubePlayer($(this).data("action"), null)
- // });
- // $('[data-toggle="popoverColor"]').popover({
- // template: '<div class="popover colorselectpopover" role="tooltip"><div class="arrow"></div><div class="popover-content p-x-0"></div></div>',
- // title: "",
- // html: !0,
- // trigger: "manual",
- // placement: "top",
- // container: ".message-input",
- // content: '<span class="simplecolorpicker inline"><span class="color" style="background-color: #212121;" data-color="#212121"></span><span class="color" style="background-color: #3d3c3a;" data-color="#3d3c3a"></span><span class="color" style="background-color: #656565;" data-color="#656565"></span><span class="color" style="background-color: #6f4341;" data-color="#6f4341"></span><span class="color" style="background-color: #990703;" data-color="#990703"></span><span class="color" style="background-color: #ca226b;" data-color="#ca226b"></span><span class="color" style="background-color: #f778a1;" data-color="#f778a1"></span><span class="color" style="background-color: #f32f2f;" data-color="#f32f2f"></span><span class="color" style="background-color: #c35817;" data-color="#c35817"></span><span class="color" style="background-color: #ffad46;" data-color="#ffad46"></span><span class="color" style="background-color: #f1c85e;" data-color="#f1c85e"></span><span class="color" style="background-color: #006666;" data-color="#006666"></span><span class="color" style="background-color: #596247;" data-color="#596247"></span><span class="color" style="background-color: #3a6636;" data-color="#3a6636"></span><span class="color" style="background-color: #47b617;" data-color="#47b617"></span><span class="color" style="background-color: #5cd87e;" data-color="#5cd87e"></span><span class="color" style="background-color: #11c4cd;" data-color="#11c4cd"></span><span class="color" style="background-color: #6db4e9;" data-color="#6db4e9"></span><span class="color" style="background-color: #2a61e3;" data-color="#2a61e3"></span><span class="color" style="background-color: #2d1ae1;" data-color="#2d1ae1"></span><span class="color" style="background-color: #645be5;" data-color="#645be5"></span><span class="color" style="background-color: #ff0099;" data-color="#ff0099"></span><span class="color" style="background-color: #cc00cc;" data-color="#cc00cc"></span><span class="color" style="background-color: #9334d8;" data-color="#9334d8"></span></span>'
- // });
- // $('[data-toggle="popoverColor"]').on("click", function(a) {
- // $('[data-toggle="popoverColor"]').data("bs.popover").tip().hasClass("in") ? ($('[data-toggle="popoverColor"]').popover("hide"), $(document).off("click.app.popover")) : ($('[data-toggle="popoverColor"]').popover("show"), $(".simplecolorpicker span.color").removeAttr("data-selected"), $('.simplecolorpicker span.color[data-color="' + $("#optTextColor").data("color") + '"]').attr("data-selected", !0), setTimeout(function() {
- // $(document).one("click.app.popover", function() {
- // $('[data-toggle="popoverColor"]').popover("hide")
- // })
- // }, 1))
- // });
- // $("body").on("click", ".simplecolorpicker span.color", function(a) {
- // $("#optTextColor").attr("data-color", $(this).data("color"));
- // $("#optTextColor").data("color", $(this).data("color"));
- // $("#optTextColor").css("background-color", $(this).data("color"));
- // $(".emojionearea-editor").focus();
- // saveChatSettings()
- // });
- // $("body").on("click", 'a[data-target="#user_action_modal"]', function(a) {
- // userActions($("#user_action_modal"), $(this), !0)
- // })
- });
- function openLink(a) {
- // a.match(/^http([s]?):\/\/.*/) || (a = "http://" + a);
- // a = a.replace("&", "&");
- // var b = $("<a>", {
- // href: a
- // })[0],
- // c = !1;
- // $.each("epikchat.com youtube.com youtu.be ytimg.com facebook.com fb.com fbcdn.net instagram.com cdninstagram.com twitter.com twimg.com pinterest.com pinimg.com imgur.com reddit.com ebay.com amazon.com google.com wikipedia.org".split(" "), function(a, e) {
- // if (b.hostname.lastIndexOf(e) == b.hostname.length - e.length && -1 != b.hostname.lastIndexOf(e)) return c = !0, !1
- // });
- // if (c)
- // if (regExp = /.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#&\?]*).*/, match = a.match(regExp), res = a.split("/"), match && 11 == match[1].length) youtubePlayer("open", match[1]);
- // else if (res[4] && ("doodles" == res[4].toLowerCase() || "photos" == res[4].toLowerCase()) && res[5]) viewMedia(a);
- // else if (-1 == a.indexOf("epikchat.com/chat")) window.open(a, "_blank");
- // else return !1;
- // else $("#link-checker-content").html(""), $(".indicator").show(), $("#linkCheckerModal").modal("show"), $("#linkCheckerModal").find(".modal-header .modal-title").html("Checking link..."), $.ajax({
- // type: "POST",
- // url: "/sites/all/modules/avc/avc_ui/linkCheck",
- // data: {
- // url: a
- // },
- // dataType: "json",
- // success: function(b) {
- // if (0 === b.status) return !1;
- // 1 == b.status ? ($("#linkCheckerModal").find(".modal-header .modal-title").html("Be careful!<br>This link leads you off EpikChat!"), b.url ? $("#link-checker-content").html('<div style="width: 260px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><b>This link redirects to:</b> ' + b.url + "</div><a href=\"javascript:alert('" + b.redirects + '\')" style="text-decoration:none;">(show all)</a><br>') : $("#link-checker-content").html('<div style="width: 260px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">' +
- // a + "</div>"), $("#link-checker-content").append('<br><p>If you trust this link, choose Open Link. If you do not trust the link, choose Cancel.</p><br><button type="button" class="btn btn-primary pull-right" onclick="window.open(\'' + a + "', '_blank');$('#linkCheckerModal').modal('hide');\">Open Link</button><button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Cancel</button>")) : 2 == b.status && ($("#linkCheckerModal").find(".modal-header .modal-title").html("Link Blocked"), $("#link-checker-content").html('<b>This link has been identified as potentially dangerous and has been blocked.</b><br><br><div style="width: 260px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" onselectstart="return false;">' +
- // a + '</div><br><button type="button" class="btn btn-default" data-dismiss="modal">Close</button>'))
- // }
- // }), $(".indicator").hide()
- }
- function gotDevices(a) {
- // var b = broadcastSelectors.map(function(a) {
- // return a.value
- // });
- // broadcastSelectors.forEach(function(a) {
- // for (; a.firstChild;) a.removeChild(a.firstChild)
- // });
- // for (var c = 0; c !== a.length; ++c) {
- // var f = a[c],
- // e = document.createElement("option");
- // e.value = f.deviceId;
- // "audioinput" === f.kind && (e.text = f.label || "microphone " + (audioInputSelect.length + 1), audioInputSelect.appendChild(e));
- // "videoinput" === f.kind && (e.text = f.label || "camera " + (videoInputSelect.length + 1), videoInputSelect.appendChild(e))
- // }
- // broadcastSelectors.forEach(function(a, c) {
- // Array.prototype.slice.call(a.childNodes).some(function(a) {
- // return a.value === b[c]
- // }) && (a.value = b[c])
- // })
- }
- function gotStream(a) {
- // window.stream = a;
- // document.getElementById("videoPreview").srcObject = a;
- // meters[socket.id] = kurentoUtils.WebRtcPeer.hark(a);
- // meters[socket.id].on("volume_change", function(a) {
- // $("#volPreviewBar").height(a + 100 + "%")
- // });
- // return navigator.mediaDevices.enumerateDevices()
- }
- function complete() {
- // $("#broadcastReqPerm").hide();
- // $("#broadcastReqFail").hide();
- // $("#broadcastSettingsForm").show()
- }
- function handleError(a) {
- // var b = "";
- // console.log("navigator.getUserMedia error: " + a);
- // if ("NotAllowedError" == a.name || "PermissionDeniedError" == a.name) b = "<div><h5>Camera access denied</h5>You need to allow the use of your camera and microphone in order to broadcast.</div><br><br>";
- // if ("OverconstrainedError" == a.name || "DevicesNotFoundError" == a.name) b = '<div class="error" style="margin: 0px 15px 15px 15px;font-size: 13px;padding: 4px;">ERROR: One of your currently selected audio/video devices could not be found!<br>Please select another device.</div>';
- // "PermissionDismissedError" == a.name && (b = '<div><h5>Select "Allow" to broadcast</h5>Click "Try again" to allow the use of your camera and microphone in order to broadcast.</div><br><button type="button" name="op" value="Try again" class="btn btn-primary form-submit" onClick="start()">Try again</button><br><br>');
- // $("#broadcastReqFail").html(b);
- // $("#broadcastReqPerm").hide();
- // $("#broadcastReqFail").show()
- }
- $(function () {
- // $("body").on("click", "#startBroadcasting", function() {
- // navigator.getUserMedia ? ($("#startBroadcasting").addClass("disabled"), $("#broadcastSettings").modal("show")) : notifyUser("Broadcasting is not supported with this browser.")
- // });
- // $("#broadcastSettings").on("show.bs.modal", function() {
- // startPreview()
- // });
- // $("#broadcastSettings").on("hide.bs.modal", function() {
- // window.stream && window.stream.getTracks().forEach(function(a) {
- // a.stop()
- // });
- // $("#startBroadcasting").removeClass("disabled")
- // });
- // $("body").on("click", ".stopBroadcasting", function(a) {
- // stopBroadcasting(!1)
- // });
- // $("body").on("click", ".pauseVideo", function(a) {
- // webRtcPeerPresenter && ($(this).toggleClass("active"), webRtcPeerPresenter.videoEnabled = webRtcPeerPresenter.videoEnabled ? !1 : !0)
- // });
- // $("body").on("click", ".muteMic", function(a) {
- // webRtcPeerPresenter && ($(this).toggleClass("active"), webRtcPeerPresenter.audioEnabled = webRtcPeerPresenter.audioEnabled ? !1 : !0)
- // })
- });
- function presenterResponse(a) {
- // "accepted" != a.response ? (console.warn("Not accepted for the following reason: " + (a.message ? a.message : "Unknown error")), webRtcPeerPresenter.dispose()) : webRtcPeerPresenter.processAnswer(a.sdpAnswer)
- }
- $(function () {
- // $("body").on("click", ".stopViewing", function(a) {
- // stopViewing($(this).data("sid"))
- // });
- // $("body").on("click", ".ecp-mute > svg", function(a) {
- // a = $(this).next(".vol-control");
- // var b = 100 * $('video[data-sid="' + $(this).parents(".bcst-player").data("sid") + '"]').prop("volume");
- // $('video[data-sid="' + $(this).parents(".bcst-player").data("sid") + '"]').prop("muted") && 0 !== b ? ($('video[data-sid="' + $(this).parents(".bcst-player").data("sid") + '"]').prop("muted", !1), a.val(b), a.css("background", "linear-gradient(to left, #505050 0%, #505050 0%, #505050 " +
- // (100 - b) + "%, #f9f9f9 " + (100 - b) + "%, #f9f9f9 100%)"), $(this).html('<path d="M8,21 L12,21 L17,26 L17,10 L12,15 L8,15 L8,21 Z M19,14 L19,22 C20.48,21.32 21.5,19.77 21.5,18 C21.5,16.26 20.48,14.74 19,14 ZM19,11.29 C21.89,12.15 24,14.83 24,18 C24,21.17 21.89,23.85 19,24.71 L19,26.77 C23.01,25.86 26,22.28 26,18 C26,13.72 23.01,10.14 19,9.23 L19,11.29 Z" fill="#fff"></path>')) : ($('video[data-sid="' + $(this).parents(".bcst-player").data("sid") + '"]').prop("muted", !0), a.val(0), a.css("background", "linear-gradient(to left, #505050 0%, #505050 0%, #505050 100%, #f9f9f9 100%, #f9f9f9 100%)"), $(this).html('<path d="m 21.48,17.98 c 0,-1.77 -1.02,-3.29 -2.5,-4.03 v 2.21 l 2.45,2.45 c .03,-0.2 .05,-0.41 .05,-0.63 z m 2.5,0 c 0,.94 -0.2,1.82 -0.54,2.64 l 1.51,1.51 c .66,-1.24 1.03,-2.65 1.03,-4.15 0,-4.28 -2.99,-7.86 -7,-8.76 v 2.05 c 2.89,.86 5,3.54 5,6.71 z M 9.25,8.98 l -1.27,1.26 4.72,4.73 H 7.98 v 6 H 11.98 l 5,5 v -6.73 l 4.25,4.25 c -0.67,.52 -1.42,.93 -2.25,1.18 v 2.06 c 1.38,-0.31 2.63,-0.95 3.69,-1.81 l 2.04,2.05 1.27,-1.27 -9,-9 -7.72,-7.72 z m 7.72,.99 -2.09,2.08 2.09,2.09 V 9.98 z" fill="#fff"></path>'))
- // });
- // $("body").on("input", ".vol-control", function(a) {
- // $('video[data-sid="' + $(this).parents(".bcst-player").data("sid") + '"]').prop("volume", $(this).val() / 100);
- // $(this).css("background", "linear-gradient(to left, #505050 0%, #505050 0%, #505050 " + (100 - $(this).val()) + "%, #f9f9f9 " + (100 - $(this).val()) + "%, #f9f9f9 100%)");
- // "0" == $(this).val() ? $(this).siblings("svg").html('<path d="m 21.48,17.98 c 0,-1.77 -1.02,-3.29 -2.5,-4.03 v 2.21 l 2.45,2.45 c .03,-0.2 .05,-0.41 .05,-0.63 z m 2.5,0 c 0,.94 -0.2,1.82 -0.54,2.64 l 1.51,1.51 c .66,-1.24 1.03,-2.65 1.03,-4.15 0,-4.28 -2.99,-7.86 -7,-8.76 v 2.05 c 2.89,.86 5,3.54 5,6.71 z M 9.25,8.98 l -1.27,1.26 4.72,4.73 H 7.98 v 6 H 11.98 l 5,5 v -6.73 l 4.25,4.25 c -0.67,.52 -1.42,.93 -2.25,1.18 v 2.06 c 1.38,-0.31 2.63,-0.95 3.69,-1.81 l 2.04,2.05 1.27,-1.27 -9,-9 -7.72,-7.72 z m 7.72,.99 -2.09,2.08 2.09,2.09 V 9.98 z" fill="#fff"></path>') : ($('video[data-sid="' + $(this).parents(".bcst-player").data("sid") + '"]').prop("muted", !1), $(this).siblings("svg").html('<path d="M8,21 L12,21 L17,26 L17,10 L12,15 L8,15 L8,21 Z M19,14 L19,22 C20.48,21.32 21.5,19.77 21.5,18 C21.5,16.26 20.48,14.74 19,14 ZM19,11.29 C21.89,12.15 24,14.83 24,18 C24,21.17 21.89,23.85 19,24.71 L19,26.77 C23.01,25.86 26,22.28 26,18 C26,13.72 23.01,10.14 19,9.23 L19,11.29 Z" fill="#fff"></path>'))
- // });
- // $("body").on("click", ".ecp-resize", function(a) {
- // $(this).parents(".bcst-player").hasClass("stack-lg") ? ($(this).parents(".bcst-player").removeClass("stack-lg").find(".stack").removeClass("stack-lg"), $(this).find(".icon").removeClass("icon-resize-100").addClass("icon-resize-full-screen")) : ($(this).parents(".bcst-player").addClass("stack-lg").find(".stack").addClass("stack-lg"), $(this).find(".icon").removeClass("icon-resize-full-screen").addClass("icon-resize-100"));
- // scrollToBottom($(".chat-area > .tab-pane.active .chat-text"))
- // });
- // $("body").on("click", ".ecp-fullscreen", function(a) {
- // target = $('video[data-sid="' +
- // $(this).parents(".bcst-player").find("video").data("sid") + '"]')[0];
- // screenfull.enabled && (screenfull.request(target), screenfull.onchange(function() {
- // screenfull.isFullscreen || scrollToBottom($(".chat-area > .tab-pane.active .chat-text"))
- // }))
- // })
- });
- function viewerResponse(a) {
- // if ("accepted" != a.response) {
- // var b = a.data.data ? a.data.data : "Unknown error";
- // console.warn(b);
- // notifyUser("Could not establish a connection with the broadcaster: " + b);
- // removePlayer(a.data.sid)
- // } else webRtcPeerViewer[a.sid].processAnswer(a.sdpAnswer, function(b) {
- // if (b) return console.log(b);
- // document.querySelector('video[data-sid="' + a.sid + '"]').addEventListener("loadeddata", function() {
- // $('.bcst-player[data-sid="' + a.sid + '"] .stack.spinner').hide();
- // a.simulated && ($('.bcst-player[data-sid="' +
- // a.sid + '"]').find(".ecp-overlay").prepend('<div class="simIco pull-right" style="padding:3px 5px;" title="This person may be using a simulated webcam" data-toggle="tooltip" data-container="#broadcastSlots"><span class="icon icon-warning"></span></div>'), $('[data-toggle="tooltip"]').tooltip())
- // }, !1)
- // })
- }
- function removePlayer(a) {
- // webRtcPeerViewer[a] && webRtcPeerViewer[a] && (webRtcPeerViewer[a].dispose(), delete webRtcPeerViewer[a]);
- // $('.bcst-player[data-sid="' + a + '"]').remove()
- }
- $(function () {
- $("#reportUser").submit(function (a) {
- // a.preventDefault();
- // 0 === $(this).find("select").val() ? $(this).find("select").addClass("error") : ($(this).find("select").removeClass("error"), reportUser($(this).find("#report_roomid").val(), $(this).find("#report_sid").val(), $(this).find("select").val(), $(this).find("textarea").val()), $("#reportUser_modal").modal("hide"), $(this).find("select").val(0), $(this).find("textarea").val(""))
- });
- $("body").on("click", "#suggest_ban", function (a) {
- // a.preventDefault();
- // $("#suggestBan_modal").data("sid", $(this).attr("href"));
- // $("#suggestBan_modal .modal-body").html("Ban " + $(this).data("name") + " from The Lobby?<br><br><strong>WARNING:</strong><br><small>You are about to initiate a room wide vote to ban user " + $(this).data("name") + ". If over 50% of voters choose YES this user will be banned. If over 50% of voters choose NO you will be banned.</small><br>");
- // $("#suggestBan_modal").modal("show");
- // $("#reportUser_modal").modal("hide")
- });
- $("body").on("click", "#processBan", function (a) {
- // requestVote($(".userList div.active").data("roomid"), $("#suggestBan_modal").data("sid"))
- })
- });
- $(function () {
- // $("#alert_modal").on("hide.bs.modal", function() {
- // "hidden" !== $("#userLists, #chatArea").css("visibility") || $("#roomsList_modal").is(":visible") || $("#roomsList_modal").modal("show")
- // });
- // $("#roomsList_modal").on("show.bs.modal", function() {
- // roomsListRefresh();
- // roomsListRefreshTimer = setInterval(function() {
- // roomsListRefresh()
- // }, 5E3)
- // });
- // $("#roomsList_modal").on("hide.bs.modal", function() {
- // clearInterval(roomsListRefreshTimer)
- // });
- // $("#chatSettings_modal").on("hidden.bs.modal", function() {
- // saveChatSettings();
- // $(this).find(".modal-content").hide();
- // $(this).find(".modal-content.main").show()
- // });
- // $("#showEmpty").change(function() {
- // $(this).is(":checked") ? $(".roomspicker > a[data-users=0]").show() : $(".roomspicker > a[data-users=0]").hide()
- // });
- // $("body").on("click", ".roomspicker > a.list-group-item, .roomInvite, .roomInfo", function(a) {
- // a.preventDefault();
- // $("#roomsList_modal").modal("hide");
- // $('#ctabs a[data-roomid="' + $(this).data("roomid") + '"][data-dest="all"]').length ? notifyUser("This room is already open, please close/exit the room before attempting to rejoin.") : $(this).data("passworded") ? ($("#passwordJoin").data("roomid", $(this).data("roomid")), $("#password_modal").modal("show")) : joinRoom($(this).data("roomid"), "")
- // });
- // $("body").on("click", ".viewInvite", function(a) {
- // a.preventDefault();
- // sendViewRequest($(this).data("sid"), $(this).data("cam"))
- // });
- // $("#password_modal").on("shown.bs.modal", function() {
- // $(this).find("[autofocus]:first").focus()
- // });
- // $("#password_modal").on("hidden.bs.modal", function(a) {
- // $("#rmpwd").val("")
- // });
- // $("#passwordJoin").submit(function(a) {
- // a.preventDefault();
- // $("#password_modal").modal("hide");
- // joinRoom($(this).data("roomid"), $("#rmpwd").val())
- // });
- // $("#inviteToRoom").submit(function(a) {
- // a.preventDefault();
- // $("#inviteroom_modal").modal("hide");
- // inviteUser("room", $("#inviteroom_modal").find("#inviteroom_roomId").val(), $("#inviteroom_modal").find("#inviteroom_sid").val(), $("#inviteroom_modal").find("#inviteroom_name").val(), $("#inviteroom_modal").find("select").val())
- // })
- });
- function notifyUser(a, b, c) {
- // a = '<div class="alert alert-dark alert-dismissable" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>' + a + "</div>";
- // b ? $(a).appendTo(".growl") : (c = c ? c : 1E4, $(a).appendTo(".growl").delay(c).fadeOut("fast", function() {
- // $(this).remove()
- // }))
- }
- function notificationSound(a) {
- // if ($("#optSounds" + a).is(":checked")) {
- // switch (a) {
- // case "Msg":
- // file = "message-html5.mp3";
- // break;
- // case "Poke":
- // file = "poke-html5.mp3";
- // break;
- // case "ViewReq":
- // file = "viewRequest-html5.mp3"
- // }
- // audio = new Audio("/sites/all/modules/avc/avc_ui/sounds/" + file);
- // audio.play()
- // }
- }
- function inList(a, b, c) {
- // if (!a) return !1;
- // a = a.get(b, c);
- // return a.length ? a[0].values() : !1
- }
- function isBlocked(a, b) {
- // if (void 0 === a || null === a) return console.log("no siteId blocking just in case"), !0;
- // if (void 0 === b || null === b) return console.log("no clientId blocking just in case"), !0;
- // if (a) {
- // if (inList(blockedList, "siteId", a)) return !0
- // } else if (inList(blockedList, "clientId", b)) return !0;
- // return !1
- }
- $(function () {
- // $('<ul class="chat-nav nav navbar-nav" style="position: absolute;left: 190px;font-size: 17px;display: none;margin:0;"><li class="pull-left" title="Settings"><a data-target="#chatSettings_modal" data-toggle="modal" style="padding: 14px 0px 14px 15px; cursor:pointer;"><span class="icon icon-cog"></span></a></li><li class="pull-left" title="Chat Rooms"><a data-target="#roomsList_modal" style="padding: 14px 0px 14px 15px; font-size:18px; cursor:pointer;" data-toggle="modal"><span class="icon icon-chat"></span></a></li></ul>').insertAfter(".navbar-header > a");
- // $("body").on("shown.bs.tab", '#userListingType a[data-toggle="tab"]', function(a) {
- // $("#user_action_slider").hide();
- // "#users" == $(a.target).data("target") ? usersListTitleChange(roomUserLists[$(".userList div.active").data("roomid")].items.length, $(".userList div.active").data("roomname")) : "#viewers" == $(a.target).data("target") ? usersListTitleChange($(viewersList.listContainer).find(".emptyList").hasClass("hidden") ? viewersList.items.length : 0, "Viewers") : "#blocked" == $(a.target).data("target") && usersListTitleChange(0, "Blocked")
- // });
- // $("body").on("click", "[data-ulitem]", function(a) {
- // a.preventDefault();
- // userActions($("#user_action_slider"), $(a.currentTarget), !1)
- // });
- // $("#user_action_slider .close").on("click", function() {
- // $("#user_action_slider").hide()
- // })
- });
- function findUser(a) {
- // for (var b in roomUserLists)
- // if (roomUserLists.hasOwnProperty(b)) {
- // var c = roomUserLists[b].get("sid", a);
- // if (c.length) return {
- // item: c[0].values(),
- // roomId: b
- // }
- // } return !1
- }
- function userActions(a, b, c) {
- // a.find(".roomKick, .roomBan, .viewProfile, .inviteView, .inviteRoom").hide();
- // var f = b.data("clientid"),
- // e = b.data("siteid"),
- // d = inList(roomUserLists[$(".userList div.active").data("roomid")], "sid", socket.id),
- // g = {};
- // b = b.data("sid");
- // var h = inList(roomUserLists[$(".userList div.active").data("roomid")], "sid", b);
- // if (isBlocked(e, f)) a.data("clientid", f), a.data("siteid", e), a.find(".panel-profile-img").attr("src", "/sites/default/files/global/images/default_profile.png"), a.find(".overlayBtns2 li").data("ulmenu", "").addClass("disableUlitemMenu"), a.find(".blockUnblock a").data("ulmenu", "unblock").text("Unblock this person");
- // else {
- // if (b == socket.id || !1 === d) return;
- // if (!1 === h) {
- // g = findUser(b);
- // if (!1 === g) return;
- // h = g.item
- // } else g.roomId = $(".userList div.active").data("roomid");
- // a.find(".panel-profile-img").attr("src", h.profileImg);
- // a.find(".panel-badge").attr("src", h.userLevelIcon);
- // a.find(".bio").html("");
- // h.cam.startsWith("99_") ? a.find(".view").data("ulmenu", "").addClass("disableUlitemMenu") : a.find(".view").data("ulmenu", "view").removeClass("disableUlitemMenu");
- // a.find(".message").data("ulmenu", "message").removeClass("disableUlitemMenu");
- // a.find(".poke").data("ulmenu", "poke").removeClass("disableUlitemMenu");
- // a.find(".report").data("ulmenu", "report").removeClass("disableUlitemMenu");
- // "verified" == d.badge && (d.cam.startsWith("0_") || d.cam.startsWith("1_")) && a.find(".inviteView").data("ulmenu", "inviteview").show();
- // for (var k in roomUserLists)
- // if (roomUserLists.hasOwnProperty(k) && (f = roomUserLists[k].get("siteId", d.siteId), f.length && "" !== f[0].values().modIcon)) {
- // a.find(".inviteRoom").data("ulmenu", "inviteroom").show();
- // break
- // } $('a[data-target="#users"]').parents("li").hasClass("active") && "" === h.modIcon && "" !== d.modIcon && a.find(".roomKick, .roomBan").show();
- // a.find(".blockUnblock a").data("ulmenu", "block").text("Block this person");
- // a.data("sid", b);
- // a.data("roomid", g.roomId)
- // }
- // a.find(".name").html(h.name);
- // "guest" != h.badge && a.find(".viewProfile").show();
- // "guest" == d.badge && (a.find(".blockUnblock").hide(), a.find(".poke").data("ulmenu", "").addClass("disableUlitemMenu"));
- // c ? a.modal("show") : a.show()
- }
- function userListAdd(a, b, c) {
- // $(b.listContainer).find(".emptyList").addClass("hidden");
- // var f = "",
- // e = "",
- // d = "",
- // g = "";
- // if ("blocked" == a) f = '<strong title="' + c.name + '">' + c.name + "</strong>", e = void 0 == c.uid ? c.siteId : c.uid, b.add({
- // siteId: e,
- // name: e ? '<a href="/' + c.name + '" target="_blank">' + f + "</a>" : f,
- // clientId: c.clientId
- // });
- // else {
- // isBlocked(c.siteId, c.clientId) && (e = '<span class="icon icon-block"></span>');
- // 0 !== c.idle && (f = '<svg viewBox="0 0 1000 1000" height="10" width="10" style="margin-top: 8px;margin-left: -9px; position:absolute;"><circle cx="500" cy="500" r="480" fill="#ffffff"></circle><path d="M500,10C229.8,10,10,229.8,10,500c0,270.2,219.8,490,490,490c270.2,0,490-219.8,490-490C990,229.8,770.2,10,500,10L500,10zM500,906.3C276,906.3,93.7,724,93.7,500C93.7,276,276,93.7,500,93.7C724,93.7,906.3,276,906.3,500C906.3,724,724,906.3,500,906.3L500,906.3z M325.3,500c-19.4,0-35.1,15.6-35.1,35s15.7,35,35.1,35h210c19.4,0,35-15.6,35-35V255.1c0-19.4-15.6-35.1-35-35.1c-19.4,0-35,15.7-35,35.1V500L325.3,500L325.3,500z" fill="#5e92c4"></path></svg>');
- // !0 === c.isMod && (d = '<span class="icon icon-star"></span>');
- // switch (c.cam) {
- // case 99:
- // g = '<span class="icon icon-video-camera off"></span>';
- // break;
- // case 0:
- // g = '<span class="icon icon-video-camera"></span>';
- // break;
- // case 1:
- // g = '<span class="icon icon-video-camera"></span><span class="icon icon-lock"></span>'
- // }
- // b.add({
- // sid: c.sid,
- // siteId: c.siteId,
- // clientId: c.clientId,
- // name: c.name,
- // gender: c.gender,
- // badge: c.badge,
- // countryCode: c.countryCode,
- // cam: c.cam + "_" + c.name,
- // idle: c.idle,
- // camIcon: g,
- // modIcon: d,
- // idleIcon: f,
- // blockedIcon: e,
- // genderIcon: "/sites/all/modules/avc/avc_ui/images/genders/" +
- // c.gender + ".png",
- // countryCodeIcon: "/sites/all/modules/avc/avc_ui/images/flags/" + c.countryCode + ".svg",
- // userLevelIcon: "/sites/default/files/badges/" + c.badge + ".png",
- // profileImg: c.profileImg,
- // self: socket.id == c.sid ? !0 : !1
- // })
- // }
- // "users" == a && $('a[data-target="#users"]').parent("li").hasClass("active") ? usersListTitleChange(roomUserLists[$(".userList div.active").data("roomid")].items.length, $(".userList div.active").data("roomname")) : $('a[data-target="#' + a + '"]').parent("li").hasClass("active") && usersListTitleChange(b.items.length, a.charAt(0).toUpperCase() + a.slice(1))
- }
- function userListRemove(a, b, c) {
- // "blocked" == a ? c.siteId ? b.remove("siteId", c.siteId) : b.remove("clientId", c.clientId) : b.remove("sid", c.sid);
- // 0 === b.items.length && $(b.listContainer).find(".emptyList").removeClass("hidden");
- // "users" == a && $('a[data-target="#users"]').parent("li").hasClass("active") ? usersListTitleChange(roomUserLists[$(".userList div.active").data("roomid")].items.length, $(".userList div.active").data("roomname")) : $('a[data-target="#' + a + '"]').parent("li").hasClass("active") && usersListTitleChange(b.items.length, a.charAt(0).toUpperCase() + a.slice(1))
- }
- function populateUserList(a, b, c) {
- // void 0 !== roomUserLists[b] && roomUserLists[b].clear();
- // var f = 0;
- // roomUserLists[b] = new List("ul_" + b, newListOptions);
- // roomUserLists[b].on("searchComplete", function(a) {
- // a.matchingItems.length || $(a.list).html('<div class="p-a text-muted text-center">No results found.</div>')
- // });
- // Object.keys(a).forEach(function(c) {
- // f++;
- // userListAdd("users", roomUserLists[b], a[c])
- // });
- // $('a[data-target="#users"]').parents("li").hasClass("active") && usersListTitleChange(f, c)
- }
- function usersListTitleChange(a, b) {
- // null === b ? $("#ul-title").html($("#ul-title").text().replace(/\((.+?)\)/g, "(" + a + ")")) : $("#ul-title").html("(" + a + ") " + b)
- }
- var blockListOpts = {
- valueNames: ["name", {
- name: "siteId",
- attr: "data-siteid"
- }, {
- name: "clientId",
- attr: "data-clientid"
- }],
- item: '<div style="padding-bottom: 5px;"><div class="media-body" style="padding-top: 5px;"><span class="name" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 150px; display: inline-block;"></span><a class="btn btn-default-outline btn-xs btn-pill pull-right siteId clientId removeBlock">Remove</a></div></div>'
- },
- newListOptions = {
- valueNames: ["name", "gender", "idleIcon", "blockedIcon", "idle", "countryCode", "cam", "camIcon", "modIcon", "profileImg", {
- data: ["sid", "siteId", "self", "clientId"]
- }, {
- name: "link",
- attr: "href"
- }, {
- name: "genderIcon",
- attr: "src"
- }, {
- name: "countryCodeIcon",
- attr: "src"
- }, {
- name: "userLevelIcon",
- attr: "src"
- }],
- item: '<a data-target="#user_options" class="list-group-item cur-pointer" data-ulitem=""><ul class="avatar-list m-a-0"><li class="avatar-list-item" style="width: auto;"><img class="userLevelIcon img-circle" style="width:14px; height:14px; margin-top:-3px;"></li><li class="avatar-list-item" style="width: auto;"><img class="genderIcon" style="width:14px; height:14px; margin-top:-3px;"><span class="idleIcon"></span><span class="blockedIcon"></span></li><li class="avatar-list-item" style="width: auto;"><div class="countryCodeIcon-wrapper"><img class="countryCodeIcon" src=""></div></li><li class="avatar-list-item camIcon" style="width: auto;"><span class="icon icon-video-camera off"></span></li><li class="avatar-list-item name"></li><li class="avatar-list-item modIcon pull-right"></li></ul></a>',
- searchColumns: ["name"]
- };
- $(function () {
- // $("body").on("click", "a.list-group-item", function(a) {
- // $(this).blur();
- // $(this).data("section") && (a.preventDefault(), $(".modal-content.main").hide(), $(".modal-content." + $(this).data("section")).show())
- // });
- // $("body").on("click", ".section-close", function(a) {
- // $(this).parents(".modal-content").hide();
- // $(".modal-content.main").show()
- // });
- // $("body").on("click", ".removeBlock", function(a) {
- // $(this).data("siteid") ? blockList("unblock", {
- // siteId: $(this).data("siteid"),
- // clientId: null
- // }) : blockList("unblock", {
- // siteId: 0,
- // clientId: $(this).data("clientid")
- // })
- // });
- // $("body").on("click", "[data-ulmenu]", function(a) {
- // a.preventDefault();
- // if ("" !== $(this).data("ulmenu")) {
- // $("#user_action_slider").is(":visible") && $("#user_action_slider").hide();
- // a = $(this).data("ulmenu").toLowerCase();
- // var b = $(this).closest("[id^='user_action_']").data("sid"),
- // c = $(this).closest("[id^='user_action_']").data("clientid"),
- // f = $(this).closest("[id^='user_action_']").data("siteid"),
- // e = $(this).closest("[id^='user_action_']").data("roomid"),
- // d = inList(roomUserLists[e], "sid", b);
- // b = inList(roomUserLists[e], "sid", socket.id);
- // if (!1 === d && "unblock" != a) notifyUser("User action (" + a + ") has failed, this person may have left the chat by now.");
- // else switch (a) {
- // case "profile":
- // 0 === d.siteId ? notifyUser("This user is not signed in to Epikchat.com") : window.open("/" + d.name);
- // break;
- // case "view":
- // sendViewRequest(d.sid, d.cam);
- // break;
- // case "poke":
- // pokeUser(e, d.sid, d.name);
- // break;
- // case "message":
- // "member" == b.badge || "guest" == b.badge ? notifyUser("You must be a verified member to initiate private messages. <a href='/verify' target='_blank'>Get verified</a>") : $('a[data-target="#ct_' + d.sid + '"]').length ? $('a[data-target="#ct_' + d.sid + '"]').click() : (newChatTab("#ct_" + d.sid, e, d.sid, d.name, d.sid), addToChatArea(d.sid, '<div style="background-color:#f0f8ff; margin: 0;"><strong>Private chat with: ' + d.name + "</strong></div>"), $('a[data-target="#ct_' + d.sid + '"]').tab("show"), $('a.btn[data-dest="all"]').children(".chat-tabs-closer").css("visibility", "visible"), $(".emojionearea-editor").focus());
- // break;
- // case "inviteview":
- // inviteUser("view", e, d.sid, d.name, "");
- // break;
- // case "inviteroom":
- // $("#inviteroom_modal").find("select").html("");
- // $("#inviteroom_modal").find("#inviteroom_roomId").val(e);
- // $("#inviteroom_modal").find("#inviteroom_sid").val(d.sid);
- // $("#inviteroom_modal").find("#inviteroom_name").val(d.name);
- // for (var g in roomUserLists) roomUserLists.hasOwnProperty(g) && (a = roomUserLists[g].get("siteId", b.siteId), a.length && "" !== a[0].values().modIcon && $("#inviteroom_modal").find("select").append($("<option>", {
- // value: g,
- // text: $('#ctabs a[data-target="#ct_' + g + ", #ul_" + g + '"]').find("strong").text()
- // })));
- // $("#inviteroom_modal").modal("show");
- // break;
- // case "kick":
- // kickUserFromRoom(e, d.sid);
- // break;
- // case "ban":
- // banUserFromRoom(e, d.sid);
- // break;
- // case "report":
- // $("#reportUser_modal .modal-title").html("Report " + d.name);
- // $("#report_sid").val(d.sid);
- // $("#report_roomid").val(e);
- // $("#reportUser_modal .sug_ban_link").html('<small>You can also <a href="' + d.sid + '" data-name="' + d.name + '" id="suggest_ban">suggest a ban</a> of this user.</small>');
- // $("#reportUser_modal").modal("show");
- // break;
- // case "block":
- // blockList("block", {
- // sid: d.sid,
- // siteId: d.siteId,
- // clientId: d.clientId,
- // name: d.name + (d.siteId ? "" : " (guest)")
- // });
- // break;
- // case "unblock":
- // blockList("unblock", {
- // siteId: f,
- // clientId: c
- // })
- // }
- // }
- // })
- });
- $(function () {
- // idleInterval = setInterval(timerIncrement, 6E4);
- // $(window).bind("mousemove keydown", function() {
- // idleTime >= considerIdle && idleNow(!1);
- // idleTime = 0
- // })
- });
- function timerIncrement() {
- // idleTime++;
- // idleTime == considerIdle && idleNow(!0)
- }
- function idleNow(a) {
- // socket.emit("idle", {
- // isIdle: a
- // }, function(a) {
- // a.sent || console.log("Idle transmission error.")
- // })
- }
- $(function () {
- // $("body").on("input", "#optTextSize", function(a) {
- // $(".chat-text").css("font-size", $(this).val() + "px")
- // });
- // $("body").on("hidden.bs.modal", ".modal", function() {
- // $("a").blur()
- // });
- // $("div.checkbox input").change(function() {
- // $(this).blur()
- // });
- // $("#optEnableSidebar").change(function() {
- // $("#sidebar").toggleClass("hidden");
- // $("#optEnableSidebar").is(":checked") && socket.connected && getSidebarData()
- // });
- // $("#optStackBrdcsts").change(function() {
- // $("#broadcastSlots").toggleClass("stackBrdcsts")
- // });
- // $("#optDarkTheme").change(function() {
- // $("body").toggleClass("dark-theme")
- // });
- // $(".logo.navbar-btn").removeAttr("href").removeAttr("title")
- });
- $(window).focus(function () {
- // count = 0;
- // isActive = !0;
- // window.setTimeout(function() {
- // $(document).attr("title", "Chat | EpikChat")
- // }, 150)
- });
- $(window).blur(function () {
- // count = 0;
- // isActive = !1
- });
- window.onbeforeunload = function (a) {
- // if (leave_chat_warning && 0 < localTotal) return a.returnValue = "You have unread messages in open chat rooms or PMs."
- };
- function linkify(a) {
- // a = a.replace(/(\b(https?):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim, '<a href="$1" class="tcLink">$1</a>');
- // return a = a.replace(/(^|[^\/])(www\.[^.\s:]+\.[^.\s:]+(\b|$))/gim, '$1<a href="http://$2" class="tcLink">$2</a>')
- };;
- var logItemCount, logItemClicks = readCookie("cl_clicks"),
- isActive = !0,
- leave_chat_warning = !0,
- count = 0;
- function saveChatSettings() {
- // localStorage.setItem("chat_settings", JSON.stringify({
- // enableSidebar: $("#optEnableSidebar").is(":checked"),
- // stackBrdcsts: $("#optStackBrdcsts").is(":checked"),
- // enablePM: $("#optEnablePM").is(":checked"),
- // textSize: $("#optTextSize").val(),
- // soundsMsg: $("#optSoundsMsg").is(":checked"),
- // soundsPoke: $("#optSoundsPoke").is(":checked"),
- // soundsViewReq: $("#optSoundsViewReq").is(":checked"),
- // showJlMsgs: $("#optShowJlMsgs").is(":checked"),
- // textColor: $("#optTextColor").data("color"),
- // darkTheme: $("#optDarkTheme").is(":checked")
- // }))
- }
- $(function () {
- // var b = localStorage.getItem("chat_settings");
- // b && (b = JSON.parse(b), $("#optEnableSidebar").prop("checked", b.enableSidebar), $("#optStackBrdcsts").prop("checked", b.stackBrdcsts), $("#optEnablePM").prop("checked", b.enablePM), $("#optTextSize").val(b.textSize), $("#optSoundsMsg").prop("checked", b.soundsMsg), $("#optSoundsPoke").prop("checked", b.soundsPoke), $("#optSoundsViewReq").prop("checked", b.soundsViewReq), $("#optShowJlMsgs").prop("checked", b.showJlMsgs), $("#optDarkTheme").prop("checked", b.darkTheme), b.enableSidebar || $("#sidebar").addClass("hidden"), b.stackBrdcsts && $("#broadcastSlots").addClass("stackBrdcsts"), b.textColor && $("#optTextColor").data("color", b.textColor), b.darkTheme && $("body").toggleClass("dark-theme"));
- // $("#optTextColor").css("background-color", $("#optTextColor").data("color"));
- // $('a[data-toggle="tab"]').on("shown.bs.tab", function(a) {
- // a = $(a.target).attr("href");
- // "#home-media-photos" == a ? $("#media-section-header-text").text("photos") : "#home-media-doodles" == a && $("#media-section-header-text").text("doodles")
- // });
- // $("#createDoodleModal").draggable({
- // handle: ".modal-header",
- // containment: "body"
- // });
- // $("#wPaint").wPaint({
- // path: "/sites/all/modules/avc/avc_ui/js/wPaint/",
- // bg: "#ffffff",
- // menuOffsetLeft: -3,
- // menuOffsetTop: 240,
- // saveImg: saveImg,
- // menuHandle: !1,
- // mode: "pencil",
- // lineWidth: "3",
- // fillStyle: "#2187D8",
- // strokeStyle: "#15C223",
- // onShapeMove: function(a) {
- // $(".uploadDoodle").addClass("btn-success");
- // $(".uploadDoodle").prop("disabled", !1)
- // }
- // });
- // $("body").on("click", ".minimize", function() {
- // $(this).parent().siblings(".modal-body").hide();
- // $(this).parent().parent().parent().parent().css("height", "42px");
- // $(this).addClass("maximize");
- // $(this).removeClass("minimize");
- // $(this).blur()
- // });
- // $("body").on("click", ".maximize", function() {
- // $(this).parent().siblings(".modal-body").show();
- // $(this).parent().parent().parent().parent().css("height", $(this).parent().parent().parent().css("height"));
- // $(this).addClass("minimize");
- // $(this).removeClass("maximize");
- // $(this).blur()
- // });
- // $("body").on("click", ".sbMediaItem", function() {
- // viewMedia($(this).data("url"))
- // });
- // $("body").on("click", ".sbTrendingItem", function() {
- // roomInfo($(this).data("roomid"))
- // });
- // $("body").on("click", "#uploadDoodle", function() {
- // $("#uploadDoodle").prop("disabled", !0);
- // $.ajax({
- // type: "POST",
- // url: "/user_media/doodle/post",
- // data: {
- // title: $("#doodleTitle").val(),
- // doodle: $("#wPaint").wPaint("image")
- // },
- // dataType: "json",
- // success: function(a) {
- // !0 === a.status ? ($("#doodleSuccess").show(), $("#wPaint").wPaint("clear"), $("#doodleTitle").val("")) : (alertPopup("Error", a.message, "Ok", !1, !1, ""), $("#uploadDoodle").prop("disabled", !1))
- // }
- // })
- // })
- });
- function roomInfo(b) {
- // if (!b) return !1;
- // socket.emit("getRoomInfo", {
- // roomId: b
- // }, function(a) {
- // if (a.status) {
- // var c = "" === a.room.coverImg ? "no_coverImg.jpg" : a.room.coverImg,
- // d = "" === a.room.icon ? "no_icon.png" : a.room.icon;
- // $("#roomInfoModal").find(".panel-heading").css("background-image", "url(/sites/default/files/chat/room_coverImg_uploads/" + c + ")");
- // $("#roomInfoModal").find(".panel-profile-img").attr("src", "/sites/default/files/chat/room_icon_uploads/" + d);
- // $("#roomInfoModal").find(".panel-title").html(a.room.name);
- // $("#roomInfoModal").find("p").html(a.room.description);
- // $("#roomInfoModal").find("button.roomInfo").data("roomid", b).data("passworded", a.room.passworded);
- // $("#roomInfoModal").find(".usersCount").html(a.room.users);
- // $("#roomInfoModal").find(".modal-title").html(a.room.name);
- // $("#roomInfoModal").modal("show")
- // } else notifyUser("Error: " + a.message)
- // })
- }
- function createDoodle() {
- // if ($("#createDoodleModal").hasClass("in")) return !1;
- // if (socket.userData.siteId) $("#doodleSuccess").hide(), $("#createDoodleModal").modal("show");
- // else return alertPopup("Error", 'You must be logged in to create new doodles.<br><a href="/user/login" target="_blank">Log in</a> or <a href="/user/register" target="_blank">Create an account</a>', "Ok", !0, !1, ""), !1
- }
- function uploadPhoto() {
- // if ($("#uploadPhotoModal").hasClass("in")) return !1;
- // if (socket.userData.siteId) $("#upload-photo-content").html(""), $(".indicator").show(), $("#uploadPhotoModal").modal("show"), $("#upload-photo-content").load("https://www.epikchat.com/developer/photos/new/js", function(b, a, c) {
- // "success" == a ? ($(".indicator").hide(), $("#upload-photo-content").show()) : "error" == a && ($(".indicator").hide(), msg = "403" == c.status ? 'You must be logged in to upload photos.<br><a href="/user/login" target="_blank">Log in</a> or <a href="/user/register" target="_blank">Create an account</a>' : "An unexpected error has occured: " + c.statusText + "(" + c.status + ")", $("#upload-photo-content").html('<div class="modal-header" style="padding: 0px 0px 6px 0px;border: none;"><div class="media-body text-center"><br><strong>' + msg + "</strong></div></div>"));
- // $("#upload-photo-content").show()
- // });
- // else return alertPopup("Error", 'You must be logged in to upload photos.<br><a href="/user/login" target="_blank">Log in</a> or <a href="/user/register" target="_blank">Create an account</a>', "Ok", !0, !1, ""), !1
- }
- function saveImg(b) {
- // var a = new Date,
- // c = a.getDate(),
- // d = a.getMonth() + 1;
- // a = a.getFullYear();
- // c = d + "_" + c + "_" + a;
- // d = document.createElement("a");
- // d.href = b;
- // d.download = "My_EpikChat_Doodle_" + c + ".jpg";
- // document.body.appendChild(d);
- // d.click();
- // this._displayStatus("Image saved.")
- };;
- function initSocket() {
- document.getElementById('initialiser').style.display = "none";
- document.getElementById('menu').innerHTML =
- "<div style='background:white; border-radius:5px; padding:0px 5px 5px 5px;'>" +
- " <center><h3>EPIK MENU</h3></center>" +
- " <a href='#' id='parrot' onclick='(doubleNotif = !doubleNotif)' class='btn btn-success' style='width:100%;'>PARROT [false]</a>" +
- " <a href='#' id='poke' onclick='(autoPoke = !autoPoke)' class='btn btn-success' style='width:100%;'>AUTO POKE [false]</a>" +
- " <a href='#' id='contentlength' onclick='showContentLength(); (lengthdisplay = !lengthdisplay)' class='btn btn-success' style='width:100%;'>SHOW LENGTH [false]</a>" +
- " <div class='dropdown'>" +
- " <button style='width:100%' class='btn btn-primary dropdown-toggle' data-toggle='dropdown' aria-expanded='false' type='button'>Zalgo Editor/Help</button>" +
- " <div style='padding:10px 10px 10px 10px; background:lightgrey;' class='dropdown-menu' role='menu'>" +
- " <p class='dropdown-item' role='presentation'>" +
- " <fieldset style='margin:3px 3px 3px 3px; background:white; border-radius:5px;'><center>" +
- " <h4>INK TEXT</h4>" +
- " <input id='asmodeus_opt_up' type='checkbox'> INK UP</input><br>" +
- " <input id='asmodeus_opt_mid' type='checkbox' checked=''> INK MIDDLE</input><br>" +
- " <input id='asmodeus_opt_down' type='checkbox'> INK DOWN</input></center>" +
- " </fieldset>" +
- " <fieldset style='margin:3px 3px 3px 3px; background:white; border-radius:5px;'><center>" +
- " <h4>INK WEIGHT</h4>" +
- " <input id='asmodeus_opt_mini' type='radio' name='optval' checked=''> LIGHT INK</input><br>" +
- " <input id='asmodeus_opt_normal' type='radio' name='optval'> HEAVY INK</input><br>" +
- " <input id='asmodeus_opt_maxi' type='radio' name='optval'> MAX INK</input></center>" +
- " </fieldset>" +
- " </p>" +
- " <center>Press # to Zalgo your Text</center>" +
- " </div>" +
- " </div>" +
- "</div>";
- socket.on("poke", function (a) {
- if (autoPoke === true) {
- pokeUser(a.roomId, a.senderSiteId, a.senderName);
- !1 === isBlocked(a.senderSiteId, a.senderClientId) && (addToChatArea(a.roomId, '<div class="notification"><span style="flex: 1; -ms-flex: 1;"><div class="pull-left bubble poke">😎 You poked back</div></span><span class="time-box pull-right text-right disable-select"><small>' + "" + "</small></span></div>"), notificationSound("Poke"))
- }
- });
- socket.on("connect", function () {
- // $("#loading-overlay").is(":visible") ? (console.log("Connected"), $(".loadingInfo").html("")) : (console.log("Reconnected"), $("#alert_modal").modal("hide"), notifyUser("You have reconnected to the chat."))
- });
- socket.on("connect_error", function (a) {
- // console.log("Connect failed (" + a + ")");
- // $("#loading-overlay").is(":visible") && $(".loadingInfo").html('<p>The connection is taking longer than usual.</p><p>See the <a href="https://status.epikchat.com" target="_blank">status page</a> for information on any known issues.</p>')
- });
- socket.on("reconnect_attempt", function (a) {
- // console.log("Connecting..");
- // $("#alert_modal .modal-body").html("The connection to the chat was interrupted. Attempting to reconnect...<br><br>Connection attempt: " + a)
- });
- socket.on("connectionAccepted", function (a) {
- // console.log("Log on successful (" + socket.id + ")");
- // socket.userData = a.userData;
- // idleTime = 0;
- // viewersList ? (viewersList.clear(), $("#ul_viewers .emptyList").removeClass("hidden")) : (viewersList = new List("ul_viewers", newListOptions), viewersList.on("searchComplete", function(a) {
- // !a.matchingItems.length && 0 < viewersList.size() && $(a.list).html('<div class="p-a text-muted text-center">No results found.</div>')
- // }));
- // if (blockedList)
- // for (a = 0; a < blockedList.items.length; a++) 0 !== blockedList.items[a]._values.siteId && blockedList.remove("siteId", blockedList.items[a]._values.siteId);
- // else blockedList = new List("ul_blocked", blockListOpts), blockedList.on("searchComplete", function(a) {
- // !a.matchingItems.length && 0 < blockedList.size() && $(a.list).html('<div class="p-a text-muted text-center">No results found.</div>')
- // });
- // blockList("list", null);
- // $("#username").text(socket.userData.name);
- // $("#profileImg").attr("src", socket.userData.profileImg);
- // $("#badge").attr("src", "/sites/default/files/badges/" + socket.userData.badge + ".png");
- // $(".chat-nav").show();
- // var b = $(".chat-tabs li").length ? $('.chat-tabs a[data-dest="all"]').map(function() {
- // return $(this).data("roomid")
- // }).get() : Drupal.settings.avc_ui.autoJoin.toString().split(",");
- // for (a = 0; a < b.length; a++) joinRoom(b[a], "");
- // $("#loading-overlay").is(":visible") && (getSidebarData(), setInterval(function() {
- // $("#optEnableSidebar").is(":checked") && socket.connected && getSidebarData()
- // }, 1E4), $("#loading-overlay").fadeOut(), $("#optEnablePM").is(":checked") || setTimeout(function() {
- // notifyUser('<span class="icon icon-info-with-circle pull-left" style="font-size: 16px;margin-right: 7px;height: 20px;"></span> You have private message receiving turned off, people will not be able to send you private messages. You can change this in your <a data-target="#chatSettings_modal" data-toggle="modal" href="">settings</a>.', !1, 2E4)
- // }, 2E3))
- });
- socket.on("systemAnnouncement", function (a) {
- // alertPopup("System Announcement", a.message, "Ok", !1, !1, "")
- });
- socket.on("invite", function (a) {
- // if (!1 === isBlocked(a.senderSiteId, a.senderClientId)) switch (a.type) {
- // case "view":
- // addToChatArea(a.roomId, '<div class="notification"><span style="flex: 1; -ms-flex: 1;"><div class="pull-left bubble invite">' + a.senderName + ' has invited you to <a class="viewInvite cur-pointer" data-sid="' + a.sid + '" data-cam="' + a.cam + '">view their broadcast</a></div></span><span class="time-box pull-right text-right disable-select"><small>' + convertTimestamp(Date.now()) + "</small></span></div>");
- // break;
- // case "room":
- // addToChatArea(a.roomId, '<div class="notification"><span style="flex: 1; -ms-flex: 1;"><div class="pull-left bubble invite">' + a.senderName + ' has invited you to <a class="roomInvite cur-pointer" data-roomid="' + a.invitedRoomId + '" data-passworded="' + a.passworded + '">join room ' + a.invitedRoomName + '</a></div></span><span class="time-box pull-right text-right disable-select"><small>' + convertTimestamp(Date.now()) + "</small></span></div>")
- // }
- });
- socket.on("viewRequest", function (a) {
- // !1 === isBlocked(a.siteId, a.clientId) ? $("#privateBroadcast").is(":checked") ? (notifyUser(a.msg + '<span class="viewOptions pull-right"><a href="#" class="btn btn-sm" onClick="javascript:sendViewResponse(\'' + a.viewer + "', true);$(this).parent('span').html('<small>Permission Granted<small>');return false;\">Accept</a> <a href=\"#\" class=\"btn btn-sm\" onClick=\"javascript:sendViewResponse('" + a.viewer + "', false);$(this).parent('span').html('<small>Permission Denied<small>');return false;\">Deny</a></span><div class=\"spacer\" style=\"clear: both;\"></div></small>"), notificationSound("ViewReq")) : sendViewResponse(a.viewer, !0) : sendViewResponse(a.viewer, !1)
- });
- socket.on("viewResponse", function (a) {
- // a.canView ? startViewing(a.sid, a.name) : notifyUser(a.msg)
- });
- socket.on("viewer", function (a) {
- // "start" == a.action ? (userListAdd("viewers", viewersList, a.user), viewersList.sort("cam", {
- // order: "asc"
- // })) : "stop" == a.action && userListRemove("viewers", viewersList, a.user);
- // $("#viewersCount").text(viewersList.items.length)
- });
- socket.on("vote2ban", function (a) {
- // notifyUser("<strong>Community Vote</strong><br>Would you like to ban: " +
- // a.nominated.name + "<br><small>Started by: " + a.nominator.name + '<span class="voteOptions pull-right"><a href="#" class="btn btn-sm" onClick="javascript:voteForBan(1, \'yes\')">Yes</a> <a href="#" class="btn btn-sm" onClick="javascript:voteForBan(1, \'no\')">No</a></span></small>')
- });
- socket.on("userKicked", function (a) {
- // a.user.sid == socket.id ? (closeChatTab(a.roomId, !0), notifyUser("You were kicked from room: " + a.roomName, !0)) : addToChatArea(a.roomId, '<div class="notification kick"><span style="flex: 1; -ms-flex: 1;">' +
- // a.user.name + " was kicked out of the room by " + a.kickedBy + '</span><span class="time-box pull-right text-right disable-select"><small>' + convertTimestamp(Date.now()) + "</small></span></div>")
- });
- socket.on("userBanned", function (a) {
- // if (a.user.sid == socket.id) {
- // closeChatTab(a.roomId, !0);
- // var b = "";
- // "Community Vote" == a.bannedBy && (b = " (10 minutes)");
- // notifyUser("You were banned from room: " + a.roomName + b, !0)
- // } else addToChatArea(a.roomId, '<div class="notification kick"><span style="flex: 1; -ms-flex: 1;">' + a.user.name +
- // " was banned by " + a.bannedBy + '</span><span class="time-box pull-right text-right disable-select"><small>' + convertTimestamp(Date.now()) + "</small></span></div>")
- });
- socket.on("textMessage", function (a) {
- if (doubleNotif === true) {
- sendChatMsg(processEmoji(linkify(a.msg)));
- }
- // if (!1 === isBlocked(a.senderSiteId, a.senderClientId)) {
- // if ("all" == a.dest) addToChatArea(a.roomId, '<div><span style="color:' + a.format.color + ';"><a data-target="#user_action_modal" data-sid="' + a.sid + '" data-siteid="' + a.senderSiteId + '" data-clientid="' + a.senderClientId + '" style="cursor:pointer;text-decoration:none; outline:none; color:' +
- // a.format.color + ';"><strong>' + a.senderName + ":</strong> </a><span>" + processEmoji(linkify(a.msg)) + '</span></span><span class="time-box pull-right text-right"><small>' + convertTimestamp(a.time) + "</small></span></div>"), a = $('.chat-tabs a[data-target="#ct_' + a.roomId + ", #ul_" + a.roomId + '"]');
- // else {
- // if (!$('a[data-target="#ct_' + a.dest + '"]').length) {
- // if (!$("#optEnablePM").is(":checked")) return !1;
- // newChatTab("#ct_" + a.dest, a.roomId, a.dest, a.senderName, a.dest);
- // addToChatArea(a.dest, '<div style="background-color:#f0f8ff; margin: 0;"><strong>Private chat with: ' +
- // a.senderName + "</strong></div>")
- // }
- // addToChatArea(a.dest, '<div><span style="color:' + a.format.color + ';"><a data-target="#user_action_modal" data-sid="' + a.sid + '" data-siteid="' + a.senderSiteId + '" data-clientid="' + a.senderClientId + '" style="cursor:pointer;text-decoration:none; outline:none; color:' + a.format.color + ';"><strong>' + a.senderName + ":</strong> </a><span>" + processEmoji(linkify(a.msg)) + '</span></span><span class="time-box pull-right text-right"><small>' + convertTimestamp(a.time) + "</small></span></div>");
- // a = $('.chat-tabs a[data-target="#ct_' + a.dest + '"]')
- // }
- // a.hasClass("active") ? (notificationSound("Msg"), onNewMessageReceivedInActiveTab()) : a.children(".num-container").length ? (missed = parseInt(a.children(".num-container").children(".num-circle").html()) + 1, 9 < missed && (missed = "9+"), a.children(".num-container").children(".num-circle").html(missed), a.children(".num-container").show()) : a.append('<span class="num-container"><span class="num-circle visible">1</span></span>')
- // }
- });
- socket.on("userJoin", function (a) {
- //sendChatMsg(a.user.name + " just entered the flippin chatroom :sunglasses:");
- // userListAdd("users", roomUserLists[a.roomId], a.user);
- // roomUserLists[a.roomId].sort("cam", {
- // order: "asc"
- // });
- // $("#optShowJlMsgs").is(":checked") && addToChatArea(a.roomId, '<div class="notification"><span style="flex: 1; -ms-flex: 1;"><div class="pull-left bubble">' + a.user.name + ' has entered the room</div></span><span class="time-box pull-right text-right disable-select"><small>' + convertTimestamp(Date.now()) + "</small></span></div>")
- });
- socket.on("userLeave", function (a) {
- // sendChatMsg(a.user + " Left the chat...");
- // userListRemove("users", roomUserLists[a.roomId], a.user);
- // $("#optShowJlMsgs").is(":checked") && addToChatArea(a.roomId, '<div class="notification"><span style="flex: 1; -ms-flex: 1;"><div class="pull-left bubble">' + a.user.name + ' has left the room</div></span><span class="time-box pull-right text-right disable-select"><small>' + convertTimestamp(Date.now()) + "</small></span></div>")
- });
- socket.on("liveStream", function (a) {
- // addToChatArea(a.roomId, '<div class="notification"><span style="flex: 1; -ms-flex: 1;"><a href="/' + a.user.name + '/live" target="_blank"><div class="pull-left bubble ls">' + a.user.name +
- // ' is live now! Click to watch the broadcast!</div></a></span><span class="time-box pull-right text-right disable-select"><small>' + convertTimestamp(Date.now()) + "</small></span></div>")
- });
- socket.on("userUpdate", function (a) {
- // var b = roomUserLists[a.roomId].get("sid", a.user.sid);
- // idleIcon = 0 !== a.user.idle ? '<svg viewBox="0 0 1000 1000" height="10" width="10" style="margin-top: 8px;margin-left: -9px; position:absolute;"><circle cx="500" cy="500" r="480" fill="#ffffff"></circle><path d="M500,10C229.8,10,10,229.8,10,500c0,270.2,219.8,490,490,490c270.2,0,490-219.8,490-490C990,229.8,770.2,10,500,10L500,10zM500,906.3C276,906.3,93.7,724,93.7,500C93.7,276,276,93.7,500,93.7C724,93.7,906.3,276,906.3,500C906.3,724,724,906.3,500,906.3L500,906.3z M325.3,500c-19.4,0-35.1,15.6-35.1,35s15.7,35,35.1,35h210c19.4,0,35-15.6,35-35V255.1c0-19.4-15.6-35.1-35-35.1c-19.4,0-35,15.7-35,35.1V500L325.3,500L325.3,500z" fill="#5e92c4"></path></svg>' : "";
- // switch (a.user.cam) {
- // case 99:
- // camIcon = '<span class="icon icon-video-camera off"></span>';
- // break;
- // case 0:
- // camIcon = '<span class="icon icon-video-camera"></span>';
- // break;
- // case 1:
- // camIcon = '<span class="icon icon-video-camera"></span><span class="icon icon-lock"></span>'
- // }
- // b[0].values({
- // idle: a.user.idle,
- // idleIcon: idleIcon,
- // cam: a.user.cam + "_" + b[0].values().name,
- // camIcon: camIcon
- // });
- // roomUserLists[a.roomId].sort("cam", {
- // order: "asc"
- // });
- // b = viewersList.get("sid", a.user.sid);
- // b.length && (b[0].values({
- // idle: a.user.idle,
- // idleIcon: idleIcon,
- // cam: a.user.cam + "_" + b[0].values().name,
- // camIcon: camIcon
- // }), viewersList.sort("cam", {
- // order: "asc"
- // }))
- });
- socket.on("editAdmins", function (a) {
- // var b = roomUserLists[a.roomId].get("siteId", a.siteId);
- // "add" == a.action ? (addToChatArea(a.roomId, '<div class="notification"><span style="flex: 1; -ms-flex: 1;"><div class="pull-left bubble">' + a.name + " has been promoted to " + a.type + " by " + a.actionBy + '</div></span><span class="time-box pull-right text-right disable-select"><small>' + convertTimestamp(Date.now()) + "</small></span></div>"), b.length && b[0].values({
- // modIcon: '<span class="icon icon-star"></span>'
- // })) : "remove" == a.action && (addToChatArea(a.roomId, '<div class="notification"><span style="flex: 1; -ms-flex: 1;"><div class="pull-left bubble">' + a.name + "'s " + a.type + " privileges have been revoked by " + a.actionBy + '</div></span><span class="time-box pull-right text-right disable-select"><small>' + convertTimestamp(Date.now()) + "</small></span></div>"), b.length && b[0].values({
- // modIcon: ""
- // }))
- });
- socket.on("sendReport", function (a) {
- // if (null !== webRtcPeerPresenter) {
- // var b = document.getElementById("broadcast"),
- // c = document.createElement("canvas");
- // c.width = b.videoWidth;
- // c.height = b.videoHeight;
- // c.getContext("2d").drawImage(b, 0, 0);
- // $.ajax({
- // url: "/sites/all/modules/avc/avc_ui/reportImgUpload.php",
- // method: "POST",
- // data: {
- // img: c.toDataURL("img/png"),
- // reportId: a.reportId
- // },
- // success: function(a) {}
- // })
- // }
- })
- console.log("Client Ready");
- }
- function joinRoom(a, b) {
- // console.log("Joining rid:" + a);
- // socket.emit("joinRoom", {
- // roomId: a,
- // password: b
- // }, function(c) {
- // !0 === c.joined ? (console.log("Joined rid:" + c.room.roomId), $("#userLists, #chatArea").css("visibility", "visible"), $('#ctabs a[data-roomid="' + c.room.roomId + '"][data-dest="all"]').length ? addToChatArea(a, '<div><small class="text-muted"><i>You have reconnected to the room.</i></small></div>') : (newChatTab("#ct_" + c.room.roomId + ", #ul_" + c.room.roomId, c.room.roomId, "all", c.room.name, c.room.roomId), $('a.btn[data-dest="all"]').children(".chat-tabs-closer").css("visibility", "visible"), c.room.msgHistory.length && Object.keys(c.room.msgHistory).forEach(function(a) {
- // historyText = c.room.msgHistory[a];
- // addToChatArea(c.room.roomId, '<div class="text-muted"><span><strong>' + historyText.senderName + ":</strong> <span>" + processEmoji(historyText.msg) + '</span></span><span class="time-box pull-right text-right disable-select"><small>' + convertTimestamp(historyText.time) + "</small></span></div>")
- // }), addToChatArea(c.room.roomId, '<div style="background-color:#f0f8ff; margin: 0;"><strong>You have entered room: ' +
- // c.room.name + "</strong></div>" + (c.room.welcomeMsg ? '<div style="background-color:#f0f8ff; margin: 0;">' + processEmoji(linkify(c.room.welcomeMsg)) + "</div>" : "")), $("#users > .tab-content").append('<div id="ul_' + c.room.roomId + '" data-roomid="' + c.room.roomId + '" data-roomName="' + c.room.name + '" class="tab-pane btn-group" style="width:100%; height:calc(100% - 30px);"><div class="list" style=" height: 100%; overflow-y: auto; "></div><div class="form-group has-feedback"><input type="text" class="search form-control input-sm" placeholder="Search" /></div></div>')), $('a[data-target="#ct_' + c.room.roomId + ", #ul_" + c.room.roomId + '"]').tab("show"), populateUserList(c.room.users, c.room.roomId, c.room.name), roomUserLists[c.room.roomId].sort("cam", {
- // order: "asc"
- // }), scrollToBottom($('.chat-text[data-id="' + c.room.roomId + '"]')), $(roomUserLists[a].listContainer).children(".list").removeClass("offline")) : (notifyUser(c.msg), console.log("Could not join rid:" + a + " (" + c.msg + ")"), $('#ctabs a[data-roomid="' + a + '"][data-dest="all"]').length && ($(roomUserLists[a].listContainer).children(".list").addClass("offline"), addToChatArea(a, '<div><small class="text-muted"><i>You have reconnected to the chat server but were unable to automatically rejoin this room.</i></small></div>')))
- // })
- }
- function leaveRoom(a, b) {
- // socket.emit("leaveRoom", {
- // roomId: a
- // }, function(a) {
- // !1 === a.left && console.warn(a.msg);
- // b()
- // })
- }
- function sendChatMsg(a) {
- // $tab = $(".chat-tabs .avatar-list-item.active a");
- // $("#message").val("");
- // $(".emojionearea-editor").length && $(".emojionearea-editor").html("");
- // socket.emit("distributeTextMessage", {
- // roomId: $tab.data("roomid"),
- // dest: $tab.data("dest"),
- // msg: a,
- // format: {
- // color: $("#optTextColor").data("color")
- // }
- // }, function(a) {
- // a.sent || ("all" == $tab.data("dest") ? addToChatArea($(".chat-tabs .avatar-list-item.active a").data("roomid"), '<div><small class="text-muted"><i>' + linkify(a.msg) + "</i></small></div>") : addToChatArea($(".chat-tabs .avatar-list-item.active a").data("dest"), '<div><small class="text-muted"><i>' + linkify(a.msg) + "</i></small></div>"))
- // })
- }
- function kickUserFromRoom(a, b) {
- // socket.emit("kickUserFromRoom", {
- // roomId: a,
- // sid: b
- // }, function(a) {
- // a.kicked || notifyUser("Server response error: " + a.msg)
- // })
- }
- function banUserFromRoom(a, b) {
- // socket.emit("banUserFromRoom", {
- // roomId: a,
- // sid: b
- // }, function(a) {
- // a.banned || notifyUser("Server response error: " + a.msg)
- // })
- }
- function pokeUser(a, b, c) {
- // socket.emit("poke", {
- // sid: b,
- // roomId: a
- // }, function(b) {
- // b.success ? (addToChatArea(a, '<div class="notification"><span style="flex: 1; -ms-flex: 1;"><div class="pull-left bubble poke">You have poked ' + c + '</div></span><span class="time-box pull-right text-right disable-select"><small>' + convertTimestamp(Date.now()) + "</small></span></div>"), notificationSound("Poke")) : notifyUser(b.message)
- // })
- }
- function inviteUser(a, b, c, d, e) {
- // socket.emit("invite", {
- // type: a,
- // roomId: b,
- // destination: c,
- // roomInvited: e
- // }, function(b) {
- // b.sent ? notifyUser("You sent a " + a + " invite to " + d) : notifyUser(b.msg)
- // })
- }
- function blockList(a, b) {
- // function c(a, b, c) {
- // for (d in roomUserLists) roomUserLists.hasOwnProperty(d) && (e = roomUserLists[d].get(a, b), e.length && Object.keys(e).forEach(function(a) {
- // e[a].values({
- // blockedIcon: c
- // })
- // }))
- // }
- // var d, e;
- // socket.emit("blockList", {
- // action: a,
- // user: b
- // }, function(e) {
- // if (e.status) switch (a) {
- // case "list":
- // 0 < e.list.length && e.list.map(function(a) {
- // userListAdd("blocked", blockedList, a)
- // });
- // break;
- // case "block":
- // userListAdd("blocked", blockedList, b);
- // b.siteId ? c("siteId", b.siteId, '<span class="icon icon-block"></span>') : c("clientId", b.clientId, '<span class="icon icon-block"></span>');
- // break;
- // case "unblock":
- // userListRemove("blocked", blockedList, b), b.siteId ? c("siteId", b.siteId, "") : c("clientId", b.clientId, "")
- // } else "list" == a ? $("#ul_blocked .emptyList").text("You must be logged in to access your block list") : notifyUser(e.msg)
- // })
- }
- function requestVote(a, b) {
- // socket.emit("requestVote", {
- // roomId: a,
- // nominated: b
- // }, function(a) {
- // a.sent ? notifyUser("<strong>Community Vote</strong><br>A vote to ban user: " + a.nominatedName + " has been started.") : notifyUser("An error occurred: " + a.msg)
- // })
- }
- function voteForBan(a, b) {
- // socket.emit("addVote", {
- // roomId: a,
- // vote: b
- // }, function(a) {
- // $(".voteOptions").html("Voted")
- // })
- }
- function reportUser(a, b, c, d) {
- // socket.emit("reportUser", {
- // roomId: a,
- // reported: b,
- // category: c,
- // details: d
- // }, function(a) {
- // a.sent ? notifyUser("Your report has been sent.") : notifyUser(a.message)
- // })
- }
- function roomsListRefresh() {
- // socket.emit("getRoomsList", function(a) {
- // var b = "",
- // c;
- // a.sort(function(a, b) {
- // return b.users - a.users
- // });
- // for (var d = 0; d < a.length; d++) {
- // room = a[d];
- // var e = c = "";
- // var f = room.icon ? room.icon : "no_icon.png";
- // room.closed ? (e = "span", c = '<li title="Room closed" data-toggle="tooltip" data-container=".media-list" style="font-size: 16px;color: #d83434; margin: -1px 7px;"><span class="icon icon-circle-with-cross"></span></li>') : (e = "a", 0 === room.user_level_restrictions[1] && (c = '<li title="No guest access" data-toggle="tooltip" data-container=".media-list" style="font-size: 15px;color: #FF9800; margin: -1px 7px;"><span class="icon icon-warning"></span></li>'), room.passworded && (c += '<li title="Password protected" data-toggle="tooltip" style="margin: -1px 7px;font-size:15px;" data-container=".media-list" ><span class="icon icon-lock"></span></li>'), c += '<li style="margin: 0px 7px;"><span class="icon icon-users"></span> ' + room.users + "</li>");
- // b += "<" + e + ' class="list-group-item cur-pointer" data-roomid="' + room.roomId + '" data-users="' + room.users + '" data-passworded="' + room.passworded + '"><div class="media"><span class="media-left"><img class="img-circle media-object" src="/sites/default/files/chat/room_icon_uploads/' +
- // f + '" style="width:42px;height:42px;"></span><div class="media-body" style="font-size:14px;"><div class="media-body"><div class="media-body-first">' + room.name + '</div><ul style="color: #676767;" class="nav nav-pills pull-right">' + c + '</ul></div><div class="media-body-secondary">' + room.description + "</div></div></div></" + e + ">"
- // }
- // $(".roomspicker").html(b);
- // $('[data-toggle="tooltip"]').tooltip();
- // $("#showEmpty").is(":checked") ? $(".roomspicker > a[data-users=0]").show() : $(".roomspicker > a[data-users=0]").hide();
- // $("#roomsList_modal").find("h4.modal-title").text("Rooms (" + a.length + ")")
- // })
- }
- function getSidebarData() {
- // socket.emit("getSidebarData", function(a) {
- // var b = [];
- // a.roomList.sort(function(a, b) {
- // return b.users - a.users
- // });
- // $.each(a.roomList, function(a, c) {
- // c.systemRoom || (icon = c.icon ? c.icon : "no_icon.png", b.push('<a class="list-item sbTrendingItem cur-pointer" data-roomid="' + c.roomId + '"><div class="media"><span class="media-left" style="padding-right: 7px;"><img class="img-circle media-object" style="height:32px; width:32px;" src="/sites/default/files/chat/room_icon_uploads/' + icon + '"></span><div class="media-body" style="vertical-align: middle;"><div style="margin-top: -2px;max-width: 130px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">' +
- // c.name + '</div><div class="text-muted" style="margin-top: -3px;font-size: 11px;"><span style="font-size: 11px;" class="icon icon-users"></span><span style="margin-top: -6px;"> ' + c.users + "</span></div></div></div></a>"))
- // });
- // $("#home-trending").html(b.slice(0, 5));
- // var c = [];
- // $.each(a.popularList, function(a, b) {
- // 0 === a ? c.push('<div style="display: block; padding: 4px 10px; color: #555; text-decoration: none;font-weight: 500;"><div class="media"><div class="media-body" style="vertical-align: middle;"><svg width="16" height="16" viewBox="2 -8 28 28" class="pull-left"><path d="M5 19h14v3h-14v-3zm18-11c-.729 0-1.295.79-.832 1.521-1.229 1.474-3.371 2.971-4.355 2.438-1.201-.65-.277-3.302.451-4.982.958.15 1.736-.591 1.736-1.477 0-.829-.672-1.5-1.5-1.5s-1.5.671-1.5 1.5c0 .452.204.853.52 1.127-.645 1.643-2.325 3.807-3.41 3.591-1.347-.268-1.69-3.448-1.685-5.287.62-.183 1.075-.751 1.075-1.431 0-.829-.672-1.5-1.5-1.5s-1.5.671-1.5 1.5c0 .68.455 1.248 1.075 1.432.006 1.839-.338 5.019-1.685 5.287-1.084.216-2.765-1.949-3.41-3.592.316-.274.52-.675.52-1.127 0-.829-.672-1.5-1.5-1.5s-1.5.671-1.5 1.5c0 .886.778 1.627 1.736 1.476.729 1.681 1.652 4.333.451 4.982-.984.533-3.127-.964-4.355-2.438.463-.73-.103-1.52-.832-1.52-.553 0-1 .448-1 1 0 .704.726 1.221 1.413.905 1.134 1.264 3.335 4.242 3.587 7.095h14c.252-2.853 2.453-5.831 3.587-7.095.687.316 1.413-.201 1.413-.905 0-.552-.447-1-1-1z" fill="#de1616" transform="rotate(-15)"></path></svg><span class="popListUn">' +
- // b.name + '</span><span class="pull-right" style=" border-radius: 4px; width: 30px;text-align: center;"><b>' + b.viewers + "</b></span></div></div></div>") : c.push('<div style="display: block; padding: 4px 10px; color: #555; text-decoration: none;font-weight: 500;"><div class="media"><div class="media-body" style="vertical-align: middle;"><span class="popListUn">' + b.name + '</span><span class="pull-right" style=" border-radius: 4px; width: 30px;text-align: center;"><b>' + b.viewers + "</b></span></div></div></div>")
- // });
- // $("#home-popular").html(c);
- // var d = [];
- // socket.userData.siteId ? a.onlineFriends ? $.each(a.onlineFriends, function(a, b) {
- // "online" == b.status && (onlineStatus = '<span class="status-online"></span>');
- // "broadcasting" == b.status && (onlineStatus = '<span class="icon icon-video-camera pull-right" style="color: #1BBD1B;margin-top: -1px;">');
- // d.push('<a href="/' + b.username + '" target="_blank" class="list-item"><div class="media"><span class="media-left" style="padding-right: 7px;"><img class="img-circle media-object" style="height:32px; width:32px;" src="' +
- // b.img + '"></span><div class="media-body" style="vertical-align: middle;">' + b.username + '<span class="pull-right">' + onlineStatus + "</span></div></div></a>")
- // }) : d.push('<div class="p-a text-center"><br><span class="icon icon-emoji-sad" style="font-size: 41px;color: #b5b5b5;"></span><br><small>No one seems to be online at the moment</small></div>') : d.push('<br><center><a href="/user/login" target="_blank" class="m-a-md"><small>Login to see who\'s online</small></a></center>');
- // $("#friendsList").html(d);
- // $.each(a.media, function(a, b) {
- // var c = [],
- // e = [];
- // $.each(b, function(b, d) {
- // e.push('<a class="sbMediaItem cur-pointer" data-url="/' + d.name.toLowerCase() + "/" + a + "/" + d.mid + '"><img src="/sites/default/files/media/' + d.uri + '" width="41" height="41" style="margin: 2px; border-radius: 5px; background: white; border: 1px solid rgba(0, 0, 0, .1);"></a>');
- // c.push('<a class="sbMediaItem cur-pointer" data-url="/' + d.name.toLowerCase() + "/" + a + "/" + d.mid + '"><img src="/sites/default/files/media/' + d.uri + '" width="51" height="51" style="margin: 5px; border-radius: 7px; background: white; border: 1px solid rgba(0, 0, 0, .1);"></a>')
- // });
- // $("#" + a + "List").html(e);
- // $("#home-media-" + a).html(c.slice(0, 3))
- // })
- // })
- }
- function startBroadcasting(a, b) {
- // if (a) return console.log(a);
- // var c = {
- // id: "presenter",
- // streamInfo: {
- // sdpOffer: b,
- // privateBroadcast: $("#privateBroadcast").is(":checked"),
- // srcName: $("select#videoSource option:selected").text(),
- // watermark: $("#watermark").is(":checked")
- // }
- // };
- // $("#privateBroadcast").is(":checked") || $("#watermark").is(":checked") ? ($("#bcstIconWrap").removeClass("hidden"), $("#watermark").is(":checked") ? $("#wmSymbol").removeClass("hidden") : $("#wmSymbol").addClass("hidden"), $("#privateBroadcast").is(":checked") ? $("#lockSymbol").removeClass("hidden") : $("#lockSymbol").addClass("hidden")) : $("#bcstIconWrap").addClass("hidden");
- // socket.emit("userMedia", c, function(a) {
- // a ? console.log(a) : console.log("ERROR")
- // })
- }
- function stopBroadcasting(a) {
- // webRtcPeerPresenter && (a || socket.emit("userMedia", {
- // id: "stopBroadcast",
- // sid: socket.id
- // }, function(a) {
- // a ? console.log(a) : console.log("ERROR")
- // }), meters[socket.id] && meters[socket.id].stop(), webRtcPeerPresenter.dispose(), webRtcPeerPresenter = null);
- // video = document.getElementById("broadcast");
- // video.src = "";
- // window.stream && window.stream.getTracks().forEach(function(a) {
- // a.stop()
- // });
- // try {
- // viewersList.clear()
- // } catch (b) {}
- // $("#viewersCount").text(viewersList.items.length);
- // $('a[data-target="#viewers"]').parent("li").hasClass("active") && usersListTitleChange(viewersList.items.length, "Viewers");
- // $("#ul_viewers .emptyList").removeClass("hidden");
- // $("#broadcastWrapper").hide();
- // $("#thePanel").removeClass("broadcasting");
- // $(".muteMic").removeClass("active");
- // $(".pauseVideo").addClass("active");
- // $("#startBroadcasting").show()
- }
- function startViewing(a, b) {
- // function c(b, c) {
- // if (b) return console.log(b);
- // socket.emit("userMedia", {
- // id: "viewer",
- // streamInfo: {
- // sdpOffer: c,
- // sid: a
- // }
- // }, function(a) {
- // a ? console.log(a) : console.log("ERROR")
- // })
- // }
- // $("#broadcastSlots").append('<div class="bcst-player" data-sid="' + a + '"><div class="stack ecp-overlay"><div class="stopViewing avatar-list-item img-circle cur-pointer" data-sid="' + a + '"><div class="x">\u00d7</div></div><ul class="vidControls avatar-list" style="width: 100%;position: absolute;bottom: 0;"><li class="ecp-mute avatar-list-item pull-left cur-pointer"><svg height="29" version="1.1" viewBox="0 0 32 32" width="29"><path class="ytp-svg-fill ytp-svg-volume-animation-speaker" clip-path="url(#ytp-svg-volume-animation-mask)" d="M8,21 L12,21 L17,26 L17,10 L12,15 L8,15 L8,21 Z M19,14 L19,22 C20.48,21.32 21.5,19.77 21.5,18 C21.5,16.26 20.48,14.74 19,14 ZM19,11.29 C21.89,12.15 24,14.83 24,18 C24,21.17 21.89,23.85 19,24.71 L19,26.77 C23.01,25.86 26,22.28 26,18 C26,13.72 23.01,10.14 19,9.23 L19,11.29 Z" fill="#fff" id="ytp-svg-11"></path></svg><input class="vol-control" type="range" min="0" max="100" step="1" value="100"></li><li class="ecp-fullscreen avatar-list-item pull-right m-a-0 cur-pointer"><svg height="30" version="1.1" viewBox="5 0 32 32" width="30"><g class="ytp-fullscreen-button-corner-0"><use class="ytp-svg-shadow" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#ytp-svg-18"></use><path class="ytp-svg-fill" d="m 10,16 2,0 0,-4 4,0 0,-2 L 10,10 l 0,6 0,0 z" id="ytp-svg-18" fill="#fff"></path></g><g class="ytp-fullscreen-button-corner-1"><use class="ytp-svg-shadow" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#ytp-svg-19"></use><path class="ytp-svg-fill" d="m 20,10 0,2 4,0 0,4 2,0 L 26,10 l -6,0 0,0 z" id="ytp-svg-19" fill="#fff"></path></g><g class="ytp-fullscreen-button-corner-2"><use class="ytp-svg-shadow" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#ytp-svg-20"></use><path class="ytp-svg-fill" d="m 24,24 -4,0 0,2 L 26,26 l 0,-6 -2,0 0,4 0,0 z" id="ytp-svg-20" fill="#fff"></path></g><g class="ytp-fullscreen-button-corner-3"><use class="ytp-svg-shadow" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#ytp-svg-21"></use><path class="ytp-svg-fill" d="M 12,20 10,20 10,26 l 6,0 0,-2 -4,0 0,-4 0,0 z" id="ytp-svg-21" fill="#fff"></path></g></svg></li><li class="ecp-resize avatar-list-item pull-right cur-pointer" style="color: #fff;font-size: 16px;margin-top: 4px;"><span class="icon icon-resize-full-screen"></span></li></ul></div><div class="stack spinner"><div class="ispinner ispinner--white ispinner--animating ispinner--medium"><div class="ispinner__blade"></div><div class="ispinner__blade"></div><div class="ispinner__blade"></div><div class="ispinner__blade"></div><div class="ispinner__blade"></div><div class="ispinner__blade"></div><div class="ispinner__blade"></div><div class="ispinner__blade"></div><div class="ispinner__blade"></div><div class="ispinner__blade"></div><div class="ispinner__blade"></div><div class="ispinner__blade"></div></div></div><div class="username">' +
- // b + '</div><div class="stack"><video autoplay playsinline data-sid="' + a + '" style="width: 100%;height: 100%;background-color: #000;"></video></div></div>');
- // scrollToBottom($(".chat-area > .tab-pane.active .chat-text"));
- // var d = {
- // remoteVideo: document.querySelector('video[data-sid="' + a + '"]'),
- // onicecandidate: function(b) {
- // socket.emit("userMedia", {
- // id: "onIceCandidate",
- // candidate: b,
- // sid: a
- // })
- // }
- // };
- // webRtcPeerViewer[a] = kurentoUtils.WebRtcPeer.WebRtcPeerRecvonly(d, function(b) {
- // if (b) return console.log(b);
- // this.generateOffer(c);
- // "safari" == adapter.browserDetails.browser && ($('.bcst-player[data-sid="' + a + '"]').find(".ecp-mute > svg").click(), $('.bcst-player[data-sid="' + a + '"]').find(".vol-control").addClass("hidden"), $('.bcst-player[data-sid="' + a + '"]').find(".ecp-fullscreen").addClass("hidden"))
- // })
- }
- function stopViewing(a) {
- // socket.emit("userMedia", {
- // id: "stopViewer",
- // broadcaster: a
- // }, function(a) {
- // a ? console.log(a) : console.log("ERROR")
- // });
- // removePlayer(a)
- }
- function sendViewRequest(a, b) {
- // if (!navigator.getUserMedia) return notifyUser("Broadcast viewing is not supported with this browser."), !1;
- // $('.bcst-player[data-sid="' + a + '"]').length ? notifyUser("You are already viewing this user") : socket.emit("viewRequest", {
- // sid: a
- // }, function(a) {
- // a.sent ? String(b).startsWith(1) && notifyUser("Your request to view was sent to " + a.sentTo + ", please wait for a response.") : notifyUser(a.message)
- // })
- }
- function sendViewResponse(a, b) {
- // socket.emit("viewResponse", {
- // viewer: a,
- // canView: b
- // }, function(a) {})
- };;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement