xgplayer-mp4 2.0.1 → 2.0.3

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-mp4",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "xgplayer plugin for mp4 transform to fmp4",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
@@ -8,8 +8,7 @@
8
8
  "build": "node ./src/version.js && webpack --progress --display-chunks -p",
9
9
  "watch": "webpack --progress --display-chunks -p --watch",
10
10
  "test": "karma start --single-run",
11
- "test:watch": "karma start",
12
- "publish": "npm publish --registry=https://registry.npmjs.org"
11
+ "test:watch": "karma start"
13
12
  },
14
13
  "repository": {
15
14
  "type": "git",
package/src/media/task.js CHANGED
@@ -110,7 +110,8 @@ class Task {
110
110
  }
111
111
 
112
112
  run () {
113
- if (this.xhr.readyState === 1) {
113
+ // 兼容有些情况下调用open方法后,readyState为0的问题
114
+ if (this.xhr.readyState === 1 || this.xhr.OPENED === 1) {
114
115
  this.running = true
115
116
  this.xhr.send()
116
117
  } else {
package/version.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "2.0.1"
2
+ "version": "2.0.3"
3
3
  }