Commit 50a7c516 authored by Sylvain Coulange's avatar Sylvain Coulange 🌼
Browse files

débug pour issue de Pauline

parent 414f2472
......@@ -542,6 +542,7 @@ function writeEnter(){
//fonction effacer
function erasePreviousSpan(){
document.getElementById('checkWordValid').style.display = "none";
document.getElementById('audio').innerHTML = "" // suppression de la mémoire de la synthèse vocale
var elASupprimer = document.getElementById(curseurPos)
var previousEl = elASupprimer.previousElementSibling
......@@ -574,6 +575,7 @@ function eraseAll() {
playEffect('delete')
curseurPos = 'g0'
document.getElementById('textZone').innerHTML = textZoneDefault
document.getElementById('audio').innerHTML = ""
}
}
......@@ -1279,7 +1281,7 @@ function checkWord() {
w = [];
} else if (r.classList[0]=="carteZh") {
w.push([r.children[0].children[1].innerText, r.dataset.pinyin, r.id, 0])
} else if (r.innerText != "" && r.innerText != " " && r.id != "g0") {
} else if (r.innerText != "" && r.innerText != " " && r.id.slice(0,5)=="phon_") {
var rinner = r.innerText
var stress = 0
if (r.innerText == "͜") rinner = "";
......
......@@ -99,9 +99,11 @@ async function playIpa(line="") {
const data = await response.json();
readResponse(data["audio"], line);
} else {
var sv_audio = document.getElementsByTagName("audio")[0];
sv_audio.playbackRate = document.getElementById('debitParole'+line.toString()).value / 100;
sv_audio.play();
if (document.getElementsByTagName("audio").length>0) {
var sv_audio = document.getElementsByTagName("audio")[0];
sv_audio.playbackRate = document.getElementById('debitParole'+line.toString()).value / 100;
sv_audio.play();
}
}
if (typeof saveTrace !== "undefined") {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment