cleared lines names
This commit is contained in:
18
jsm/Stats.js
18
jsm/Stats.js
@@ -11,9 +11,9 @@ const AWARDED_LINE_CLEARS = {
|
|||||||
|
|
||||||
const CLEARED_LINES_NAMES = [
|
const CLEARED_LINES_NAMES = [
|
||||||
"",
|
"",
|
||||||
"SOLO",
|
"LIGNE",
|
||||||
"DUO",
|
"DOUBLE",
|
||||||
"TRIO",
|
"TRIPLE",
|
||||||
"TETRA",
|
"TETRA",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -192,16 +192,10 @@ class Stats {
|
|||||||
|
|
||||||
|
|
||||||
const speechSynthesisAvailable = 'speechSynthesis' in window;
|
const speechSynthesisAvailable = 'speechSynthesis' in window;
|
||||||
let utterance;
|
|
||||||
if ('SpeechSynthesisUtterance' in window) {
|
|
||||||
utterance = new SpeechSynthesisUtterance();
|
|
||||||
utterance.lang = 'fr-FR';
|
|
||||||
}
|
|
||||||
|
|
||||||
function speak(text, volume=1) {
|
function speak(text, volume=1) {
|
||||||
if (!utterance) return;
|
if (!speechSynthesisAvailable) return;
|
||||||
|
const utterance = new SpeechSynthesisUtterance(text);
|
||||||
utterance.text = text ;
|
utterance.lang = 'fr-FR';
|
||||||
utterance.volume = volume;
|
utterance.volume = volume;
|
||||||
speechSynthesis.speak(utterance);
|
speechSynthesis.speak(utterance);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user