veplayer-mp-douyin
Advanced tools
Comparing version 0.1.11 to 0.1.12
@@ -21,3 +21,9 @@ "use strict"; | ||
observer(newVal, oldVal, _changedPath) { | ||
// console.log(`!!!!!Player${this.data.videoId} controls:`, `newVal:${newVal}, oldVal:${oldVal}, !!newVal:${!!newVal}`); | ||
const { customControls } = this.data; | ||
// console.log(`!!!!!Player${this.data.videoId} controls:`, `newVal:${newVal}, oldVal:${oldVal}, !!newVal:${!!newVal} customControls:${customControls}`); | ||
if (!customControls) { | ||
this.setData({ | ||
customControls: newVal === 'native' ? false : newVal | ||
}); | ||
} | ||
if (newVal !== 'native') { | ||
@@ -91,2 +97,3 @@ newVal ? this.focusPlayer(false) : this.blurPlayer(); | ||
isFocus: true, | ||
customControls: false, | ||
// 可否可使用video以外的其他tagType | ||
@@ -175,2 +182,3 @@ canUseOtherType: true, | ||
const { videoId, videoProps, isFullScreen, loadedMeta, toggleCtrlOverLayer, ended } = this.data; | ||
const { controls } = this.properties; | ||
// console.log('>>>>Player attached', this.properties.loggerInfo) | ||
@@ -182,5 +190,6 @@ let _videoId = videoId || componentId; | ||
this.setData({ | ||
videoId: _videoId | ||
videoId: _videoId, | ||
customControls: controls !== 'native' ? controls : false | ||
}); | ||
const videoCtx = wx.createVideoContext(_videoId, this); | ||
const videoCtx = tt.createVideoContext(_videoId, this); | ||
const propsClassNames = ((_a = videoProps.className) === null || _a === void 0 ? void 0 : _a.split(' ')) || []; | ||
@@ -365,3 +374,3 @@ const classNames = [ | ||
onTimeupdate(e) { | ||
const { seeking } = this.data; | ||
const { seeking, paused } = this.data; | ||
const { currentTime, duration } = e.detail; | ||
@@ -378,2 +387,5 @@ // console.log('Math.floor((currentTime / duration) * 100)', Math.floor((currentTime / duration) * 100)) | ||
} | ||
if (paused) { | ||
data.paused = false; | ||
} | ||
this.setData(data); | ||
@@ -380,0 +392,0 @@ this._emitEvt(index_1.MediaEvents.TIMEUPDATE, e); |
{ | ||
"name": "veplayer-mp-douyin", | ||
"version": "0.1.11", | ||
"version": "0.1.12", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "miniprogramType": "tt-npm", |
Sorry, the diff of this file is not supported yet
121648
1942