Browse Source

remove emoji strings

replaced with html entities/creation from unicode code-point where applicable
my editor doesn't render emoji
tags/v1.3.0
louis f 5 years ago
parent
commit
e3b7233b20
4 changed files with 15 additions and 9 deletions
  1. +1
    -0
      .gitignore
  2. +1
    -2
      Js/Audio.js
  3. +11
    -5
      Js/Main.js
  4. +2
    -2
      Player.html

+ 1
- 0
.gitignore View File

@@ -10,3 +10,4 @@ web.config
/Dist
/Css/main.min.css
/Js/XduPlayer.min.js
/**/.*.swp

+ 1
- 2
Js/Audio.js View File

@@ -1,5 +1,4 @@
//(Math.exp(x)-1)/(Math.E-1)
//🔊

class bufferLoader {
constructor(context, soundMap, callback) {
@@ -182,4 +181,4 @@ class audioController {
}
this.sources = {};
}
}
}

+ 11
- 5
Js/Main.js View File

@@ -29,6 +29,12 @@ let volume = 0.5;
let fullScreen = false;
let prevMission = '{Select}';

const emoji = {
LoudSound: String.fromCodePoint(0x1f50a),
Mute: String.fromCodePoint(0x1f507),
HeavyPlusSign: String.fromCodePoint(0x2795)
};

function onBodyLoaded() {
bodyLoaded = true;
document.getElementById("title-tag").innerText = version;
@@ -95,9 +101,9 @@ function loadLocalStorage() {
audio.mute(isMuted);
}
if(isMuted) {
document.getElementById('mute-button').innerText = "🔇";
document.getElementById('mute-button').innerText = emoji.Mute;
} else {
document.getElementById('mute-button').innerText = "🔊";
document.getElementById('mute-button').innerText = emoji.LoudSound;
}
//language
let lang = urlParams['lang'] || localStorage.getItem('language') || "eng";
@@ -433,9 +439,9 @@ function toggleMute(event) {
}
localStorage.setItem('ismuted', isMuted);
if(isMuted) {
document.getElementById('mute-button').innerText = "🔇";
document.getElementById('mute-button').innerText = emoji.Mute;
} else {
document.getElementById('mute-button').innerText = "🔊";
document.getElementById('mute-button').innerText = emoji.LoudSound;
}
}

@@ -474,7 +480,7 @@ function onFullScreenChange(event) {
} else {
document.getElementById('other-controls-container').style.cssText = "";
document.getElementById('title-container').style.cssText = "";
document.getElementById('fullscreen-button').innerText = "➕";
document.getElementById('fullscreen-button').innerText = emoji.HeavyPlusSign;
}
onWindowResize(event, 0);
}


+ 2
- 2
Player.html View File

@@ -26,7 +26,7 @@
<div id="title-container"><span>Now Playing: </span><span id="playing-title">None</span></div>
<div id="other-controls-container">
<div id="volume-control">
<span onclick="toggleMute(event)" id="mute-button">🔊</span>
<span onclick="toggleMute(event)" id="mute-button">&#128266;</span> <!-- loud_sound -->
<input onchange="onVolumeChange(event)" id="volume-range" value="50" type="range" min="0" max="100" step="1"/>
</div>
<select id="select-mission" onchange="missionDropDownChanged(event);"></select>
@@ -37,7 +37,7 @@
The canvas then resizes as the canvas does and the text-container uses transform scale based off this resolution -->
<div id="app-container" onclick="onMainClick(event);">
<div id="text-container">
<div id="fullscreen-button" onclick="toggleFullscreen(event)">➕</div>
<div id="fullscreen-button" onclick="toggleFullscreen(event)">&#10133;</div> <!-- heavy_plus_sign -->
<img id="main-ui-img" class="hidden" src="Images/newui_main.png"/>
<button id="play-from-query" onclick="playFromQuery(event)" style="display: none;">Play</button>
<div id="title" class="hidden">Title Text</div>


Loading…
Cancel
Save