@fonixtree/magic-design 0.1.5 → 0.1.6
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/common/Video/components/index.js +14 -6
- package/es/common/Video/index.js +3 -1
- package/es/composite-comp/bol/components/Video/pc/Layout1/index.less +1 -0
- package/es/composite-comp/bol/components/Video/pc/Layout2/index.less +1 -0
- package/es/composite-comp/bol/components/Video/pc/Layout3/index.less +1 -0
- package/es/composite-comp/bol/config-panels/VideoConfig/index.js +1 -1
- package/lib/common/Video/components/index.js +14 -6
- package/lib/common/Video/index.js +3 -1
- package/lib/composite-comp/bol/components/Video/pc/Layout1/index.less +1 -0
- package/lib/composite-comp/bol/components/Video/pc/Layout2/index.less +1 -0
- package/lib/composite-comp/bol/components/Video/pc/Layout3/index.less +1 -0
- package/lib/composite-comp/bol/config-panels/VideoConfig/index.js +1 -1
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ function parseDom(html) {
|
|
|
13
13
|
return ele.childNodes[0];
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
var rateHtml = "<div class=\"rate-components\">\n <div class=\"current-rate\">1.0x</div>\n <ul class=\"rate-list\">\n <li data-rate=\"2.0\">2.0x</li>\n <li data-rate=\"1.5\">1.5x</li>\n <li data-rate=\"1.
|
|
16
|
+
var rateHtml = "<div class=\"rate-components\">\n <div class=\"current-rate\">1.0x</div>\n <ul class=\"rate-list\">\n <li data-rate=\"2.0\">2.0x</li>\n <li data-rate=\"1.5\">1.5x</li>\n <li data-rate=\"1.0\" class=\"current\">1.0x</li>\n <li data-rate=\"0.5\">0.5x</li>\n </ul>\n</div>";
|
|
17
17
|
/**
|
|
18
18
|
* 倍速播放组件
|
|
19
19
|
*/
|
|
@@ -33,10 +33,18 @@ function () {
|
|
|
33
33
|
eleControlbar.appendChild(this.html);
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
RateComponent.prototype.ready = function (player
|
|
36
|
+
RateComponent.prototype.ready = function (player) {
|
|
37
37
|
var currentRateEle = this.html.querySelector('.current-rate');
|
|
38
38
|
var rateListEle = this.html.querySelector('.rate-list');
|
|
39
|
-
var timeId = null;
|
|
39
|
+
var timeId = null;
|
|
40
|
+
var currentEle = rateListEle.querySelector('.current');
|
|
41
|
+
|
|
42
|
+
if (currentEle) {
|
|
43
|
+
currentEle.className = '';
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
rateListEle.querySelector("[data-rate=\"" + player._speed + "\"]").className = 'current';
|
|
47
|
+
currentRateEle.innerText = player._speed + 'x'; // 隐藏设置里面的倍速播放
|
|
40
48
|
|
|
41
49
|
var settingRate = document.querySelector('.prism-setting-item.prism-setting-speed');
|
|
42
50
|
|
|
@@ -70,10 +78,10 @@ function () {
|
|
|
70
78
|
player.setSpeed(rate);
|
|
71
79
|
|
|
72
80
|
if (target.className !== 'current') {
|
|
73
|
-
var
|
|
81
|
+
var currentEle_1 = rateListEle.querySelector('.current');
|
|
74
82
|
|
|
75
|
-
if (
|
|
76
|
-
|
|
83
|
+
if (currentEle_1) {
|
|
84
|
+
currentEle_1.className = '';
|
|
77
85
|
}
|
|
78
86
|
|
|
79
87
|
target.className = 'current';
|
package/es/common/Video/index.js
CHANGED
|
@@ -393,7 +393,9 @@ var createAliVideo = function createAliVideo(domId, opts) {
|
|
|
393
393
|
}
|
|
394
394
|
|
|
395
395
|
if (opts.speed) {
|
|
396
|
-
|
|
396
|
+
var speed = Number(opts.speed).toFixed(1);
|
|
397
|
+
player.setSpeed(speed);
|
|
398
|
+
player._speed = speed;
|
|
397
399
|
}
|
|
398
400
|
|
|
399
401
|
if (opts.startAt) {
|
|
@@ -122,7 +122,7 @@ function (_super) {
|
|
|
122
122
|
layout: "horizontal",
|
|
123
123
|
title: (0, _locale.i18n)('VIDEO_HEIGHT')
|
|
124
124
|
}, /*#__PURE__*/_react["default"].createElement(_common.InputNumber, {
|
|
125
|
-
max:
|
|
125
|
+
max: 4000,
|
|
126
126
|
onChange: function onChange(v) {
|
|
127
127
|
return _this.onChangeHeight(v);
|
|
128
128
|
},
|
|
@@ -13,7 +13,7 @@ function parseDom(html) {
|
|
|
13
13
|
return ele.childNodes[0];
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
var rateHtml = "<div class=\"rate-components\">\n <div class=\"current-rate\">1.0x</div>\n <ul class=\"rate-list\">\n <li data-rate=\"2.0\">2.0x</li>\n <li data-rate=\"1.5\">1.5x</li>\n <li data-rate=\"1.
|
|
16
|
+
var rateHtml = "<div class=\"rate-components\">\n <div class=\"current-rate\">1.0x</div>\n <ul class=\"rate-list\">\n <li data-rate=\"2.0\">2.0x</li>\n <li data-rate=\"1.5\">1.5x</li>\n <li data-rate=\"1.0\" class=\"current\">1.0x</li>\n <li data-rate=\"0.5\">0.5x</li>\n </ul>\n</div>";
|
|
17
17
|
/**
|
|
18
18
|
* 倍速播放组件
|
|
19
19
|
*/
|
|
@@ -33,10 +33,18 @@ function () {
|
|
|
33
33
|
eleControlbar.appendChild(this.html);
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
RateComponent.prototype.ready = function (player
|
|
36
|
+
RateComponent.prototype.ready = function (player) {
|
|
37
37
|
var currentRateEle = this.html.querySelector('.current-rate');
|
|
38
38
|
var rateListEle = this.html.querySelector('.rate-list');
|
|
39
|
-
var timeId = null;
|
|
39
|
+
var timeId = null;
|
|
40
|
+
var currentEle = rateListEle.querySelector('.current');
|
|
41
|
+
|
|
42
|
+
if (currentEle) {
|
|
43
|
+
currentEle.className = '';
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
rateListEle.querySelector("[data-rate=\"" + player._speed + "\"]").className = 'current';
|
|
47
|
+
currentRateEle.innerText = player._speed + 'x'; // 隐藏设置里面的倍速播放
|
|
40
48
|
|
|
41
49
|
var settingRate = document.querySelector('.prism-setting-item.prism-setting-speed');
|
|
42
50
|
|
|
@@ -70,10 +78,10 @@ function () {
|
|
|
70
78
|
player.setSpeed(rate);
|
|
71
79
|
|
|
72
80
|
if (target.className !== 'current') {
|
|
73
|
-
var
|
|
81
|
+
var currentEle_1 = rateListEle.querySelector('.current');
|
|
74
82
|
|
|
75
|
-
if (
|
|
76
|
-
|
|
83
|
+
if (currentEle_1) {
|
|
84
|
+
currentEle_1.className = '';
|
|
77
85
|
}
|
|
78
86
|
|
|
79
87
|
target.className = 'current';
|
|
@@ -393,7 +393,9 @@ var createAliVideo = function createAliVideo(domId, opts) {
|
|
|
393
393
|
}
|
|
394
394
|
|
|
395
395
|
if (opts.speed) {
|
|
396
|
-
|
|
396
|
+
var speed = Number(opts.speed).toFixed(1);
|
|
397
|
+
player.setSpeed(speed);
|
|
398
|
+
player._speed = speed;
|
|
397
399
|
}
|
|
398
400
|
|
|
399
401
|
if (opts.startAt) {
|
|
@@ -122,7 +122,7 @@ function (_super) {
|
|
|
122
122
|
layout: "horizontal",
|
|
123
123
|
title: (0, _locale.i18n)('VIDEO_HEIGHT')
|
|
124
124
|
}, /*#__PURE__*/_react["default"].createElement(_common.InputNumber, {
|
|
125
|
-
max:
|
|
125
|
+
max: 4000,
|
|
126
126
|
onChange: function onChange(v) {
|
|
127
127
|
return _this.onChangeHeight(v);
|
|
128
128
|
},
|