xgplayer 3.0.17-alpha.0 → 3.0.17-alpha.2

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/es/index.css CHANGED
@@ -176,7 +176,7 @@
176
176
  margin-left: 16px;
177
177
  margin-right: 16px;
178
178
  cursor: pointer;
179
- color: rgba(255, 255, 255, 0.8);
179
+ color: rgb(255, 255, 255);
180
180
  fill: #fff;
181
181
  }
182
182
  .xgplayer xg-icon.xg-icon-disable {
@@ -260,7 +260,7 @@
260
260
  padding: 4px 6px;
261
261
  background: rgba(0, 0, 0, 0.54);
262
262
  border-radius: 4px;
263
- font-size: 11px;
263
+ font-size: 12px;
264
264
  color: #fff;
265
265
  text-align: center;
266
266
  white-space: nowrap;
@@ -409,7 +409,7 @@
409
409
  height: 0;
410
410
  opacity: 0.85;
411
411
  font-size: 14px;
412
- color: rgba(255, 255, 255, 0.8);
412
+ color: rgb(255, 255, 255);
413
413
  }
414
414
  .xgplayer .xg-options-list li {
415
415
  height: 20px;
@@ -417,6 +417,7 @@
417
417
  position: relative;
418
418
  padding: 4px 0;
419
419
  text-align: center;
420
+ color: rgb(255, 255, 255);
420
421
  }
421
422
  .xgplayer .xg-options-list li:hover {
422
423
  color: #FF0000;
@@ -456,12 +457,6 @@
456
457
  padding: 0;
457
458
  position: relative;
458
459
  }
459
- .xgplayer .xg-options-list.xg-side-list li:hover {
460
- color: rgba(255, 255, 255, 0.8);
461
- }
462
- .xgplayer .xg-options-list.xg-side-list li.selected {
463
- color: #FF0000;
464
- }
465
460
  .xgplayer .xg-options-list.xg-side-list li span {
466
461
  display: block;
467
462
  position: relative;
@@ -502,6 +497,9 @@
502
497
  .xgplayer-mobile .xg-options-icon.portrait {
503
498
  display: none;
504
499
  }
500
+ .xgplayer-mobile .xg-options-list li:hover {
501
+ color: rgb(255, 255, 255);
502
+ }
505
503
  }
