veplayer-mp-wechat
Advanced tools
Comparing version
@@ -70,4 +70,3 @@ "use strict"; | ||
delay: 10000, | ||
focusDelay: 0, | ||
clickHide: false // tap的时候是否隐藏 | ||
focusDelay: 0, // 隐藏态进入focus态是否自动 | ||
}; |
@@ -29,9 +29,3 @@ "use strict"; | ||
} | ||
this.switchOutControls(newVal, interactState); | ||
// if (newVal !== ControlsStates.NATIVE) { | ||
// const _auto = !(!newVal || newVal === ControlsStates.HIDDEN) | ||
// const _state = !newVal || newVal === ControlsStates.HIDDEN || newVal === ControlsStates.BLUR ? InteractStates.BLUR : InteractStates.FOCUS | ||
// console.log(`>>>observer switchControls ${videoId} state:${_state} auto:${_auto} interactState:${interactState}`) | ||
// this.switchControls(_state, _auto, true) | ||
// } | ||
this.switchOutControls(newVal, false); | ||
} | ||
@@ -170,3 +164,3 @@ }, | ||
'interactState': function () { | ||
const { interactState, autoSwitch } = this.data; | ||
const { interactState, autoSwitch, controls } = this.data; | ||
const data = { | ||
@@ -176,2 +170,3 @@ show: interactState !== "blur" /* InteractStates.BLUR */, | ||
isAuto: autoSwitch, | ||
controls | ||
}; | ||
@@ -277,5 +272,5 @@ this.media && this.media.emit(index_1.MediaEvents.CONTROLSTOGGLE, data); | ||
// this.switchControls(ret.state, ret.auto, true) | ||
this.switchOutControls(controls); | ||
this.switchOutControls(controls, true); | ||
}, | ||
switchOutControls(newVal, state) { | ||
switchOutControls(newVal, isAuto = false) { | ||
if (newVal === "native" /* ControlsStates.NATIVE */) { | ||
@@ -291,4 +286,8 @@ return; | ||
} | ||
if (this._fTimer) { | ||
clearTimeout(this._fTimer); | ||
this._fTimer = null; | ||
} | ||
console.log(`>>>switchOutControls controls:${newVal} state:${_state} isAuto:${_isBlur}`); | ||
this.switchControls(_state, _state === "focus" /* InteractStates.FOCUS */, true); | ||
this.switchControls(_state, _state === "focus" /* InteractStates.FOCUS */, isAuto); | ||
if (focusDelay && _isBlur) { | ||
@@ -547,2 +546,6 @@ this._pTimer = setTimeout(() => { | ||
} | ||
// 由外部交互的的时候关闭内部交互 | ||
if (controls !== "custom" /* ControlsStates.CUSTOM */ || !enablePlayGesture) { | ||
return; | ||
} | ||
let nextState = ''; | ||
@@ -570,6 +573,2 @@ let _auto = false; | ||
console.log(`>>>switchControls onTap ${videoId} controls:${controls} interactState:${interactState} nextState:${nextState}`); | ||
// 由外部交互的的时候关闭内部交互 | ||
if (controls === "hidden" /* ControlsStates.HIDDEN */) { | ||
return; | ||
} | ||
nextState && this.switchControls(nextState, _auto, false); | ||
@@ -576,0 +575,0 @@ }, |
{ | ||
"name": "veplayer-mp-wechat", | ||
"version": "1.2.2-alpha.6", | ||
"version": "1.2.2-alpha.7", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "miniprogram": "dist", |
145896
-0.23%2440
-0.08%