Skip to content

Commit 6226cdc

Browse files
committed
Updates
1 parent 20cb4e2 commit 6226cdc

3 files changed

Lines changed: 57 additions & 3 deletions

File tree

server-src/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1891,7 +1891,7 @@ async function startRoomWSS(roomid) {
18911891
if (json.url.length < 1) {
18921892
return;
18931893
}
1894-
if (json.url.length > 500) {
1894+
if (json.url.length > 700) {
18951895
return;
18961896
}
18971897
resetMediaValues();

src/chat/interface/mediaengine/index.js

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ async function doMediaSelect() {
918918
accountHelper.getCurrentValidationState()
919919
.username;
920920
}
921-
const embedURL = `https://random-rants-chat.github.io/taco-shoot-minigame/?n=${Math.round(Date.now())}&v=${Math.round(Date.now())}&username=${encodeURIComponent(username)}&id=${Math.round(Date.now())}`;
921+
const embedURL = `https://random-rants-chat.github.io/taco-shoot-minigame/?n=${Math.round(Date.now())}&username=${encodeURIComponent(username)}&id=${Math.round(Date.now())}`;
922922

923923
sws.send(
924924
JSON.stringify({
@@ -956,6 +956,60 @@ async function doMediaSelect() {
956956
],
957957
},
958958

959+
{
960+
element: "div",
961+
className: "divButton roundborder",
962+
eventListeners: [
963+
{
964+
event: "click",
965+
func: async function (e) {
966+
e.preventDefault();
967+
div.remove();
968+
div = null;
969+
970+
var loadingMediaDiv = doLoadingMediaScreen();
971+
972+
try {
973+
loadingMediaDiv.remove();
974+
var username = "player";
975+
if (accountHelper.getCurrentValidationState()) {
976+
username =
977+
accountHelper.getCurrentValidationState()
978+
.username;
979+
}
980+
const embedURL = `https://random-rants-chat.github.io/taco-shoot-minigame/?n=${Math.round(Date.now())}&username=${encodeURIComponent(username)}&id=${Math.round(Date.now())}&project=${encodeURIComponent("3d-laser-tag")}`;
981+
982+
sws.send(
983+
JSON.stringify({
984+
type: "media",
985+
command: "mediaResetRequest",
986+
})
987+
);
988+
sws.send(
989+
JSON.stringify({
990+
type: "media",
991+
command: "mediaEmbedRunning",
992+
url: embedURL,
993+
})
994+
);
995+
} catch (err) {
996+
loadingMediaDiv.remove();
997+
dialog.alert("Error creating game room:\n" + err);
998+
}
999+
},
1000+
},
1001+
],
1002+
children: [
1003+
surroundFlexboxDiv([
1004+
{
1005+
element: "span",
1006+
textContent:
1007+
"3D Laser Tag (Edit of grifpatch's project)",
1008+
},
1009+
]),
1010+
],
1011+
},
1012+
9591013
{
9601014
element: "br",
9611015
},

wpstatic/version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"timestamp":"1761663302165"}
1+
{"timestamp":"1761667824906"}

0 commit comments

Comments
 (0)