Changement de TOUTES les occurrences d'un host ou d'un port écrits en dur dans le projet.
This commit is contained in:
@@ -3,10 +3,10 @@ import * as c from "./constants.js"
|
||||
|
||||
// export const soundPongArr: HTMLAudioElement[] = [];
|
||||
export const soundPongArr: HTMLAudioElement[] = [
|
||||
new Audio("http://transcendance:8080/sound/pong/"+1+".ogg"),
|
||||
new Audio("http://transcendance:8080/sound/pong/"+2+".ogg")
|
||||
new Audio("http://" + process.env.WEBSITE_HOST + ":" + process.env.WEBSITE_PORT + "/sound/pong/"+1+".ogg"),
|
||||
new Audio("http://" + process.env.WEBSITE_HOST + ":" + process.env.WEBSITE_PORT + "/sound/pong/"+2+".ogg")
|
||||
];
|
||||
export const soundRoblox = new Audio("http://transcendance:8080/sound/roblox-oof.ogg");
|
||||
export const soundRoblox = new Audio("http://" + process.env.WEBSITE_HOST + ":" + process.env.WEBSITE_PORT + "/sound/roblox-oof.ogg");
|
||||
|
||||
export function initAudio(sound: string)
|
||||
{
|
||||
@@ -18,11 +18,6 @@ export function initAudio(sound: string)
|
||||
muteFlag = true;
|
||||
}
|
||||
|
||||
/* for (let i = 0; i <= 32; i++) {
|
||||
soundPongArr.push(new Audio("http://transcendance:8080/sound/pong/"+i+".ogg"));
|
||||
soundPongArr[i].volume = c.soundPongVolume;
|
||||
soundPongArr[i].muted = muteFlag;
|
||||
} */
|
||||
soundPongArr.forEach((value) => {
|
||||
value.volume = c.soundRobloxVolume;
|
||||
value.muted = muteFlag;
|
||||
|
||||
@@ -35,7 +35,7 @@ class ClientInfoSpectator {
|
||||
playerRightNextPos: VectorInteger;
|
||||
}
|
||||
|
||||
const wsUrl = "ws://transcendance:8080/pong";
|
||||
const wsUrl = "ws://" + process.env.WEBSITE_HOST + ":" + process.env.WEBSITE_PORT + "/pong";
|
||||
export let socket: WebSocket; /* TODO: A way to still use "const" not "let" ? */
|
||||
export const clientInfo = new ClientInfo();
|
||||
export const clientInfoSpectator = new ClientInfoSpectator(); // WIP, could refactor this
|
||||
|
||||
@@ -21,7 +21,7 @@ export const primaryRoutes = {
|
||||
component: ProfilePage,
|
||||
conditions: [
|
||||
async(detail) => {
|
||||
const user = await fetch('http://transcendance:8080/api/v2/user')
|
||||
const user = await fetch('http://' + process.env.WEBSITE_HOST + ":" + process.env.WEBSITE_PORT + '/api/v2/user')
|
||||
.then((resp) => resp.json())
|
||||
|
||||
console.log('in /profile what is in user')
|
||||
@@ -38,7 +38,7 @@ export const primaryRoutes = {
|
||||
component: ProfilePage,
|
||||
conditions: [
|
||||
async(detail) => {
|
||||
const user = await fetch('http://transcendance:8080/api/v2/user')
|
||||
const user = await fetch('http://' + process.env.WEBSITE_HOST + ":" + process.env.WEBSITE_PORT + '/api/v2/user')
|
||||
.then((resp) => resp.json())
|
||||
|
||||
console.log('in /profile/* what is in user')
|
||||
|
||||
Reference in New Issue
Block a user