added bash script to automatically start gameplay
This commit is contained in:
@@ -25,16 +25,16 @@
|
||||
|
||||
<div class="separator"></div>
|
||||
|
||||
<h4>Start sharing your screen</h4>
|
||||
<p class="help-text">
|
||||
Click the button below to create a new streaming room,
|
||||
where you can share your screen with your peers.
|
||||
A RoomID will be generated, and you can share the RoomID to your peers.
|
||||
</p>
|
||||
<!-- <h4>Start sharing your screen</h4>-->
|
||||
<!-- <p class="help-text">-->
|
||||
<!-- Click the button below to create a new streaming room,-->
|
||||
<!-- where you can share your screen with your peers.-->
|
||||
<!-- A RoomID will be generated, and you can share the RoomID to your peers.-->
|
||||
<!-- </p>-->
|
||||
|
||||
<button type="button" class="btn btn-dark btn-block" id="btnStream">Start sharing</button>
|
||||
<!-- <button type="button" class="btn btn-dark btn-block" id="btnStream">Start sharing</button>-->
|
||||
|
||||
<div class="separator"></div>
|
||||
<!-- <div class="separator"></div>-->
|
||||
|
||||
<h4>Join streaming room</h4>
|
||||
<p class="help-text">
|
||||
|
||||
@@ -225,8 +225,9 @@ function getServerHostName() {
|
||||
// Source https://stackoverflow.com/questions/247483/http-get-request-in-javascript
|
||||
var xmlHttp = new XMLHttpRequest()
|
||||
xmlHttp.open( "GET", getHttpUrl() + "/hostname", false ); // false for synchronous request
|
||||
xmlHttp.send( null );
|
||||
xmlHttp.send(null);
|
||||
LaplaceVar.ui.barrierhostname.innerHTML = xmlHttp.responseText
|
||||
//console.log(window.location.href.split('?')[0])
|
||||
}
|
||||
|
||||
function updateStatusUIStream() {
|
||||
@@ -252,7 +253,7 @@ function getWebsocketUrl() {
|
||||
|
||||
function getHttpUrl() {
|
||||
//if (window.location.protocol === "https:") {
|
||||
return `${window.location.href}`
|
||||
return window.location.href.split('?')[0]
|
||||
// } else {
|
||||
// return `${window.location.href}`
|
||||
// }
|
||||
@@ -580,8 +581,17 @@ function routeByUrl() {
|
||||
if (paramStream && paramStream.length > 0) {
|
||||
return doStream();
|
||||
}
|
||||
// If the room ID is provided
|
||||
const roomId = u.searchParams.get('roomID');
|
||||
if (roomId && roomId.length > 0) {
|
||||
AddRoomID(roomId);
|
||||
}
|
||||
}
|
||||
|
||||
// Adds the room information to the ID inputRoomID
|
||||
function AddRoomID(roomID) {
|
||||
document.getElementById('inputRoomID').value = roomID
|
||||
}
|
||||
function leaveRoom() {
|
||||
window.location.href = getBaseUrl();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user