完成第一部分
This commit is contained in:
41
pages/test/testVideo/testVideo.js
Normal file
41
pages/test/testVideo/testVideo.js
Normal file
@ -0,0 +1,41 @@
|
||||
Page({
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
videoPlay(){
|
||||
this.videoContext.play()
|
||||
},
|
||||
|
||||
videoPause() {
|
||||
this.videoContext.pause()
|
||||
},
|
||||
|
||||
videoPlayBackRate() {
|
||||
this.videoContext.playbackRate(1.5)
|
||||
},
|
||||
|
||||
videorequestFullScreen() {
|
||||
this.videoContext.requestFullScreen()
|
||||
},
|
||||
|
||||
videoSeek0() {
|
||||
this.videoContext.seek(0)
|
||||
},
|
||||
|
||||
bindInputBlur: function (e) {
|
||||
this.inputValue = e.detail.value
|
||||
},
|
||||
|
||||
bindSendDanmu: function () {
|
||||
this.videoContext.sendDanmu({
|
||||
text: this.inputValue,
|
||||
color:"#FFFFF"
|
||||
})
|
||||
},
|
||||
onReady: function () {
|
||||
this.videoContext = wx.createVideoContext('Video')
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user