xgplayer 2.31.6 → 2.31.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xgplayer",
3
- "version": "2.31.6",
3
+ "version": "2.31.7",
4
4
  "description": "video player",
5
5
  "main": "./dist/index.js",
6
6
  "typings": "./types/index.d.ts",
@@ -15,6 +15,7 @@
15
15
  "release:stable": "npm version patch && npm publish --registry=https://registry.npmjs.org",
16
16
  "release:alpha": "npm version prerelease --preid=alpha && npm publish --tag xgplayer-2-alpha --registry=https://registry.npmjs.org",
17
17
  "release:alpha-test": "npm publish --tag alpha-test-2x --registry=https://registry.npmjs.org"
18
+
18
19
  },
19
20
  "keywords": [
20
21
  "video",
package/src/player.js CHANGED
@@ -330,12 +330,12 @@ class Player extends Proxy {
330
330
  allOff(this)
331
331
  }
332
332
 
333
- if (!this.paused) {
334
- this.pause()
335
- this.once('pause', destroyFunc)
336
- } else {
337
- destroyFunc.call(this)
338
- }
333
+ // destroy immediately
334
+ // Don't use the paused property detection, it doesn't use MediaElement.paused,
335
+ // so it's not accurate enough. Destroy after waiting for pause event, this
336
+ // changes the synchronous behavior of destroy api
337
+ destroyFunc.call(this)
338
+
339
339
  super.destroy()
340
340
  }
341
341
 
@@ -56,6 +56,7 @@ let s_definition = function () {
56
56
  return a.href === src
57
57
  }
58
58
  })
59
+ console.warn('cursrc:', cursrc, 'src:', src, 'list:', list)
59
60
  tmp.push(`</ul><p class='name'>${(cursrc[0] || {name: ''}).name}</p>`)
60
61
  let urlInRoot = root.querySelector('.xgplayer-definition')
61
62
  if (urlInRoot) {
@@ -26,7 +26,7 @@ let s_playNext = function () {
26
26
  let onUrlListEnd = function () {
27
27
  addClass(player.root, 'xgplayer-playnext-inactive')
28
28
  }
29
- player.on('urlListEnd', onUrlListEnd)
29
+ player.on('urlListEnd', onUrlListEnd)
30
30
 
31
31
  function onDestroy () {
32
32
  player.off('urlListEnd', onUrlListEnd)
package/version.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "2.31.6"
2
+ "version": "2.31.7"
3
3
  }