New version not play this sound
{
"Command": "executeScript_Sandbox",
"Target": "const audio = new Audio(\"https://translate.google.com/translate_tts?ie=UTF-8&tl=en&client=tw-ob&q=Test+Sound\");\n audio.play();",
"Value": "",
"Description": "Kết Thúc"
},
I tried executeScript
but it doesn’t work.
Please help me.
1 Like
ulrich
2
Since a few years Chrome will not play audio files unless the user has at least clicked once in the document.
But with XClick you can simulate such a click The macro below is the same audio code as before, plus a required click into the website.
{
"Name": "play audio",
"CreationDate": "2023-6-16",
"Commands": [
{
"Command": "open",
"Target": "https://ui.vision/",
"Value": "",
"Description": ""
},
{
"Command": "pause",
"Target": "2000",
"Value": "",
"Description": ""
},
{
"Command": "XClick",
"Target": "11,12",
"Value": "",
"Description": "Click somewhere. This interaction is required to play sound"
},
{
"Command": "pause",
"Target": "2000",
"Value": "",
"Description": ""
},
{
"Command": "executeScript",
"Target": "var audio = new Audio('https://www2.cs.uic.edu/~i101/SoundFiles/BabyElephantWalk60.wav');audio.play()",
"Value": "",
"Description": "Play audio file"
}
]
}
I tried only your audio command
{
"Command": "executeScript",
"Target": "var audio = new Audio('https://www2.cs.uic.edu/~i101/SoundFiles/BabyElephantWalk60.wav');audio.play()",
"Value": "",
"Description": "Play audio file"
}
And it works with or without clicking into the Chrome browser.
But with my sound, it’s not, with or without clicking into the Chrome browser.
{
"Command": "executeScript",
"Target": "var audio = new Audio('https://translate.google.com/translate_tts?ie=UTF-8&tl=en&client=tw-ob&q=Test+Sound');audio.play()",
"Value": "",
"Description": "Play audio file"
}
Could you please look deep into it and fix that? Thank you.
Hello @ulrich
Is there any update on fixing the recurring error? Thank you.
hey man, seriously? @ulrich