mirror of
https://github.com/eliasstepanik/vdo.ninja.git
synced 2026-01-11 21:58:35 +00:00
Add files via upload
This commit is contained in:
parent
0b064f7c69
commit
56806a2186
472
electron.html
472
electron.html
@ -1,227 +1,274 @@
|
||||
<html>
|
||||
<meta charset="UTF-8">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<link rel="stylesheet" href="./lineawesome/css/line-awesome.min.css" />
|
||||
<style>
|
||||
html {
|
||||
border:0;
|
||||
margin:0;
|
||||
outline:0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
video {
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=), none;
|
||||
user-select: none;
|
||||
|
||||
}
|
||||
body {
|
||||
padding: 0 0px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: -webkit-linear-gradient(to top, #363644, 50%, #151b29); /* Chrome 10-25, Safari 5.1-6 */
|
||||
background: linear-gradient(to top, #363644, 50%, #151b29); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
|
||||
font-size: 2em;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
border:0;
|
||||
margin:0;
|
||||
outline:0;
|
||||
}
|
||||
|
||||
button.glyphicon-button:focus,
|
||||
button.glyphicon-button:active:focus,
|
||||
button.glyphicon-button.active:focus,
|
||||
button.glyphicon-button.focus,
|
||||
button.glyphicon-button:active.focus,
|
||||
button.glyphicon-button.active.focus {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
#gobutton{
|
||||
padding: 1em;
|
||||
font-size: 1em;
|
||||
margin: auto auto;
|
||||
height: 100%;
|
||||
font-family: system-ui;
|
||||
font-weight: bold;
|
||||
border: 2px solid #6aab23;
|
||||
background: #6aab23;
|
||||
display: flex;
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
box-shadow: 0 12px 15px -10px #5ca70b;
|
||||
position: relative;
|
||||
right: 2px;
|
||||
top: 1px;
|
||||
color:white;
|
||||
cursor:pointer;
|
||||
}
|
||||
#header{
|
||||
width:100%;
|
||||
background-color: #101520;
|
||||
}
|
||||
input#changeText {
|
||||
font-size: 1em;
|
||||
align-self: center;
|
||||
width: 100%;
|
||||
padding: 1em;
|
||||
font-weight: bold;
|
||||
font-family: system-ui;
|
||||
background: white;
|
||||
border-bottom: 4px solid #6aab23;
|
||||
box-shadow: 0px 30px 40px -32px #6aab23;
|
||||
border-top-left-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
transition: all 0.2s linear;
|
||||
}
|
||||
|
||||
input#changeText:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.container{
|
||||
font-size: 20px;
|
||||
align-self:center;
|
||||
margin: auto auto;
|
||||
}
|
||||
label {
|
||||
font: white;
|
||||
font-size: 1em;
|
||||
color: white;
|
||||
}
|
||||
input[type='checkbox'] {
|
||||
-webkit-appearance:none;
|
||||
width:30px;
|
||||
height:30px;
|
||||
background:white;
|
||||
border-radius:5px;
|
||||
border:2px solid #555;
|
||||
cursor: pointer;
|
||||
}
|
||||
input[type='checkbox']:checked {
|
||||
background: #1A1;
|
||||
}
|
||||
#audioOutput, #lastUrls {
|
||||
font-size: calc(16px + 0.3vw);
|
||||
width: 730px;
|
||||
height: 100%;
|
||||
flex: 20;
|
||||
border-radius: 10px;
|
||||
padding: 1em;
|
||||
background: #eaeaea;
|
||||
cursor:pointer;
|
||||
}
|
||||
label[for="audioOutput"] {
|
||||
font-size: 3em;
|
||||
color: #FE53BB;
|
||||
text-shadow: 0px 0px 30px #fe53bb;
|
||||
padding-top: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
label[for="changeText"] {
|
||||
font-size: 3em;
|
||||
color: #00F6FF;
|
||||
text-shadow: 0px 0px 30px #00f6ff;
|
||||
padding-top: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
label[for="lastUrls"] {
|
||||
font-size: 3em;
|
||||
color: #1a1;
|
||||
text-shadow: 0px 0px 30px #1a1;
|
||||
padding-top: 10px;
|
||||
padding-right: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div#audioOutputContainer, #history {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: center;
|
||||
margin: 4em;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1030px) {
|
||||
body{
|
||||
zoom: 0.9;
|
||||
-moz-transform: scale(0.9);
|
||||
-moz-transform-origin: 0 0;
|
||||
<style>
|
||||
html {
|
||||
border:0;
|
||||
margin:0;
|
||||
outline:0;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 940px) {
|
||||
body{
|
||||
zoom: 0.64;
|
||||
-moz-transform: scale(0.64);
|
||||
-moz-transform-origin: 0 0;
|
||||
video {
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=), none;
|
||||
user-select: none;
|
||||
|
||||
}
|
||||
.container{
|
||||
/* font-size: calc(14px + 1.4vw); */
|
||||
max-width:750px;
|
||||
body {
|
||||
padding: 0 0px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: -webkit-linear-gradient(to top, #363644, 50%, #151b29); /* Chrome 10-25, Safari 5.1-6 */
|
||||
background: linear-gradient(to top, #363644, 50%, #151b29); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
|
||||
font-size: 2em;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
border:0;
|
||||
margin:0;
|
||||
outline:0;
|
||||
}
|
||||
}
|
||||
|
||||
#messageDiv {
|
||||
font-size: .7em;
|
||||
color: #DDD;
|
||||
transition: all 0.5s linear;
|
||||
font-style: italic;
|
||||
opacity: 0;
|
||||
text-align: center;
|
||||
margin: 10px 0;
|
||||
}
|
||||
button.glyphicon-button:focus,
|
||||
button.glyphicon-button:active:focus,
|
||||
button.glyphicon-button.active:focus,
|
||||
button.glyphicon-button.focus,
|
||||
button.glyphicon-button:active.focus,
|
||||
button.glyphicon-button.active.focus {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
div#urlInput {
|
||||
margin: 4em;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
#gobutton{
|
||||
padding: 1em;
|
||||
font-size: 1em;
|
||||
margin: auto auto;
|
||||
height: 100%;
|
||||
font-family: system-ui;
|
||||
font-weight: bold;
|
||||
border: 2px solid #6aab23;
|
||||
background: #6aab23;
|
||||
display: flex;
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
box-shadow: 0 12px 15px -10px #5ca70b;
|
||||
position: relative;
|
||||
right: 2px;
|
||||
top: 1px;
|
||||
color:white;
|
||||
cursor:pointer;
|
||||
}
|
||||
#header{
|
||||
width:100%;
|
||||
background-color: #101520;
|
||||
}
|
||||
input#changeText {
|
||||
font-size: 1em;
|
||||
align-self: center;
|
||||
width: 100%;
|
||||
padding: 1em;
|
||||
font-weight: bold;
|
||||
font-family: system-ui;
|
||||
background: white;
|
||||
border-bottom: 4px solid #6aab23;
|
||||
box-shadow: 0px 30px 40px -32px #6aab23;
|
||||
border-top-left-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
transition: all 0.2s linear;
|
||||
}
|
||||
|
||||
label[for="audioOutput"], label[for="lastUrls"] {
|
||||
font-size: 3em;
|
||||
}
|
||||
input#changeText:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#warning4mac, #electronVersion {
|
||||
background: #8500f7;
|
||||
box-shadow: 0px 0px 50px 10px #8500f7ab, inset 0px 0px 10px 2px #8d08ffba;
|
||||
border: 2px solid #8500f7;
|
||||
border-radius: 10px;
|
||||
width: 90%;
|
||||
padding:1em;
|
||||
margin:0 auto;
|
||||
color:white;
|
||||
font-size:1.3em;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.container{
|
||||
font-size: 20px;
|
||||
align-self:center;
|
||||
margin: auto auto;
|
||||
}
|
||||
label {
|
||||
font: white;
|
||||
font-size: 1em;
|
||||
color: white;
|
||||
}
|
||||
input[type='checkbox'] {
|
||||
-webkit-appearance:none;
|
||||
width:30px;
|
||||
height:30px;
|
||||
background:white;
|
||||
border-radius:5px;
|
||||
border:2px solid #555;
|
||||
cursor: pointer;
|
||||
}
|
||||
input[type='checkbox']:checked {
|
||||
background: #1A1;
|
||||
}
|
||||
#audioOutput, #lastUrls {
|
||||
font-size: calc(16px + 0.3vw);
|
||||
width: 730px;
|
||||
height: 100%;
|
||||
flex: 20;
|
||||
border-radius: 10px;
|
||||
padding: 1em;
|
||||
background: #eaeaea;
|
||||
cursor:pointer;
|
||||
}
|
||||
label[for="audioOutput"] {
|
||||
font-size: 3em;
|
||||
color: #FE53BB;
|
||||
text-shadow: 0px 0px 30px #fe53bb;
|
||||
padding-right: 10px;
|
||||
}
|
||||
label[for="changeText"] {
|
||||
font-size: 3em;
|
||||
color: #00F6FF;
|
||||
text-shadow: 0px 0px 30px #00f6ff;
|
||||
padding-top: 5px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
#warning4mac a, #electronVersion a {
|
||||
color:white;
|
||||
}
|
||||
label[for="lastUrls"] {
|
||||
font-size: 3em;
|
||||
color: #1a1;
|
||||
text-shadow: 0px 0px 30px #1a1;
|
||||
padding-right: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
ul#lastUrls {
|
||||
list-style: none;
|
||||
background: #101520;
|
||||
color: white;
|
||||
padding: 1em;
|
||||
}
|
||||
div#audioOutputContainer, #history {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: center;
|
||||
margin: 4em;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1030px) {
|
||||
body{
|
||||
zoom: 0.9;
|
||||
-moz-transform: scale(0.9);
|
||||
-moz-transform-origin: 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
ul#lastUrls li {
|
||||
padding: 5px 0px;
|
||||
}
|
||||
ul#lastUrls li:nth-child(even) {
|
||||
background-color: #182031;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#messageDiv {
|
||||
font-size: .7em;
|
||||
color: #DDD;
|
||||
transition: all 0.5s linear;
|
||||
font-style: italic;
|
||||
opacity: 0;
|
||||
text-align: center;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
</style></head>
|
||||
div#urlInput {
|
||||
margin: 4em;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
@media only screen and (max-width: 940px) {
|
||||
body{
|
||||
zoom: 0.74;
|
||||
-moz-transform: scale(0.74);
|
||||
-moz-transform-origin: 0 0;
|
||||
|
||||
}
|
||||
.container{
|
||||
max-width:99%;
|
||||
}
|
||||
div#urlInput {
|
||||
margin: 2em;
|
||||
}
|
||||
div#audioOutputContainer, #history {
|
||||
margin: 2em;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 840px) {
|
||||
body{
|
||||
zoom: 0.64;
|
||||
-moz-transform: scale(0.64);
|
||||
-moz-transform-origin: 0 0;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media only screen and (max-height: 639px) {
|
||||
div#urlInput {
|
||||
margin: 2em;
|
||||
}
|
||||
div#audioOutputContainer, #history {
|
||||
margin: 2em;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 767px) {
|
||||
|
||||
div#urlInput {
|
||||
margin: 2em 1em;
|
||||
}
|
||||
div#audioOutputContainer, #history {
|
||||
margin: 2em 1em;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (max-height: 380px) {
|
||||
div#urlInput {
|
||||
margin: 1em;
|
||||
}
|
||||
div#audioOutputContainer, #history {
|
||||
margin: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
label[for="audioOutput"], label[for="lastUrls"] {
|
||||
font-size: 3em;
|
||||
}
|
||||
|
||||
#warning4mac, #electronVersion {
|
||||
background: #8500f7;
|
||||
box-shadow: 0px 0px 50px 10px #8500f7ab, inset 0px 0px 10px 2px #8d08ffba;
|
||||
border: 2px solid #8500f7;
|
||||
border-radius: 10px;
|
||||
width: 90%;
|
||||
padding:1em;
|
||||
margin:0 auto;
|
||||
color:white;
|
||||
font-size:1.3em;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#warning4mac a, #electronVersion a {
|
||||
color:white;
|
||||
}
|
||||
|
||||
ul#lastUrls {
|
||||
list-style: none;
|
||||
background: #101520;
|
||||
color: white;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
ul#lastUrls li {
|
||||
padding: 5px 0px;
|
||||
}
|
||||
ul#lastUrls li:nth-child(even) {
|
||||
background-color: #182031;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body >
|
||||
|
||||
<div id="header" style="-webkit-app-region: drag;color:#6f6f6f;font-size:40px; line-height: 40px; padding: 20px; letter-spacing: 3; font-weight: bold;">OBS.Ninja</div>
|
||||
@ -490,17 +537,18 @@ function addUrlToHistory(url){
|
||||
}
|
||||
}
|
||||
|
||||
function modURL(ele=false){
|
||||
function modURL(){
|
||||
var url = document.getElementById('changeText').value;
|
||||
console.log(url);
|
||||
document.getElementById('changeText').value = url;
|
||||
if (url.startsWith("obs.ninja")){
|
||||
url = "https://"+url;
|
||||
}
|
||||
console.log(url);
|
||||
return url;
|
||||
}
|
||||
function gohere(){
|
||||
addUrlToHistory(document.getElementById('changeText').value);
|
||||
localStorage.setItem('lastUrls', JSON.stringify(lastUrls));
|
||||
var url = modURL(true);
|
||||
var url = modURL();
|
||||
if (!(document.getElementById('changeText').value.includes("obs.ninja")) && (document.getElementById('changeText').value.includes("http")) && (document.getElementById('changeText').value.includes("&sink"))){
|
||||
alert("Notice: The &sink command is domain specific.\nVisit https://YOURDOMAIN.com/electron instead.");
|
||||
}
|
||||
|
||||
@ -192,6 +192,11 @@ function loadIframe(){ // this is pretty important if you want to avoid camera
|
||||
button.onclick = function(){iframe.contentWindow.postMessage({"sendChat":"Hello!"}, '*');};
|
||||
iframeContainer.appendChild(button);
|
||||
|
||||
var button = document.createElement("button");
|
||||
button.innerHTML = "Send Keyframe";
|
||||
button.onclick = function(){iframe.contentWindow.postMessage({"keyframe":true}, '*');};
|
||||
iframeContainer.appendChild(button);
|
||||
|
||||
var button = document.createElement("button");
|
||||
button.innerHTML = "Insert Style Sheet";
|
||||
var stylesheet = "#main { zoom: 0.5;} video {float: left; margin: 0; padding: 0; } #info {display:none;}";
|
||||
|
||||
35
index.html
35
index.html
@ -55,7 +55,7 @@
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="./lineawesome/css/line-awesome.min.css" />
|
||||
<link rel="stylesheet" href="./main.css?ver=61" />
|
||||
<link rel="stylesheet" href="./main.css?ver=62" />
|
||||
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/adapter.min.js"></script>
|
||||
</head>
|
||||
<body id="main" class="hidden">
|
||||
@ -66,8 +66,8 @@
|
||||
<span itemprop="thumbnail" itemscope itemtype="http://schema.org/ImageObject">
|
||||
<link itemprop="url" href="./media/obsNinja_logo_full.png" />
|
||||
</span>
|
||||
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/CodecsHandler.js?ver=31"></script>
|
||||
<script type="text/javascript" crossorigin="anonymous" src="./webrtc.js?ver=192"></script>
|
||||
<script type="text/javascript" crossorigin="anonymous" src="./thirdparty/CodecsHandler.js?ver=32"></script>
|
||||
<script type="text/javascript" crossorigin="anonymous" src="./webrtc.js?ver=193"></script>
|
||||
<input id="zoomSlider" type="range" style="display: none;" />
|
||||
<div id="header">
|
||||
|
||||
@ -142,22 +142,25 @@
|
||||
<div id="screenshare2button" onmousedown="event.preventDefault(); event.stopPropagation();" title="Create a Secondary Stream" alt="Create a Secondary Stream" onclick="createIframePopup()" tabindex="20" role="button" aria-pressed="false" onkeyup="enterPressedClick(event,this);" class="float advanced" style="cursor: pointer;">
|
||||
<i id="screenshare2toggle" onmousedown="event.preventDefault(); event.stopPropagation();" class="toggleSize las la-tv my-float"></i>
|
||||
</div>
|
||||
<div id="settingsbutton" onmousedown="event.preventDefault(); event.stopPropagation();" title="Settings" onclick="toggleSettings()" class="advanced float" tabindex="21" role="button" aria-pressed="false" onkeyup="enterPressedClick(event,this);" style="cursor: pointer;" alt="Toggle the Settings Menu">
|
||||
<div id="websitesharebutton" onmousedown="event.preventDefault(); event.stopPropagation();" title="Share a website as an embedded iFRAME" alt="Share a website as an embedded iFRAME" onclick="shareWebsite()" tabindex="21" role="button" aria-pressed="false" onkeyup="enterPressedClick(event,this);" class="float advanced" style="cursor: pointer;">
|
||||
<i id="websitesharetoggle" onmousedown="event.preventDefault(); event.stopPropagation();" class="toggleSize las la-window-maximize my-float"></i>
|
||||
</div>
|
||||
<div id="settingsbutton" onmousedown="event.preventDefault(); event.stopPropagation();" title="Settings" onclick="toggleSettings()" class="advanced float" tabindex="22" role="button" aria-pressed="false" onkeyup="enterPressedClick(event,this);" style="cursor: pointer;" alt="Toggle the Settings Menu">
|
||||
<i id="settingstoggle" class="toggleSize las la-cog my-float"></i>
|
||||
</div>
|
||||
<div id="hangupbutton" onmousedown="event.preventDefault(); event.stopPropagation();" title="Hangup the Call" alt="Hangup the Call" onclick="hangup()" class="advanced float" tabindex="22" role="button" aria-pressed="false" onkeyup="enterPressedClick(event,this);" style="cursor: pointer;" >
|
||||
<div id="hangupbutton" onmousedown="event.preventDefault(); event.stopPropagation();" title="Hangup the Call" alt="Hangup the Call" onclick="hangup()" class="advanced float" tabindex="23" role="button" aria-pressed="false" onkeyup="enterPressedClick(event,this);" style="cursor: pointer;" >
|
||||
<i class="toggleSize my-float las la-phone rotate225" aria-hidden="true"></i>
|
||||
</div>
|
||||
<div id="raisehandbutton" onmousedown="event.preventDefault(); event.stopPropagation();" data-raised="0" title="Alert the host you want to speak" alt="Alert the host you want to speak" tabindex="23" role="button" aria-pressed="false" onkeyup="enterPressedClick(event,this);" onclick="raisehand()" class="advanced float" style="cursor: pointer;">
|
||||
<div id="raisehandbutton" onmousedown="event.preventDefault(); event.stopPropagation();" data-raised="0" title="Alert the host you want to speak" alt="Alert the host you want to speak" tabindex="24" role="button" aria-pressed="false" onkeyup="enterPressedClick(event,this);" onclick="raisehand()" class="advanced float" style="cursor: pointer;">
|
||||
<i class="toggleSize my-float las la-hand-paper" style="position: relative; right: 1px;" aria-hidden="true"></i>
|
||||
</div>
|
||||
<div id="recordLocalbutton" onmousedown="event.preventDefault(); event.stopPropagation();" data-state="0" title="Record your stream to disk" alt="Record your stream to disk" tabindex="24" role="button" aria-pressed="false" onkeyup="enterPressedClick(event,this);" onclick="recordLocalVideoToggle();" class="advanced float" style="cursor: pointer;">
|
||||
<div id="recordLocalbutton" onmousedown="event.preventDefault(); event.stopPropagation();" data-state="0" title="Record your stream to disk" alt="Record your stream to disk" tabindex="25" role="button" aria-pressed="false" onkeyup="enterPressedClick(event,this);" onclick="recordLocalVideoToggle();" class="advanced float" style="cursor: pointer;">
|
||||
<i class="toggleSize my-float las la-dot-circle" style="position: relative;" aria-hidden="true"></i>
|
||||
</div>
|
||||
<span id="miniPerformer" style="pointer-events: auto;" class="advanced"></span>
|
||||
<span id="rooms" class="advanced" style="padding-top:3px;padding-left:6px;pointer-events: auto;color:#fff;"></span>
|
||||
|
||||
<div id="hangupbutton2" onmousedown="event.preventDefault(); event.stopPropagation();" title="Cancel the Director's Video/Audio" onclick="hangup2()" class="advanced float" tabindex="25" role="button" aria-pressed="false" onkeyup="enterPressedClick(event,this);" style="cursor: pointer;" alt="Disconnect Direcotor's cam">
|
||||
<div id="hangupbutton2" onmousedown="event.preventDefault(); event.stopPropagation();" title="Cancel the Director's Video/Audio" onclick="hangup2()" class="advanced float" tabindex="26" role="button" aria-pressed="false" onkeyup="enterPressedClick(event,this);" style="cursor: pointer;" alt="Disconnect Direcotor's cam">
|
||||
<i class="toggleSize my-float las la-phone rotate225" aria-hidden="true"></i>
|
||||
</div>
|
||||
</div>
|
||||
@ -965,7 +968,13 @@
|
||||
<input type="checkbox" data-param="&m" onchange="updateLink(1,this);">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
<span data-translate="mute-microphone-by-default">Mute microphone by default</span>
|
||||
<span data-translate="mute-microphone-by-default">Muted; guest can unmute</span>
|
||||
<Br />
|
||||
<label class="switch" title="Have the guest join muted, so only the director can Unmute the guest.">
|
||||
<input type="checkbox" data-param="&g=0" onchange="updateLink(1,this);">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
<span data-translate="unmute-by-director-only">Muted; director can unmute</span>
|
||||
<Br />
|
||||
<label class="switch" title="The guest will not be asked for a video device on connection">
|
||||
<input type="checkbox" id="vd0toggle" data-param="&vd=0" onchange="if(getById('vd1toggle').checked){getById('vd1toggle').checked=false;updateLink(1,getById('vd1toggle'));} updateLink(1,this);">
|
||||
@ -973,12 +982,6 @@
|
||||
</label>
|
||||
<span data-translate="guest-joins-with-no-camera">Guest joins with no camera</span>
|
||||
<Br />
|
||||
<label class="switch" title="Have the guest join muted, so only the director can Unmute the guest.">
|
||||
<input type="checkbox" data-param="&g=0" onchange="updateLink(1,this);">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
<span data-translate="unmute-by-director-only">Unmute by director only</span>
|
||||
<Br />
|
||||
<label class="switch" title="Make the invite URL encoded, so parameters are harder to tinker with by guests">
|
||||
<input type="checkbox" data-param="" id="obfuscate_director_1" onchange="updateLink(1,this);">
|
||||
<span class="slider"></span>
|
||||
@ -1694,7 +1697,7 @@
|
||||
<script type="text/javascript" id="main-js" src="./main.js" data-translation="blank"></script>
|
||||
<script type="text/javascript" crossorigin="anonymous" id="mixer-js" src="./mixer.js?ver=2"></script>
|
||||
-->
|
||||
<script type="text/javascript" crossorigin="anonymous" id="main-js" src="./main.js?ver=206"></script>
|
||||
<script type="text/javascript" crossorigin="anonymous" id="main-js" src="./main.js?ver=207"></script>
|
||||
<script type="text/javascript">
|
||||
setTimeout(function(){ // lazy load
|
||||
var script = document.createElement('script');
|
||||
|
||||
109
main.js
109
main.js
@ -852,6 +852,7 @@ if (typeof session === 'undefined') { // make sure to init the WebRTC if not exi
|
||||
|
||||
if (navigator.userAgent.toLowerCase().indexOf(' electron/') > -1) {
|
||||
try {
|
||||
getById("electronDragZone").style.cursor="grab";
|
||||
const ipcRenderer = require('electron').ipcRenderer;
|
||||
window.prompt = function(title, val){
|
||||
return ipcRenderer.sendSync('prompt', {title, val});
|
||||
@ -2422,9 +2423,12 @@ if (urlParams.has('sink')) {
|
||||
getById("headphonesDiv2").style.display = "none";
|
||||
}
|
||||
|
||||
if (urlParams.has('fullscreen')) {
|
||||
if (window.obsstudio || (navigator.userAgent.toLowerCase().indexOf(' electron/') > -1)){
|
||||
session.fullscreen = true;
|
||||
} else if (urlParams.has('fullscreen')) {
|
||||
session.fullscreen = true;
|
||||
}
|
||||
|
||||
if (urlParams.has('stats')) {
|
||||
session.statsMenu = true;
|
||||
}
|
||||
@ -2743,7 +2747,10 @@ if (urlParams.has('turn')) {
|
||||
} catch (e) {
|
||||
errorlog("Twilio Failed");
|
||||
}
|
||||
|
||||
} else if (turnstring == "nostun") { // disable TURN servers
|
||||
session.configuration = {
|
||||
sdpSemantics: 'unified-plan' // future-proofing
|
||||
};
|
||||
} else if ((turnstring == "false") || (turnstring == "off") || (turnstring == "0")) { // disable TURN servers
|
||||
session.configuration = {
|
||||
iceServers: [
|
||||
@ -2887,6 +2894,10 @@ if (isIFrame) { // reduce CPU load if not needed.
|
||||
toggleVideoMute();
|
||||
}
|
||||
}
|
||||
|
||||
if ("keyframe" in e.data) {
|
||||
session.sendKeyFrameScenes();
|
||||
}
|
||||
|
||||
if ("mute" in e.data) {
|
||||
if (e.data.mute === true) { // unmute
|
||||
@ -7761,6 +7772,7 @@ function createRoomCallback(passAdd, passAdd2) {
|
||||
//getById("directorLinks").style.display = "";
|
||||
getById("directorLinks1").style.display = "inline-block";
|
||||
getById("directorLinks2").style.display = "inline-block";
|
||||
|
||||
|
||||
getById("director_block_1").dataset.raw = "https://" + location.host + location.pathname + "?room=" + session.roomid + broadcastString + passAdd + pie;
|
||||
getById("director_block_1").href = "https://" + location.host + location.pathname + "?room=" + session.roomid + broadcastString + passAdd + pie;
|
||||
@ -7786,6 +7798,7 @@ function createRoomCallback(passAdd, passAdd2) {
|
||||
getById("chatbutton").classList.remove("advanced");
|
||||
getById("controlButtons").style.display = "inherit";
|
||||
getById("mutespeakerbutton").classList.remove("advanced");
|
||||
getById("websitesharebutton").classList.remove("advanced");
|
||||
if (session.showDirector == false) {
|
||||
getById("miniPerformer").innerHTML = '<button id="press2talk" onmousedown="event.preventDefault(); event.stopPropagation();" style="width:auto;margin-left:5px;height:45px;border-radius: 38px;" class="float" onclick="press2talk(true);" title="You can also enable the director`s Video Output afterwards by clicking the Setting`s button"><i class="las la-headset"></i><span data-translate="push-to-talk-enable"> enable director`s microphone or video<br />(only guests can see this feed)</span></button>';
|
||||
} else {
|
||||
@ -8169,6 +8182,8 @@ function press2talk(clean = false) {
|
||||
ele.style.minWidth = "127px";
|
||||
ele.style.padding = "7px";
|
||||
getById("settingsbutton").classList.remove("advanced");
|
||||
|
||||
|
||||
if (!document.getElementById("controls_director") && session.showDirector){createDirectorOnlyBox();}
|
||||
|
||||
|
||||
@ -10597,7 +10612,7 @@ async function grabVideo(quality = 0, eleName = 'previewWebcam', selector = "sel
|
||||
|
||||
if (!videoSelect || videoSelect.value == "ZZZ") { // if there is no video, or if manually set to audio ready, then do this step.
|
||||
warnlog("ZZZ SET - so no VIDEO");
|
||||
if (eleName == "previewWebcam") {
|
||||
if ((eleName == "previewWebcam") && document.getElementById("previewWebcam")){
|
||||
if (session.autostart) {
|
||||
publishWebcam(); // no need to mirror as there is no video...
|
||||
return;
|
||||
@ -10808,7 +10823,7 @@ async function grabVideo(quality = 0, eleName = 'previewWebcam', selector = "sel
|
||||
|
||||
applyMirror(mirror, eleName);
|
||||
|
||||
if (eleName == "previewWebcam") {
|
||||
if ((eleName == "previewWebcam") && document.getElementById("previewWebcam")){
|
||||
if (session.autostart) {
|
||||
publishWebcam();
|
||||
} else {
|
||||
@ -10834,7 +10849,7 @@ async function grabVideo(quality = 0, eleName = 'previewWebcam', selector = "sel
|
||||
// getUserMedia() returns.
|
||||
if (grabVideoTimer) {
|
||||
clearTimeout(grabVideoTimer);
|
||||
if (eleName == "previewWebcam") {
|
||||
if ((eleName == "previewWebcam") && document.getElementById("previewWebcam")){
|
||||
session.videoElement.controls = true;
|
||||
}
|
||||
}
|
||||
@ -10852,7 +10867,7 @@ async function grabVideo(quality = 0, eleName = 'previewWebcam', selector = "sel
|
||||
if (getById("popupSelector_constraints_loading")) {
|
||||
getById("popupSelector_constraints_loading").style.display = "none";
|
||||
}
|
||||
if (eleName == "previewWebcam") {
|
||||
if ((eleName == "previewWebcam") && document.getElementById("previewWebcam")){
|
||||
session.videoElement.controls = true;
|
||||
} else {
|
||||
updateConstraintSliders();
|
||||
@ -11142,6 +11157,7 @@ session.publishDirector = async function(clean, vdevice=false, adevice=true){ /
|
||||
getById("screensharebutton").classList.remove("advanced");
|
||||
getById("hangupbutton2").classList.remove("advanced");
|
||||
|
||||
|
||||
v.muted = true;
|
||||
v.autoplay = true;
|
||||
v.controls = false;
|
||||
@ -11155,6 +11171,7 @@ session.publishDirector = async function(clean, vdevice=false, adevice=true){ /
|
||||
session.screenShareState = false;
|
||||
}
|
||||
|
||||
|
||||
activatedPreview = false;
|
||||
await grabAudio("videosource", "#audioSource3");
|
||||
|
||||
@ -11305,7 +11322,6 @@ session.publishDirector = async function(clean, vdevice=false, adevice=true){ /
|
||||
} catch (e) {}
|
||||
|
||||
log("constraint");
|
||||
errorlog(constraints);
|
||||
navigator.mediaDevices.getUserMedia(constraints).then(function(stream){ // very simple.
|
||||
session.streamSrc = stream;
|
||||
v.srcObject = outboundAudioPipeline(session.streamSrc); // not blank, so now we worry
|
||||
@ -14233,6 +14249,85 @@ Promise.prototype.timeout = function(ms) {
|
||||
])
|
||||
};
|
||||
|
||||
|
||||
function shareWebsite(){
|
||||
|
||||
if (session.iframeSrc){
|
||||
session.iframeSrc = false;
|
||||
session.iframeEle = null;
|
||||
getById("websitesharetoggle").classList.add("la-window-maximize");
|
||||
getById("websitesharetoggle").classList.remove("la-window-close");
|
||||
|
||||
getById("websitesharebutton").classList.remove("float2");
|
||||
getById("websitesharebutton").classList.add("float");
|
||||
|
||||
var data = {};
|
||||
data.iframeSrc = false;
|
||||
session.sendMessage(data);
|
||||
return
|
||||
}
|
||||
|
||||
var iframeURL = prompt("Enter a website URL to share", "https://www.youtube.com/watch?v=dQw4w9WgXcQ");
|
||||
|
||||
if (!iframeURL){
|
||||
return;
|
||||
}
|
||||
if (iframeURL == session.iframeSrc){return;}
|
||||
|
||||
if (!(iframeURL.startsWith("https://") || iframeURL.startsWith("http://"))){
|
||||
iframeURL = "https://"+iframeURL;
|
||||
}
|
||||
|
||||
var domain = new URL(iframeURL);
|
||||
domain = domain.hostname;
|
||||
log(domain);
|
||||
if ((domain=="www.youtube.com") || (domain=="youtube.com")){
|
||||
var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/;
|
||||
var match = iframeURL.match(regExp);
|
||||
var vidid = (match&&match[7].length==11)? match[7] : false;
|
||||
|
||||
if(vidid){
|
||||
iframeURL = "https://www.youtube.com/embed/"+vidid+"?autoplay=1&modestbranding=1";
|
||||
log(iframeURL);
|
||||
}
|
||||
} else if (domain=="www.twitch.tv"){
|
||||
var vidid = iframeURL.split('/').pop().split('#')[0].split('?')[0];
|
||||
if (vidid){
|
||||
iframeURL = "https://player.twitch.tv/?channel="+vidid+"&parent="+location.hostname;
|
||||
log(iframeURL);
|
||||
}
|
||||
} else if (domain=="twitch.tv"){
|
||||
var vidid = iframeURL.split('/').pop().split('#')[0].split('?')[0];
|
||||
if (vidid){
|
||||
iframeURL = "https://player.twitch.tv/?channel="+vidid+"&parent="+location.hostname;
|
||||
log(iframeURL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
session.iframeSrc = iframeURL;
|
||||
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.allow="autoplay;camera;microphone";
|
||||
iframe.allowtransparency="true";
|
||||
iframe.allowfullscreen ="true";
|
||||
iframe.src = session.iframeSrc;
|
||||
iframe.id = "iframe_source"
|
||||
session.iframeEle = iframe;
|
||||
|
||||
getById("websitesharetoggle").classList.remove("la-window-maximize");
|
||||
getById("websitesharetoggle").classList.add("la-window-close");
|
||||
|
||||
getById("websitesharebutton").classList.add("float2");
|
||||
getById("websitesharebutton").classList.remove("float");
|
||||
|
||||
var data = {};
|
||||
data.iframeSrc = iframeURL;
|
||||
session.sendMessage(data);
|
||||
|
||||
}
|
||||
|
||||
function createIframePopup() {
|
||||
|
||||
if (session.screenShareElement) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user