dev
This commit is contained in:
parent
7c4326ee9f
commit
526d031a22
@ -68,7 +68,10 @@ function addText(text) {
|
||||
contentDiv.appendChild(p);
|
||||
}
|
||||
|
||||
function playAudio(audioUrl) {
|
||||
function playAudio(audioUrl, widgetID) {
|
||||
if (!audioUrl.includes("http")) {
|
||||
audioUrl = "http://147.45.237.174/api/widget/media/audio/file/get/" + String(widgetID)
|
||||
}
|
||||
fetch(audioUrl)
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
@ -165,7 +168,7 @@ async function widgetView() {
|
||||
addImage(widget.ImageUrl)
|
||||
}
|
||||
if (widget.AudioUrl) {
|
||||
playAudio(widget.AudioUrl)
|
||||
playAudio(widget.AudioUrl, widgetID)
|
||||
}
|
||||
playSpeech(donat.Text)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user