when a video is played
you want to stop playing a video by clicking on a location
using VideoContext.stop () has no effect at all
see someone offering this idea:
_this.videoContext.seek(0)
_this.videoContext.pause();
/**
*
*
*/
palyVideo:function(e) {
let _this = this;
_this.setData({
hidden: false,
});
_this.videoContext.play();
},
/**
*
*
*/
hiddenVideo:function(e) {
let _this = this;
_this.videoContext.seek(0)
_this.videoContext.pause();
// _this.setData({
// hidden: true,
// });
},
/**
* --
*/
onReady: function (res) {
let _this = this;
_this.videoContext = wx.createVideoContext("myVideo");
},