| | |
| | | }}</el-button> |
| | | </div> |
| | | <div class="audio-play" v-if="showAudioPlay"> |
| | | <div> |
| | | <vue-audio-better :src="audioUrl" :options="playerOptions" /> |
| | | </div> |
| | | <div>{{ t('courseCenter.listeningTrial') }}...</div> |
| | | <el-button @click="pauseAudio">{{ t('courseCenter.cancelTrialListening') }}</el-button> |
| | | </div> |
| | | <div class="audio-play" v-if="showAudioPlay1"> |
| | |
| | | </div> |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import VueAudioBetter from 'vue-audio-better'; |
| | | import { ref, reactive, onMounted } from 'vue' |
| | | import draggable from 'vuedraggable' |
| | | |
| | |
| | | inputRef.value.focus() |
| | | }) |
| | | } |
| | | const playerOptions = { |
| | | autoplay: false, // 是否自动播放 |
| | | controls: true, // 是否显示控制条 |
| | | preload: 'auto', // 预加载策略 |
| | | }; |
| | | let audioUrl = '' |
| | | // 保存编辑后的名称 |
| | | const saveEdit = () => { |
| | | isEditing.value = false |
| | |
| | | item.isActive = false |
| | | }) |
| | | hostList.value = data.list |
| | | humanId=hostList.value[0].id |
| | | selectHost.value = hostList.value[0] |
| | | // 切换数字人姿势条件时,修改数字人在ppt的位置 |
| | | initHumanPositon(selectHost.value) |
| | |
| | | .then((res) => { |
| | | if (res && !res.error) { |
| | | console.log(res) |
| | | audioUrl = res |
| | | showAudioPlay1.value = false |
| | | showAudioPlay.value = true |
| | | // 如果返回结果有效且没有错误,初始化Audio |