[Bugfix] 修复音频播放界面错误的问题
This commit is contained in:
parent
b3cce13eeb
commit
376bb01bd8
|
@ -31,10 +31,10 @@ Component({
|
|||
if (audioCtx === null) {
|
||||
console.log("不存在音频上下文,创建...");
|
||||
audioCtx = wx.createInnerAudioContext()
|
||||
audioCtx.src = network.backstageUrl + this.properties.audio
|
||||
audioCtx.onEnded(() => this.setData({isPlaying: false, currTime: 0}))
|
||||
this.setData({audioCtx})
|
||||
}
|
||||
audioCtx.src = network.backstageUrl + this.properties.audio
|
||||
audioCtx.play()
|
||||
// 开始监听播放进度
|
||||
if (this.data.playListenerTimer === -1) {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<view class="poem-audio-container">
|
||||
<view class="lyric-area">
|
||||
{词解析器空位}
|
||||
</view>
|
||||
<audio-controls currTime="{{currTime}}"
|
||||
fullTime="{{fullTime}}"
|
||||
|
|
|
@ -1,38 +1,10 @@
|
|||
.poem-audio-container {
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.slider .time {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
color: #999999;
|
||||
font-size: 22rpx;
|
||||
flex-direction: column;
|
||||
height: calc(100vh - 52px - 40px);
|
||||
}
|
||||
|
||||
.controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
margin: 20rpx;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #3c9cff;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-large {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.btn-mid {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
.lyric-area {
|
||||
flex: 1;
|
||||
}
|
Loading…
Reference in New Issue