1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- // components/videoToast/videoToast.js
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- videoSrc:{
- type:String,
- value:null
- },
- poster:{
- type:String,
- value:null
- }
- },
- /**
- * 组件的初始数据
- */
- data: {
- videoContext:null
- },
- ready:function () {
- this.data.videoContext = wx.createVideoContext('myVideo')
- },
- /**
- * 组件的方法列表
- */
- methods: {
- hiddenAction:function () {
- this.data.videoContext.stop();
- this.triggerEvent('action');
- },
- /**
- * 阻断事件透传
- */
- tapAction:function() {
-
- }
- }
- })
|