音乐播放控件问题
来源:10-13 真实感受Component与Model的好处

偶的王
2018-12-21
##const wxAudio = new wx.createInnerAudioContext()
我在查看文档的时候发现了这个对象,使用之后没有出现音乐控件。觉得不错和大家分享一下。可以试试
onPlay: function() {
if (!this.data.playing) {
this.setData({
playing: true,
});
wxAudio.src = this.properties.music_url
wxAudio.play()
} else {
this.setData({
playing: false,
})
wxAudio.pause()
}
},
_isPlay: function () {
if (wxAudio.src == this.properties.music_url) {
this.setData({
playing: true
})
}
}
写回答
1回答
-
7七月
2018-12-22
出现音乐控件是指什么?
022018-12-23
相似问题