mirror of
https://github.com/eliasstepanik/vdo.ninja.git
synced 2026-01-11 13:48:38 +00:00
commit
8e35995455
@ -1,5 +1,5 @@
|
||||
|
||||
### ⚠ Notice! We've rebranded from OBS.Ninja to VDO.Ninja - still all else the same though ✨
|
||||
### ⚠ Notice! We've rebranded from OBS.Ninja to VDO.Ninja - all else is staying the same ✨
|
||||
OBS.Ninja links will start redirecting to VDO.Ninja automatically on January 14th, 2022. If there are issues, simply refresh both the sender and viewer-side links or rename your links from obs.ninja to vdo.ninja.
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/2575698/124821455-bbfec580-df3c-11eb-9641-3d036cdd6c41.png" data-canonical-src="https://user-images.githubusercontent.com/2575698/124821455-bbfec580-df3c-11eb-9641-3d036cdd6c41.png" width="200" />
|
||||
|
||||
18
index.html
18
index.html
@ -24,7 +24,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
|
||||
<meta content="utf-8" http-equiv="encoding" />
|
||||
<meta name="copyright" content="© 2021 Steve Seguin" />
|
||||
<meta name="copyright" content="© 2022 Steve Seguin" />
|
||||
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" />
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="./media/favicon-32x32.png" />
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="./media/favicon-16x16.png" />
|
||||
@ -54,7 +54,7 @@
|
||||
<meta property="twitter:image" content="./media/vdoNinja_logo_full.png" />
|
||||
<meta name="msapplication-TileColor" content="#da532c" />
|
||||
<meta name="theme-color" content="#ffffff" />
|
||||
<link rel="stylesheet" href="./main.css?ver=152" />
|
||||
<link rel="stylesheet" href="./main.css?ver=153" />
|
||||
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/adapter.min.js"></script>
|
||||
<style id="lightbox-animations" type="text/css"></style>
|
||||
<!-- <link rel="manifest" href="manifest.json" /> -->
|
||||
@ -79,7 +79,7 @@
|
||||
<link itemprop="url" href="./media/vdoNinja_logo_full.png" />
|
||||
</span>
|
||||
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/CodecsHandler.js?ver=37"></script>
|
||||
<script type="text/javascript" crossorigin="anonymous" src="./webrtc.js?ver=367"></script>
|
||||
<script type="text/javascript" crossorigin="anonymous" src="./webrtc.js?ver=368"></script>
|
||||
<input id="zoomSlider" type="range" style="display: none;" />
|
||||
<div id="header">
|
||||
|
||||
@ -798,9 +798,6 @@
|
||||
<li>
|
||||
Some devices that use hardware encoding can experience video issues; switching to VP8 or VP9 as a <a target='_blank' title='Jump to the documentation' href='https://docs.vdo.ninja/viewers-settings/codec'>codec</a> may help.
|
||||
</li>
|
||||
<li>
|
||||
iPhones continue to have random audio issues, such as lowered volume or no audio at all. These are issues that Apple needs to fix.</a>.
|
||||
</li>
|
||||
<li>
|
||||
Audio may drop out in OBS Studio at random times, yet still appear active. Delete the browser source and re-create, or use the <a href="https://github.com/steveseguin/electroncapture">Electron Capture</a> app instead</a>.
|
||||
</li>
|
||||
@ -809,8 +806,7 @@
|
||||
<font style="color:#daad09;">Welcome to VDO Ninja! We've rebranded! Nothing else is changing and we're staying 100% free.</font>
|
||||
</h4>
|
||||
<br />
|
||||
🎁 Welcome to v20, released December 24th. <a target="_blank" href="https://docs.vdo.ninja/release-notes/v20">Release notes are here</a>. The previous version is <a href="https://vdo.ninja/v19/">available here</a> if you have new issues.
|
||||
|
||||
Site updated February 14th. <a target="_blank" href="https://docs.vdo.ninja/releases/v21">v21 release notes</a>. If having new issues, the previous version <a href="https://vdo.ninja/v20/">is here</a>, and the <a href="https://vdo.ninja/beta/">upcoming next version is here</a>; please test it when possible.
|
||||
<br />
|
||||
<br />
|
||||
<h3>
|
||||
@ -1932,7 +1928,7 @@
|
||||
|
||||
|
||||
var session = WebRTC.Media; // session is a required global variable if configuring manually. Run before loading main.js but after webrtc.js.
|
||||
session.version = "20.7";
|
||||
session.version = "21.0";
|
||||
session.streamID = session.generateStreamID(); // randomly generates a streamID for this session. You can set your own programmatically if needed
|
||||
|
||||
session.defaultPassword = "someEncryptionKey123"; // Change this password if self-deploying for added security/privacy
|
||||
@ -1998,11 +1994,11 @@
|
||||
// session.lowBitrateCutoff = 300; // Set a minimum bitrate (in kbps) before the stream is hidden. Useful for IRL streams maybe
|
||||
</script>
|
||||
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/aes.js"></script>
|
||||
<script type="text/javascript" crossorigin="anonymous" id="lib-js" src="./lib.js?ver=263"></script>
|
||||
<script type="text/javascript" crossorigin="anonymous" id="lib-js" src="./lib.js?ver=264"></script>
|
||||
<!--
|
||||
// If you wish to change branding, blank offers a good clean start.
|
||||
<script type="text/javascript" id="main-js" src="./main.js" data-translation="blank"></script>
|
||||
-->
|
||||
<script type="text/javascript" crossorigin="anonymous" id="main-js" src="./main.js?ver=301"></script>
|
||||
<script type="text/javascript" crossorigin="anonymous" id="main-js" src="./main.js?ver=302"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
85
lib.js
85
lib.js
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Steve Seguin. All Rights Reserved.
|
||||
* Copyright (c) 2022 Steve Seguin. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by the APGLv3 open-source license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -15862,6 +15862,11 @@ async function publishScreen2(constraints, audioList=[], audio=true){ // webcam
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
var transferList = [];
|
||||
var msgTransferList = [];
|
||||
|
||||
function cancelFile(ele){
|
||||
var idx = ele.dataset.tid;
|
||||
try{
|
||||
@ -15871,7 +15876,6 @@ function cancelFile(ele){
|
||||
updateDownloadLink(idx);
|
||||
}
|
||||
|
||||
|
||||
function requestFile(ele){
|
||||
var idx = ele.dataset.tid;
|
||||
transferList[idx].status = 1;
|
||||
@ -15887,8 +15891,11 @@ function requestFile(ele){
|
||||
pokeIframeAPI('request-file', fid, UUID);
|
||||
}
|
||||
|
||||
var transferList = [];
|
||||
var msgTransferList = [];
|
||||
function clearDownloadFile(ele){
|
||||
var idx = ele.dataset.tid;
|
||||
transferList[idx].status = 6;
|
||||
updateDownloadLink(idx);
|
||||
}
|
||||
|
||||
function addDownloadLink(fileList, UUID, pc){
|
||||
if (session.nodownloads){return;} // downloads are blocked
|
||||
@ -15923,9 +15930,9 @@ function addDownloadLink(fileList, UUID, pc){
|
||||
getById("chatNotification").classList.add("notification");
|
||||
}
|
||||
|
||||
if (session.broadcastChannel !== false) {
|
||||
session.broadcastChannel.postMessage(data); /* send */
|
||||
}
|
||||
//if (session.broadcastChannel !== false) {
|
||||
// session.broadcastChannel.postMessage(data); /* send */
|
||||
//}
|
||||
}
|
||||
|
||||
function updateDownloadLink(idx){
|
||||
@ -15952,6 +15959,9 @@ function updateDownloadLink(idx){
|
||||
elements[0].innerHTML = "Cancelled";
|
||||
elements[0].onclick = null;
|
||||
elements[0].disabled = true;
|
||||
} else if (transferList[idx].status === 6){
|
||||
getById("transfer_"+idx).style.display = "none";
|
||||
//delete(transferList[idx]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -15976,9 +15986,9 @@ function fileShareMessage(fileinfo, idx){
|
||||
}
|
||||
}
|
||||
var data = {};
|
||||
|
||||
data.idx = idx;
|
||||
if (fileinfo.status === 0){
|
||||
data.msg = " has a shared a file with you:<br /><i>"+fileinfo.name+"</i><br />Do you trust them? <button title='file size: "+fileinfo.size+" bytes' data-button-type='download' data-fid='"+fileinfo.id+"' data-tid='"+idx+"' onclick='requestFile(this);'>Download it here</button>";
|
||||
data.msg = " has a shared a file with you:<br /><i>"+fileinfo.name+"</i><br />Do you trust them? <button title='file size: "+fileinfo.size+" bytes' data-button-type='download' data-fid='"+fileinfo.id+"' data-tid='"+idx+"' onclick='requestFile(this);'>Download it here</button><button data-button-type='clear' data-fid='"+fileinfo.id+"' data-tid='"+idx+"' style='margin:10px 0 10px 2px;' onclick='clearDownloadFile(this);'>Clear</button>";
|
||||
} else if (fileinfo.status === 1){
|
||||
data.msg = " has a shared a file with you:<br /><i>"+fileinfo.name+"</i><br /><button title='file size: "+fileinfo.size+" bytes' data-button-type='download' data-fid='"+fileinfo.id+"' data-tid='"+idx+"'>Requested</button>";
|
||||
} else if (fileinfo.status === 2){
|
||||
@ -15989,6 +15999,8 @@ function fileShareMessage(fileinfo, idx){
|
||||
data.msg = " has a shared a file with you:<br /><i>"+fileinfo.name+"</i><br /><button title='file size: "+fileinfo.size+" bytes' data-button-type='download' data-fid='"+fileinfo.id+"' data-tid='"+idx+"' disabled >No longer available</button>";
|
||||
} else if (fileinfo.status === 5){
|
||||
data.msg = " has a shared a file with you:<br /><i>"+fileinfo.name+"</i><br /><button title='file size: "+fileinfo.size+" bytes' data-button-type='download' data-fid='"+fileinfo.id+"' data-tid='"+idx+"' disabled >Cancelled</button>";
|
||||
} else if (fileinfo.status === 6){
|
||||
return;
|
||||
}
|
||||
|
||||
var director=false; // add back in later.
|
||||
@ -16003,11 +16015,11 @@ function fileShareMessage(fileinfo, idx){
|
||||
data.label = "<b>" + data.label + "</b>";
|
||||
}
|
||||
} else if (director) {
|
||||
data.label = "<b><i>Director:</i></b> ";
|
||||
data.label = "<b><i>Director</i></b>";
|
||||
} else {
|
||||
data.label = "Someone ";
|
||||
data.label = "Someone";
|
||||
}
|
||||
data.type = "recv";
|
||||
data.type = "action";
|
||||
msgTransferList.push(data);
|
||||
}
|
||||
|
||||
@ -20264,6 +20276,17 @@ function sendChatMessage(chatMsg = false) { // filtered + visual
|
||||
|
||||
msg = convertShortcodes(msg);
|
||||
|
||||
var label = "";
|
||||
if (session.label){
|
||||
if (session.director){
|
||||
label = "<b><i><span class='chat_name'>" + session.label + "</span>:</i></b> ";
|
||||
} else {
|
||||
label = "<b><span class='chat_name'>" + session.label + "</span>:</b> ";
|
||||
}
|
||||
} else if (session.director){
|
||||
label = "<b><i><span class='chat_name'>Director</span>:</i></b> ";
|
||||
}
|
||||
|
||||
if (msg.trim()==="/list"){
|
||||
var listMsg = null;
|
||||
for (var UUID in session.rpcs){
|
||||
@ -20317,7 +20340,7 @@ function sendChatMessage(chatMsg = false) { // filtered + visual
|
||||
var data = {};
|
||||
data.time = Date.now();
|
||||
data.msg = sanitizeChat(msg); // this is what the other person should see
|
||||
data.label = false;
|
||||
data.label = label;
|
||||
data.type = "sent";
|
||||
messageList.push(data);
|
||||
sent=true;
|
||||
@ -20326,7 +20349,7 @@ function sendChatMessage(chatMsg = false) { // filtered + visual
|
||||
var data = {};
|
||||
data.time = Date.now();
|
||||
data.msg = sanitizeChat(msg); // this is what the other person should see
|
||||
data.label = false;
|
||||
data.label = label;
|
||||
data.type = "sent";
|
||||
messageList.push(data);
|
||||
sent=true;
|
||||
@ -20335,7 +20358,7 @@ function sendChatMessage(chatMsg = false) { // filtered + visual
|
||||
var data = {};
|
||||
data.time = Date.now();
|
||||
data.msg = sanitizeChat(msg); // this is what the other person should see
|
||||
data.label = false;
|
||||
data.label = label;
|
||||
data.type = "sent";
|
||||
messageList.push(data);
|
||||
sent=true;
|
||||
@ -20348,7 +20371,7 @@ function sendChatMessage(chatMsg = false) { // filtered + visual
|
||||
var data = {};
|
||||
data.time = Date.now();
|
||||
data.msg = sanitizeChat(msg); // this is what the other person should see
|
||||
data.label = false;
|
||||
data.label = label;
|
||||
data.type = "sent";
|
||||
messageList.push(data);
|
||||
sent=true;
|
||||
@ -20357,7 +20380,7 @@ function sendChatMessage(chatMsg = false) { // filtered + visual
|
||||
var data = {};
|
||||
data.time = Date.now();
|
||||
data.msg = sanitizeChat(msg); // this is what the other person should see
|
||||
data.label = false;
|
||||
data.label = label;
|
||||
data.type = "sent";
|
||||
messageList.push(data);
|
||||
sent=true;
|
||||
@ -20366,7 +20389,7 @@ function sendChatMessage(chatMsg = false) { // filtered + visual
|
||||
var data = {};
|
||||
data.time = Date.now();
|
||||
data.msg = sanitizeChat(msg); // this is what the other person should see
|
||||
data.label = false;
|
||||
data.label = label;
|
||||
data.type = "sent";
|
||||
messageList.push(data);
|
||||
sent=true;
|
||||
@ -20398,7 +20421,7 @@ function sendChatMessage(chatMsg = false) { // filtered + visual
|
||||
var data = {};
|
||||
data.time = Date.now();
|
||||
data.msg = sanitizeChat(msg); // this is what the other person should see
|
||||
data.label = false;
|
||||
data.label = label;
|
||||
data.type = "sent";
|
||||
messageList.push(data);
|
||||
}
|
||||
@ -20406,7 +20429,7 @@ function sendChatMessage(chatMsg = false) { // filtered + visual
|
||||
sendChat(msg); // send message to peers
|
||||
data.time = Date.now();
|
||||
data.msg = sanitizeChat(msg); // this is what the other person should see
|
||||
data.label = false;
|
||||
data.label = label;
|
||||
data.type = "sent";
|
||||
messageList.push(data);
|
||||
}
|
||||
@ -20540,17 +20563,17 @@ function getChatMessage(msg, label = false, director = false, overlay = false) {
|
||||
if (label) {
|
||||
data.label = label;
|
||||
if (director) {
|
||||
data.label = "<b><i>" + data.label + ":</i></b> ";
|
||||
data.label = "<b><i><span class='chat_director chat_name'>" + data.label + "</span>:</i></b> ";
|
||||
} else {
|
||||
data.label = "<b>" + data.label + ":</b> ";
|
||||
data.label = "<b><span class='chat_name'>" + data.label + "</span>:</b> ";
|
||||
}
|
||||
label = label+":";
|
||||
label = "<span class='chat_name'>"+label+"</span>:"; // label+":";
|
||||
} else if (director) {
|
||||
data.label = "<b><i>Director:</i></b> ";
|
||||
label = "Director:";
|
||||
data.label = "<b><i><span class='chat_director chat_name'>Director</span>:</i></b> ";
|
||||
label = "<span class='chat_director chat_name'>Director</span>:";
|
||||
} else {
|
||||
if (session.director){
|
||||
data.label = "Someone: ";
|
||||
data.label = "<span class='chat_name'>Someone</span>: ";
|
||||
} else {
|
||||
data.label = "";
|
||||
}
|
||||
@ -20672,7 +20695,7 @@ function updateClosedCaptions(msg, label, UUID) {
|
||||
}
|
||||
|
||||
var chatUpdateTimeout = null;
|
||||
function updateMessages() {
|
||||
function updateMessages(){
|
||||
if (session.chatbutton===false){return;}
|
||||
document.getElementById("chatBody").innerHTML = "";
|
||||
for (var i in messageList) {
|
||||
@ -20683,7 +20706,7 @@ function updateMessages() {
|
||||
if (messageList[i].type == "sent") {
|
||||
msg.innerHTML = messageList[i].msg + " <i><small> <small>- " + time + "</small></small></i>";
|
||||
msg.classList.add("outMessage");
|
||||
} else if (messageList[i].type == "recv") {
|
||||
} else if ((messageList[i].type == "recv") || (messageList[i].type == "action")) {
|
||||
var label = "";
|
||||
if (messageList[i].label) {
|
||||
label = messageList[i].label;
|
||||
@ -20704,11 +20727,13 @@ function updateMessages() {
|
||||
for (var i in msgTransferList) {
|
||||
var time = timeSince(msgTransferList[i].time) || "";
|
||||
var msg = document.createElement("div");
|
||||
|
||||
if ("idx" in msgTransferList[i]){
|
||||
msg.id = "transfer_"+msgTransferList[i].idx;
|
||||
}
|
||||
if (msgTransferList[i].type == "sent") {
|
||||
msg.innerHTML = msgTransferList[i].msg + " <i><small> <small>- " + time + "</small></small></i>";
|
||||
msg.classList.add("outMessage");
|
||||
} else if (msgTransferList[i].type == "recv") {
|
||||
} else if ((msgTransferList[i].type == "recv") || (msgTransferList[i].type == "action")) {
|
||||
var label = "";
|
||||
if (msgTransferList[i].label) {
|
||||
label = msgTransferList[i].label;
|
||||
|
||||
12
main.css
12
main.css
@ -2560,6 +2560,15 @@ input[type=checkbox] {
|
||||
text-align: left;
|
||||
margin: 10px 3px;
|
||||
}
|
||||
.actionMessage {
|
||||
color: #000;
|
||||
margin: 3px;
|
||||
border-radius: 5px;
|
||||
background: #FFF;
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
margin: 10px 3px;
|
||||
}
|
||||
.outMessage {
|
||||
color: #000;
|
||||
margin: 3px;
|
||||
@ -3875,6 +3884,9 @@ body.darktheme .outMessage{
|
||||
body.darktheme .inMessage {
|
||||
background-color: #b1b1b1;
|
||||
}
|
||||
body.darktheme .actionMessage {
|
||||
background-color: #b1b1b1;
|
||||
}
|
||||
body.darktheme #chatInput{
|
||||
background-color:#ccc;
|
||||
}
|
||||
|
||||
4
main.js
4
main.js
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Steve Seguin. All Rights Reserved.
|
||||
* Copyright (c) 2022 Steve Seguin. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by the APGLv3 open-source license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -4142,7 +4142,7 @@ setTimeout(function(){ // lazy load
|
||||
script.onload = function() {
|
||||
var script = document.createElement('script');
|
||||
document.head.appendChild(script);
|
||||
script.src = "./thirdparty/StreamSaver.js?t="+Date.now(); // dynamically load this only if its needed. Keeps loading time down.
|
||||
script.src = "./thirdparty/StreamSaver.js?v=4"; // dynamically load this only if its needed. Keeps loading time down.
|
||||
};
|
||||
script.src = "./thirdparty/polyfill.min.js"; // dynamically load this only if its needed. Keeps loading time down.
|
||||
},0);
|
||||
BIN
media/icon.png
BIN
media/icon.png
Binary file not shown.
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 8.3 KiB |
97
popout.html
97
popout.html
@ -1,11 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta name="theme-color" content="#ffffff" />
|
||||
<!-- <script src="//console.re/connector.js" data-channel="obsninjadev" type="text/javascript" id="consolerescript"></script>-->
|
||||
<link rel="stylesheet" href="./lineawesome/css/line-awesome.min.css">
|
||||
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/adapter-latest.js"></script>
|
||||
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/qrcode.min.js"></script>
|
||||
<script type="text/javascript" src="./thirdparty/jquery.min.js"></script>
|
||||
<!-- <script src="//console.re/connector.js" data-channel="vdoninjadev" type="text/javascript" id="consolerescript"></script>-->
|
||||
<link rel="stylesheet" href="./main.css?ver=22" />
|
||||
<style>
|
||||
#chatModule{
|
||||
@ -41,11 +37,8 @@ body{
|
||||
<body>
|
||||
<div id="chatModule" >
|
||||
<div id="chatBody">
|
||||
<div class="inMessage" data-translate='welcome-to-obs-ninja-chat'>
|
||||
Welcome to OBS.Ninja! You can send text messages directly to connected peers from here.
|
||||
</div>
|
||||
<div class="outMessage" data-translate='names-and-labels-coming-soon'>
|
||||
Names identifying connected peers will be a feature in an upcoming release.
|
||||
<div class="inMessage" data-translate='welcome-to-vdo-ninja-chat'>
|
||||
Welcome to VDO.Ninja! You can send text messages directly to connected peers from here.
|
||||
</div>
|
||||
</div>
|
||||
<input id="chatInput" placeholder="Enter chat message to send here" onkeypress="EnterButtonChat(event)" />
|
||||
@ -55,9 +48,8 @@ body{
|
||||
|
||||
|
||||
/// If you have a routing system setup, you could have just one global listener for all iframes instead.
|
||||
var chatUpdateTimeout = null;
|
||||
//var chatUpdateTimeout = null;
|
||||
var messageList = [];
|
||||
|
||||
(function (w) {
|
||||
w.URLSearchParams = w.URLSearchParams || function (searchString) {
|
||||
var self = this;
|
||||
@ -88,7 +80,7 @@ bc.onmessage = function (e) {
|
||||
if ("msg" in e.data){
|
||||
messageList.push(e.data);
|
||||
messageList = messageList.slice(-100);
|
||||
updateMessages();
|
||||
updateMessages(e.data);
|
||||
} else if ("messageList" in e.data){
|
||||
messageList = e.data.messageList;
|
||||
updateMessages();
|
||||
@ -151,40 +143,73 @@ function timeSince(date) {
|
||||
|
||||
|
||||
|
||||
function updateMessages(){
|
||||
document.getElementById("chatBody").innerHTML = "";
|
||||
for (i in messageList){
|
||||
|
||||
var time = timeSince(messageList[i].time);
|
||||
function updateMessages(message = false){
|
||||
if (message){
|
||||
var time = timeSince(message.time);
|
||||
var msg = document.createElement("div");
|
||||
////// KEEP THIS IN /////////
|
||||
console.log(messageList[i].msg); // Display Recieved messages for View-Only clients.
|
||||
console.log(message.msg); // Display Recieved messages for View-Only clients.
|
||||
/////////////////////////////
|
||||
if (messageList[i].type == "sent"){
|
||||
msg.innerHTML = messageList[i].msg + " <i><small> <small>- "+time+"</small></small></i>";
|
||||
var label = "";
|
||||
if (message.label){
|
||||
label = message.label;
|
||||
}
|
||||
|
||||
if (message.type == "sent"){
|
||||
msg.innerHTML = "<span class='chat_message chat_sent'>"+message.msg + " </span><i><small> <small>- "+time+"</small></small></i><span style='display:none'>"+label+"</span>";
|
||||
msg.classList.add("outMessage");
|
||||
} else if (messageList[i].type == "recv"){
|
||||
} else if (message.type == "recv"){
|
||||
msg.innerHTML = label+"<span class='chat_message chat_recv'>"+message.msg + " </span><i><small> <small>- "+time+"</small></small></i>";
|
||||
msg.classList.add("inMessage");
|
||||
} else if (message.type == "action"){
|
||||
msg.innerHTML = label+"<span class='chat_message chat_action'>"+message.msg + " </span><i><small> <small>- "+time+"</small></small></i>";
|
||||
msg.classList.add("actionMessage");
|
||||
} else if (message.type == "alert"){
|
||||
msg.innerHTML = "<span class='chat_message chat_alert'>"+message.msg + " </span><i><small> <small>- "+time+"</small></small></i>";
|
||||
msg.classList.add("inMessage");
|
||||
} else {
|
||||
msg.innerHTML = "<span class='chat_message chat_other'>"+message.msg + " </span><i><small> <small>- "+time+"</small></small></i>";
|
||||
msg.classList.add("inMessage");
|
||||
}
|
||||
document.getElementById("chatBody").appendChild(msg);
|
||||
} else {
|
||||
document.getElementById("chatBody").innerHTML = "";
|
||||
for (i in messageList){
|
||||
var time = timeSince(messageList[i].time);
|
||||
var msg = document.createElement("div");
|
||||
////// KEEP THIS IN /////////
|
||||
console.log(messageList[i].msg); // Display Recieved messages for View-Only clients.
|
||||
/////////////////////////////
|
||||
var label = "";
|
||||
if (messageList[i].label){
|
||||
label = messageList[i].label;
|
||||
}
|
||||
msg.innerHTML = label+messageList[i].msg + " <i><small> <small>- "+time+"</small></small></i>";
|
||||
msg.classList.add("inMessage");
|
||||
} else if (messageList[i].type == "alert"){
|
||||
msg.innerHTML = messageList[i].msg + " <i><small> <small>- "+time+"</small></small></i>";
|
||||
msg.classList.add("inMessage");
|
||||
} else {
|
||||
msg.innerHTML = messageList[i].msg + " <i><small> <small>- "+time+"</small></small></i>";
|
||||
msg.classList.add("inMessage");
|
||||
|
||||
if (messageList[i].type == "sent"){
|
||||
msg.innerHTML = "<span class='chat_message chat_sent'>"+messageList[i].msg + " </span><i><small> <small>- "+time+"</small></small></i><span style='display:none'>"+label+"</span>";
|
||||
msg.classList.add("outMessage");
|
||||
} else if (messageList[i].type == "recv"){
|
||||
msg.innerHTML = label+"<span class='chat_message chat_recv'>"+messageList[i].msg + " </span><i><small> <small>- "+time+"</small></small></i>";
|
||||
msg.classList.add("inMessage");
|
||||
} else if (messageList[i].type == "action"){
|
||||
msg.innerHTML = label+"<span class='chat_message chat_action'>"+messageList[i].msg + " </span><i><small> <small>- "+time+"</small></small></i>";
|
||||
msg.classList.add("actionMessage");
|
||||
} else if (messageList[i].type == "alert"){
|
||||
msg.innerHTML = "<span class='chat_message chat_alert'>"+messageList[i].msg + " </span><i><small> <small>- "+time+"</small></small></i>";
|
||||
msg.classList.add("inMessage");
|
||||
} else {
|
||||
msg.innerHTML = "<span class='chat_message chat_other'>"+messageList[i].msg + " </span><i><small> <small>- "+time+"</small></small></i>";
|
||||
msg.classList.add("inMessage");
|
||||
}
|
||||
|
||||
document.getElementById("chatBody").appendChild(msg);
|
||||
}
|
||||
|
||||
document.getElementById("chatBody").appendChild(msg);
|
||||
}
|
||||
if (chatUpdateTimeout){
|
||||
clearInterval(chatUpdateTimeout);
|
||||
}
|
||||
//if (chatUpdateTimeout){
|
||||
// clearInterval(chatUpdateTimeout);
|
||||
//}
|
||||
document.getElementById("chatBody").scrollTop = document.getElementById("chatBody").scrollHeight;
|
||||
chatUpdateTimeout = setTimeout(function(){updateMessages()},60000);
|
||||
//chatUpdateTimeout = setTimeout(function(){updateMessages()},60000);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
4
thirdparty/StreamSaver.js
vendored
4
thirdparty/StreamSaver.js
vendored
@ -29,8 +29,8 @@
|
||||
createWriteStream,
|
||||
WritableStream: global.WritableStream || ponyfill.WritableStream,
|
||||
supported: true,
|
||||
version: { full: '2.0.6', major: 2, minor: 0, dot: 6 },
|
||||
mitm: 'https://steveseguin.github.io/StreamSaver.js/mitm.html?version=2.0.6'
|
||||
version: { full: '2.0.7', major: 2, minor: 0, dot: 7 },
|
||||
mitm: 'https://steveseguin.github.io/StreamSaver.js/mitm.html?version=2.0.7'
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -440,4 +440,4 @@
|
||||
"transferred": "Transferido",
|
||||
"room-changed": "Tú sala ha sido cambiada"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Steve Seguin. All Rights Reserved.
|
||||
* Copyright (c) 2022 Steve Seguin. All Rights Reserved.
|
||||
*
|
||||
* This file is part of VDO.Ninja, yet is not intended to be modified.
|
||||
* This file cannot be modified without the express permission of its author.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user