Skip to content

Commit

Permalink
release: xgplayer@3.0.17-alpha.12
Browse files Browse the repository at this point in the history
  • Loading branch information
hongqx authored and gemxx committed May 15, 2024
1 parent f7e8b03 commit 0df22b1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
2 changes: 1 addition & 1 deletion packages/xgplayer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xgplayer",
"version": "3.0.17-alpha.11",
"version": "3.0.17-alpha.12",
"description": "video player",
"main": "dist/index.min.js",
"module": "es/index.js",
Expand Down
11 changes: 1 addition & 10 deletions packages/xgplayer/src/plugins/mobile/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ class MobilePlugin extends Plugin {
});
['dragend', 'click'].forEach(key => {
progressPlugin.addCallBack(key, () => {
console.log('>>>changeAction ACTIONS.AUTO progressPlugin')
this.changeAction(ACTIONS.AUTO)
})
})
Expand Down Expand Up @@ -358,7 +357,7 @@ class MobilePlugin extends Plugin {
*/
endLastMove (lastScope) {
const { pos, player, config } = this
console.log('>>>endLastMove', lastScope)

const time = (pos.time - this.timeOffset) / 1000
switch (lastScope) {
case 0:
Expand All @@ -372,7 +371,6 @@ class MobilePlugin extends Plugin {
case 2:
default:
}
console.log('>>>changeAction ACTIONS.AUTO endLastMove')
this.changeAction(ACTIONS.AUTO)
}

Expand Down Expand Up @@ -450,7 +448,6 @@ class MobilePlugin extends Plugin {
}

onTouchEnd = (e) => {
console.log('>>>>onTouchEnd', this.pos.scope)
const { player, pos, playerConfig } = this
setTimeout(() => {
player.getPlugin('progress') && player.getPlugin('progress').resetSeekState()
Expand All @@ -471,7 +468,6 @@ class MobilePlugin extends Plugin {
pos.scope = -1
this.resetPos()
Util.checkIsFunction(playerConfig.enableSwipeHandler) && playerConfig.enableSwipeHandler()
console.log('>>>changeAction ACTIONS.AUTO1')
this.changeAction(ACTIONS.AUTO)
}

Expand All @@ -498,7 +494,6 @@ class MobilePlugin extends Plugin {
}

onRootTouchEnd = (e) => {
console.log('>>>>onRootTouchEnd', this.pos.scope)
if (this.pos.scope > -1) {
this.onTouchEnd(e)
// const { controls } = this.player
Expand All @@ -516,7 +511,6 @@ class MobilePlugin extends Plugin {
}

clickHandler (e) {
console.log('>>>clickHandler')
const { player, config, playerConfig } = this
if (player.state < STATES.RUNNING) {
if (!playerConfig.closeVideoClick) {
Expand Down Expand Up @@ -546,15 +540,13 @@ class MobilePlugin extends Plugin {
}

onClick (e) {
console.log('>>>onClick')
const { player } = this
runHooks(this, HOOKS[0], (plugin, data) => {
this.clickHandler(data.e)
}, { e, paused: player.paused })
}

onDbClick (e) {
console.log('>>>onDbClick')
const { player } = this
runHooks(this, HOOKS[1], (plugin, data) => {
this.dbClickHandler(data.e)
Expand Down Expand Up @@ -584,7 +576,6 @@ class MobilePlugin extends Plugin {
this.emitUserAction('pressend', 'change_rate', { prop: 'playbackRate', from: player.playbackRate, to: pos.rate })
player.playbackRate = pos.rate
pos.rate = 1
console.log('>>>changeAction ACTIONS.AUTO2')
this.changeAction(ACTIONS.AUTO)
}

Expand Down
7 changes: 0 additions & 7 deletions packages/xgplayer/src/plugins/mobile/touch.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,14 @@ class Touche {
}

__setDb (e) {
console.log('>>>__setDb', this.dbIntrvalId)
const { config } = this
if (this.dbIntrvalId) {
console.log('>>>__setDb __clearDb')
this.__clearDb()
this.trigger(EVENTS.DOUBlE_CLICK, e)
return
}
this.dbIntrvalId = setTimeout(() => {
this.__clearDb()
console.log('>>>__setDb setTimeout', `start:${this._pos.start} press:${this._pos.press} moving:${this._pos.moving}`, !this._pos.start && !this._pos.press && !this._pos.moving)
if (!this._pos.start && !this._pos.press && !this._pos.moving) {
this.trigger(EVENTS.CLICK, e)
}
Expand Down Expand Up @@ -151,7 +148,6 @@ class Touche {

onTouchStart = (e) => {
const { _pos, root } = this
console.log('>>>> touche onTouchStart', _pos.moving)
// config.needPreventDefault && preventToucheDefault(e)
const touch = getTouch(e.touches)
_pos.x = touch ? parseInt(touch.pageX, 10) : e.pageX
Expand All @@ -170,8 +166,6 @@ class Touche {

onTouchEnd = (e) => {
const { _pos, root } = this
console.log('>>>>touche onTouchEnd', `press:${_pos.press} moving:${_pos.moving}`, !_pos.press && !_pos.moving)
// config.needPreventDefault && preventToucheDefault(e)
this.__clearPress()
root.removeEventListener(this.events.cancel, this.onTouchCancel)
root.removeEventListener(this.events.end, this.onTouchEnd)
Expand All @@ -188,7 +182,6 @@ class Touche {

onTouchMove = (e) => {
const { _pos, config } = this
console.log('>>>> touche onTouchMove', _pos.moving)
const touch = getTouch(e.touches)
const x = touch ? parseInt(touch.pageX, 10) : e.pageX
const y = touch ? parseInt(touch.pageY, 10) : e.pageX
Expand Down

0 comments on commit 0df22b1

Please sign in to comment.