|
@@ -402,6 +402,7 @@ import utils from "/src/utils.js"
|
|
|
import bigCursor from '/src/assets/images/accessibility/big-cursor.cur'
|
|
|
import "/src/assets/css/ariaGlobalStyle.less"
|
|
|
import assetUrls from '/src/assets/images/accessibility/index.js'
|
|
|
+import { ajaxOrigin } from "@/config.js";
|
|
|
const config = require('/src/config.js')
|
|
|
|
|
|
const speechRateFactors = [
|
|
@@ -740,7 +741,7 @@ export default {
|
|
|
if (that.audioPlayer && !that.audioPlayer.ended) {
|
|
|
that.audioPlayer.pause()
|
|
|
}
|
|
|
- that.audioPlayer = new Audio('http://47.107.166.80:8008' + res.msg)
|
|
|
+ that.audioPlayer = new Audio(ajaxOrigin + res.msg)
|
|
|
that.audioPlayer.muted = that.ariaSettings.isMuted
|
|
|
that.audioPlayer.playbackRate = speechRateFactors[that.ariaSettings.speechRateLevel]
|
|
|
that.audioPlayer.oncanplaythrough = () => {
|
|
@@ -762,7 +763,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- XHR.open("POST", "http://47.107.166.80:8008/api/tts/toMp3")
|
|
|
+ XHR.open("POST", `${ajaxOrigin}/api/tts/toMp3`)
|
|
|
XHR.setRequestHeader("Content-Type", "application/json;charset=UTF-8")
|
|
|
XHR.send(JSON.stringify({
|
|
|
content: text || this.elemType + (this.elemType ? ': ' : '') + this.elemDisc
|