添加音频重新加载功能
This commit is contained in:
@@ -66,9 +66,7 @@ const checkAudioProgress = async () => {
|
||||
if (audioInitProgress.value === 1) return resolve();
|
||||
audioTimer.value = setInterval(() => {
|
||||
const result = AudioManager.getLoadProgress();
|
||||
if (result > audioProgress.value) {
|
||||
audioProgress.value = result;
|
||||
}
|
||||
audioProgress.value = result;
|
||||
if (audioProgress.value === 1) {
|
||||
setTimeout(() => {
|
||||
audioInitProgress.value = 1;
|
||||
@@ -227,7 +225,12 @@ const goCalibration = async () => {
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
<text>资源加载中...</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>若加载时间过长,请</text>
|
||||
<button hover-class="none" @click="AudioManager.reloadAll">
|
||||
点击这里重启
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -321,11 +324,21 @@ const goCalibration = async () => {
|
||||
width: 46rpx;
|
||||
height: 26rpx;
|
||||
}
|
||||
.audio-progress > view:nth-child(2) > text {
|
||||
width: 100%;
|
||||
.audio-progress > view:nth-child(3) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.audio-progress > view:nth-child(3) > text {
|
||||
font-size: 22rpx;
|
||||
color: #a2a2a2;
|
||||
text-align: center;
|
||||
margin-top: 10rpx;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
.audio-progress > view:nth-child(3) > button {
|
||||
font-size: 22rpx;
|
||||
color: #ffe431;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user