506
504
  .xgplayer xg-thumbnail {
507
505
  display: block;
@@ -1,6 +1,5 @@
1
1
  import { createClass as _createClass, classCallCheck as _classCallCheck } from "../../_virtual/_rollupPluginBabelHelpers.js";
2
2
  import util from "../../utils/util.js";
3
- import sniffer from "../../utils/sniffer.js";
4
3
  import "../../utils/debug.js";
5
4
  import Plugin from "../../plugin/plugin.js";
6
5
  var OptionList = /* @__PURE__ */ function() {
@@ -18,7 +17,7 @@ var OptionList = /* @__PURE__ */ function() {
18
17
  }
19
18
  this.onItemClick = this.onItemClick.bind(this);
20
19
  this.renderItemList();
21
- var eventName = sniffer.device === "mobile" ? "touchend" : "click";
20
+ var eventName = this.config.domEventType === "touche" ? "touchend" : "click";
22
21
  this._delegates = Plugin.delegate.call(this, this.root, "li", eventName, this.onItemClick);
23
22
  }
24
23
  _createClass(OptionList2, [{
@@ -77,7 +77,8 @@ var OptionsIcon = /* @__PURE__ */ function(_Plugin) {
77
77
  var _this2 = this;
78
78
  var config = this.config;
79
79
  this.initIcons();
80
- if (IS_MOBILE && config.listType !== LIST_TYPES.MIDDLE) {
80
+ IS_MOBILE = IS_MOBILE || this.domEventType === "touch";
81
+ if (sniffer.device === "mobile" && config.listType !== LIST_TYPES.MIDDLE) {
81
82
  config.listType = LIST_TYPES.SIDE;
82
83
  }
83
84
  config.hidePortrait && util.addClass(this.root, "portrait");
@@ -168,7 +169,7 @@ var OptionsIcon = /* @__PURE__ */ function(_Plugin) {
168
169
  }, {
169
170
  key: "toggle",
170
171
  value: function toggle(isActive) {
171
- if (isActive === this.isActive)
172
+ if (isActive === this.isActive || this.config.disable)
172
173
  return;
173
174
  var controls = this.player.controls;
174
175
  var listType = this.config.listType;
@@ -229,7 +230,8 @@ var OptionsIcon = /* @__PURE__ */ function(_Plugin) {
229
230
  className: getListClassName(config.listType, config.position),
230
231
  onItemClick: function onItemClick(e, data) {
231
232
  _this4.onItemClick(e, data);
232
- }
233
+ },
234
+ domEventType: IS_MOBILE ? "touche" : "mouse"
233
235
  },
234
236
  root: config.listType === LIST_TYPES.SIDE ? player.innerContainer || player.root : this.root
235
237
  };
@@ -7,7 +7,7 @@
7
7
  display: block;
8
8
  }
9
9
  }
10
-
10
+
11
11
  @keyframes xg_right_options_active {
12
12
  0% {
13
13
  transform: translateX(50%);
@@ -66,6 +66,7 @@
66
66
  position: relative;
67
67
  padding: 4px 0;
68
68
  text-align: center;
69
+ color: $definitionLiColor;
69
70
  &:hover{
70
71
  color: $definitionLiActiveColor;
71
72
  opacity: 1;
@@ -103,12 +104,6 @@
103
104
  width: 100%;
104
105
  padding: 0;
105
106
  position: relative;
106
- &:hover{
107
- color: $definitionLiColor;
108
- }
109
- &.selected {
110
- color: $definitionLiActiveColor;
111
- }
112
107
  span {
113
108
  display: block;
114
109
  position: relative;
@@ -152,9 +147,16 @@
152
147
  }
153
148
 
154
149
  @media only screen and (max-width: 480px) {
155
- .xgplayer-mobile .xg-options-icon {
156
- &.portrait {
157
- display: none;
150
+ .xgplayer-mobile {
151
+ .xg-options-icon {
152
+ &.portrait {
153
+ display: none;
154
+ }
155
+ }
156
+ .xg-options-list li {
157
+ &:hover{
158
+ color: $definitionLiColor;
159
+ }
158
160
  }
159
161
  }
160
162
  }
@@ -1,10 +1,6 @@
1
1
  @import "../../style/variable";
2
2
  //controls
3
3
  $controlHeight: 48px;
4
- // tips
5
- // $tipsColor: #fff;
6
- // $tipsBgColor: rgba(0, 0, 0, 0.8);
7
- // $tipsFontsize: 12px;
8
4
 
9
5
  .xgplayer {
10
6
  &.not-allow-autoplay,
@@ -41,7 +41,7 @@
41
41
  display: inline-block;
42
42
  position: relative;
43
43
  font-size: 13px;
44
- color: rgba(255, 255, 255, 0.8);
44
+ color: rgb(255, 255, 255);
45
45
  z-index: 36;
46
46
  }
47
47
  .xgplayer .xgplayer-panel .xgplayer-panel-icon {
@@ -1,7 +1,7 @@
1
1
  // definition
2
- $definitionLiColor: rgba(255, 255, 255, 0.80);
2
+ $definitionLiColor: rgba(255, 255, 255, 1);
3
3
  $definitionLiActiveColor: #fff;
4
- $definitionNameColor: rgba(255, 255, 255, 0.80);
4
+ $definitionNameColor: rgba(255, 255, 255, 1);
5
5
  $definitionNameBgColor: rgba(0, 0, 0, 0.38);
6
6
 
7
7
  // slider
@@ -144,7 +144,7 @@
144
144
  font-size: 13px;
145
145
  line-height: 20px;
146
146
  height: 20px;
147
- color: rgba(255, 255, 255, 0.8);
147
+ color: rgb(255, 255, 255);
148
148
  line-height: 40px;
149
149
  }
150
150
  .xgplayer-miniicon .name span {
@@ -7,8 +7,8 @@
7
7
  display: flex;
8
8
  align-items: center;
9
9
  position: relative;
10
- min-width: 50px;
11
- height: 12px;
10
+ min-width: 10px;
11
+ height: 20px;
12
12
  left: 0;
13
13
  right: 0;
14
14
  top: 0;
@@ -150,7 +150,7 @@ var Progress = /* @__PURE__ */ function(_Plugin) {
150
150
  }
151
151
  util.setTimeout(_assertThisInitialized(_this), function() {
152
152
  _this.resetSeekState();
153
- }, 10);
153
+ }, 1);
154
154
  player.focus();
155
155
  });
156
156
  _defineProperty(_assertThisInitialized(_this), "onMouseMove", function(e) {
@@ -624,7 +624,7 @@ var Progress = /* @__PURE__ */ function(_Plugin) {
624
624
  this.unbind("mouseleave", this.onMouseLeave);
625
625
  document.removeEventListener("mousemove", this.onMouseMove, false);
626
626
  document.removeEventListener("mouseup", this.onMouseUp, false);
627
- player.root.removeEventListener("click", this.onBodyClick, true);
627
+ player.root.removeEventListener("click", this.onBodyClick, false);
628
628
  }
629
629
  }
630
630
  }, {
@@ -5,8 +5,8 @@
5
5
  display: flex;
6
6
  align-items: center;
7
7
  position: relative;
8
- min-width: 50px;
9
- height: 12px;
8
+ min-width: 10px;
9
+ height: 20px;
10
10
  left: 0;
11
11
  right: 0;
12
12
  top: 0;
File without changes
File without changes
File without changes
@@ -3,23 +3,16 @@
3
3
  $playerBgColor: #000;
4
4
  $playerIconColor: #fff;
5
5
 
6
- // controls
7
- $controlsBgImage: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .37), rgba(0, 0, 0, .75), rgba(0, 0, 0, .75));
8
-
9
6
  // progress-bar
10
7
  $progressOuterBgColor: rgba(255, 255, 255, 0.30);
11
8
  $progressCacheBgColor: rgba(255, 255, 255, 0.50);
12
9
  $progressPlayedBgImage: linear-gradient(-90deg, #FA1F41 0%, #E31106 100%);
13
- $progressPlayedShadow: 0 0 2px 0 rgba(0, 0, 0, 0.26);
14
-
15
- // time
16
- $timeColor: #fff;
17
- $timeDurationColor: rgba(255, 255, 255, 0.50);
10
+ // $progressPlayedShadow: 0 0 2px 0 rgba(0, 0, 0, 0.26);
18
11
 
19
12
  // tips
20
13
  $tipsColor: #fff;
21
14
  $tipsBgColor: rgba(0, 0, 0, 0.54);
22
- $tipsFontsize: 11px;
15
+ $tipsFontsize: 12px;
23
16
 
24
17
  // slider
25
18
  $sliderBgColor: rgba(0, 0, 0, 0.54);
@@ -38,9 +31,9 @@ $startHoverFillColor: rgba(255, 255, 255, 0.6);
38
31
  // definition
39
32
 
40
33
  $definitionUlBgColor: rgba(0, 0, 0, 0.54);
41
- $definitionLiColor: rgba(255, 255, 255, 0.80);
34
+ $definitionLiColor: rgba(255, 255, 255, 1);
42
35
  $definitionLiActiveColor: #FF0000;
43
- $definitionNameColor: rgba(255, 255, 255, 0.80);
36
+ $definitionNameColor: rgba(255, 255, 255, 1);
44
37
  $definitionNameBgColor: rgba(0, 0, 0, 0.38);
45
38
 
46
39
  // replay
package/es/version.js CHANGED
@@ -1,2 +1,2 @@
1
- var version = "3.0.17-alpha.0";
1
+ var version = "3.0.17-alpha.2";
2
2
  export { version as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xgplayer",
3
- "version": "3.0.17-alpha.0",
3
+ "version": "3.0.17-alpha.2",
4
4
  "description": "video player",
5
5
  "main": "dist/index.min.js",
6
6
  "module": "es/index.js",
@@ -16,7 +16,7 @@
16
16
  "publishConfig": {
17
17
  "registry": "https://registry.npmjs.org/",
18
18
  "access": "public",
19
- "tag": "alpha"
19
+ "tag": "al"
20
20
  },
21
21
  "files": [
22
22
  "dist",