mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Bug fixes in the speaker selection
This commit is contained in:
@@ -176,8 +176,8 @@ cur_speaker.addEventListener("change", (e) =>{
|
|||||||
});
|
});
|
||||||
|
|
||||||
window.audios.speakerAudios((event, arg) => {
|
window.audios.speakerAudios((event, arg) => {
|
||||||
setSpeakerAudiosValue(arg);
|
|
||||||
loadSpeakerOptions(arg);
|
loadSpeakerOptions(arg);
|
||||||
|
setSpeakerAudiosValue(arg);
|
||||||
});
|
});
|
||||||
|
|
||||||
window.electron.progress((event, arg) => {
|
window.electron.progress((event, arg) => {
|
||||||
|
|||||||
+10
-6
@@ -211,11 +211,15 @@ function loadLanguageOptions(){
|
|||||||
//function to load speaker options to the drop down list
|
//function to load speaker options to the drop down list
|
||||||
function loadSpeakerOptions(options){
|
function loadSpeakerOptions(options){
|
||||||
try {
|
try {
|
||||||
var menu = document.getElementById('speaker_option');
|
var menu = document.getElementById('cur_speaker');
|
||||||
|
var l = document.getElementById("cur_speaker").options.length -1;
|
||||||
|
for(i = l; i >= 0; i--){
|
||||||
|
menu.remove(i);
|
||||||
|
}
|
||||||
var object_holdy;
|
var object_holdy;
|
||||||
var choice;
|
var choice;
|
||||||
object_holdy = options.keys();
|
object_holdy = Object.keys(options);
|
||||||
for(i = 0; i < options.length; i++){
|
for(i = 0; i < object_holdy.length; i++){
|
||||||
choice = document.createElement('option');
|
choice = document.createElement('option');
|
||||||
choice.textContent = options[object_holdy[i]].name;
|
choice.textContent = options[object_holdy[i]].name;
|
||||||
choice.value = options[object_holdy[i]].name;
|
choice.value = options[object_holdy[i]].name;
|
||||||
@@ -310,9 +314,9 @@ function setSpeakerAudiosValue(valy){
|
|||||||
|
|
||||||
function rewriteSpeakerName(){
|
function rewriteSpeakerName(){
|
||||||
try {
|
try {
|
||||||
var tempy = document.getElementById("cur_speaker").textContent;
|
var tempy = document.getElementById("cur_speaker").value;
|
||||||
speakerAudios[tempy].name = document.getElementById("newSpeaker").textContent;
|
speakerAudios[tempy].name = document.getElementById("newSpeaker").value;
|
||||||
document.getElementById("cur_speaker").textContent = document.getElementById("newSpeaker").textContent;
|
setSpeakerAudiosValue(speakerAudios);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user