@cloud-app-dev/vidc 3.0.7 → 3.0.10

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/.prettierrc CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "singleQuote": true,
3
3
  "trailingComma": "all",
4
- "printWidth": 180,
4
+ "printWidth": 150,
5
5
  "overrides": [
6
6
  {
7
7
  "files": ".prettierrc",
package/.umirc.ts CHANGED
@@ -87,12 +87,13 @@ export default defineConfig({
87
87
  --gray11: #4B4B4B;
88
88
  --gray12: #383838;
89
89
  --background: #348fe2;
90
+ --icon:#62708B;
90
91
  --fs: 14px;
91
92
  --fs-small: 12px;
92
93
  --fs-large: 20px;
93
94
  --color: rgba(0,0,0,1);
94
95
  --color-dark: #000000;
95
- --color-light: rgba(102,102,102,1);
96
+ --color-light: rgba(255,255,255,1);
96
97
  --color-disabled: rgba(0,0,0,0.26);
97
98
  --shadow1: 2px 0 10px 0 rgba(0,0,0,0.06);
98
99
  --shadow2: 2px 0 10px 0 rgba(0,0,0,0.06);
@@ -0,0 +1,20 @@
1
+ .custom-render-select {
2
+ display: inline-block;
3
+ position: relative;
4
+ width: max-content;
5
+ overflow: hidden;
6
+ }
7
+ .custom-render-select .custom-render-box {
8
+ display: inline-block;
9
+ position: relative;
10
+ z-index: 22;
11
+ }
12
+ .custom-render-select .cloudapp-select {
13
+ position: absolute;
14
+ width: max-content;
15
+ height: 100%;
16
+ left: 50%;
17
+ top: 50%;
18
+ opacity: 0;
19
+ transform: translate(-50%, -50%);
20
+ }
@@ -0,0 +1,10 @@
1
+ import { SelectProps } from 'antd';
2
+ import React from 'react';
3
+ import './index.less';
4
+ interface ICustomRenderSelectProps extends SelectProps {
5
+ children?: React.ReactNode;
6
+ value: any;
7
+ customRender: (value: any) => JSX.Element;
8
+ }
9
+ declare function CustomRenderSelect({ children, value, customRender, dropdownClassName, ...props }: ICustomRenderSelectProps): JSX.Element;
10
+ export default CustomRenderSelect;
@@ -0,0 +1,67 @@
1
+ import "antd/lib/select/style";
2
+ import _Select from "antd/lib/select";
3
+ import _useClickAway from "ahooks/es/useClickAway";
4
+ import _useToggle3 from "ahooks/es/useToggle";
5
+ import _uuid from "@cloud-app-dev/utils/es/uuid";
6
+
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+
9
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
+
11
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
12
+
13
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
14
+
15
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
16
+
17
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
+
19
+ import { __rest } from "tslib";
20
+ import React, { useMemo, useRef } from 'react';
21
+ import "./index.css";
22
+
23
+ function CustomRenderSelect(_a) {
24
+ var children = _a.children,
25
+ value = _a.value,
26
+ customRender = _a.customRender,
27
+ dropdownClassName = _a.dropdownClassName,
28
+ props = __rest(_a, ["children", "value", "customRender", "dropdownClassName"]);
29
+
30
+ var classname = useMemo(function () {
31
+ return "custom-render-select-dropdown-".concat(_uuid());
32
+ }, []);
33
+ var domRef = useRef(null);
34
+
35
+ var _useToggle = _useToggle3(),
36
+ _useToggle2 = _slicedToArray(_useToggle, 2),
37
+ open = _useToggle2[0],
38
+ _useToggle2$ = _useToggle2[1],
39
+ toggle = _useToggle2$.toggle,
40
+ set = _useToggle2$.set;
41
+
42
+ var getDoms = useMemo(function () {
43
+ return [function () {
44
+ return domRef.current.querySelector('.custom-render-box');
45
+ }, function () {
46
+ return document.querySelector(".".concat(classname));
47
+ }];
48
+ }, []);
49
+
50
+ _useClickAway(function () {
51
+ return set(false);
52
+ }, getDoms, ['click']);
53
+
54
+ return /*#__PURE__*/React.createElement("div", {
55
+ className: "custom-render-select",
56
+ ref: domRef
57
+ }, /*#__PURE__*/React.createElement(_Select, Object.assign({}, props, {
58
+ value: value,
59
+ dropdownClassName: "custom-render-select-dropdown ".concat(classname, " ").concat(dropdownClassName),
60
+ open: open
61
+ }), children), /*#__PURE__*/React.createElement("div", {
62
+ className: "custom-render-box",
63
+ onClick: toggle
64
+ }, customRender(value)));
65
+ }
66
+
67
+ export default CustomRenderSelect;
package/es/Player/demo.js CHANGED
@@ -23,6 +23,7 @@ import React, { useState } from 'react';
23
23
  import Player from './single_player';
24
24
  import SegmentPlayer from './segment_player';
25
25
  import FrontendPlayer from './frontend_player';
26
+ import moment from 'moment';
26
27
  var options = [{
27
28
  value: '',
28
29
  label: '自动'
@@ -123,28 +124,51 @@ function Demo1() {
123
124
  }));
124
125
  }
125
126
 
126
- var begin = Date.now();
127
+ var mm = moment().set({
128
+ hours: 0,
129
+ minutes: 0,
130
+ seconds: 0
131
+ });
132
+ var m = mm.clone();
127
133
 
128
134
  function Demo2() {
129
135
  var _useState3 = useState({
130
136
  isLive: 1,
131
137
  segments: [{
132
- beginTime: begin,
133
- endTime: begin + 60 * 1000,
138
+ beginTime: m.valueOf(),
139
+ endTime: m.set({
140
+ minutes: 1
141
+ }).valueOf(),
134
142
  url: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4'
135
143
  }, {
136
- beginTime: begin + 60 * 1000,
137
- endTime: begin + 2 * 60 * 1000
144
+ beginTime: m.set({
145
+ minutes: 1
146
+ }).valueOf(),
147
+ endTime: m.set({
148
+ minutes: 2
149
+ }).valueOf()
138
150
  }, {
139
- beginTime: begin + 2 * 60 * 1000,
140
- endTime: begin + 3 * 60 * 1000,
151
+ beginTime: m.set({
152
+ minutes: 2
153
+ }).valueOf(),
154
+ endTime: m.set({
155
+ minutes: 3
156
+ }).valueOf(),
141
157
  url: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4?date=1'
142
158
  }, {
143
- beginTime: begin + 3 * 60 * 1000,
144
- endTime: begin + 4 * 60 * 1000
159
+ beginTime: m.set({
160
+ minutes: 3
161
+ }).valueOf(),
162
+ endTime: m.set({
163
+ minutes: 4
164
+ }).valueOf()
145
165
  }, {
146
- beginTime: begin + 4 * 60 * 1000,
147
- endTime: begin + 5 * 60 * 1000,
166
+ beginTime: m.set({
167
+ minutes: 4
168
+ }).valueOf(),
169
+ endTime: m.set({
170
+ minutes: 5
171
+ }).valueOf(),
148
172
  url: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4?date=2'
149
173
  }],
150
174
  tempUrl: ''
@@ -190,7 +214,7 @@ function Demo2() {
190
214
  });
191
215
  }
192
216
  }, "\u64AD\u653E")), /*#__PURE__*/React.createElement(SegmentPlayer, {
193
- begin: begin,
217
+ begin: mm.valueOf(),
194
218
  segments: state.segments,
195
219
  isLive: false
196
220
  }));
@@ -216,6 +216,7 @@ function SegmentPlayer(_a) {
216
216
  begin: begin,
217
217
  api: api,
218
218
  event: event,
219
+ seekTo: seekTo,
219
220
  index: index,
220
221
  segments: segments,
221
222
  duration: duration,
@@ -11,6 +11,7 @@ interface ITimeLineProps {
11
11
  duration: number;
12
12
  setIndex: (i: number) => void;
13
13
  begin: number;
14
+ seekTo: (time: number) => void;
14
15
  }
15
- declare function SegmentTimeLine({ api, event, index, segments, duration, begin, setIndex }: ITimeLineProps): JSX.Element;
16
+ declare function SegmentTimeLine({ api, event, index, segments, duration, begin, setIndex, seekTo }: ITimeLineProps): JSX.Element;
16
17
  export default SegmentTimeLine;
@@ -27,7 +27,8 @@ function SegmentTimeLine(_ref) {
27
27
  segments = _ref.segments,
28
28
  duration = _ref.duration,
29
29
  begin = _ref.begin,
30
- setIndex = _ref.setIndex;
30
+ setIndex = _ref.setIndex,
31
+ seekTo = _ref.seekTo;
31
32
  var status = useBarStatus(event);
32
33
 
33
34
  var _useTimes = useTimes(api, event),
@@ -56,17 +57,11 @@ function SegmentTimeLine(_ref) {
56
57
  var ele = e.currentTarget;
57
58
  var rect = ele.getBoundingClientRect();
58
59
  var current = e.pageX - rect.left;
59
- var currentTime = current / rect.width * api.getDuration();
60
-
61
- if (i !== index) {
62
- setIndex(i); // 临时方案,最好方案在初始化播放器时实现,这样处理理论上也可以
63
-
64
- setTimeout(function () {
65
- return api.seekTo(currentTime);
66
- }, 500);
67
- } else {
68
- api.seekTo(currentTime);
69
- }
60
+ var item = segments[i - 1];
61
+ var pTime = item ? item.endTime : begin;
62
+ var duration = segments[i].endTime - segments[i].beginTime;
63
+ var currentTime = current / rect.width * duration;
64
+ seekTo(Math.round(currentTime + pTime));
70
65
  }, [segments, api, index, setIndex]);
71
66
  return /*#__PURE__*/React.createElement("div", {
72
67
  className: "player-timeline-layout player-segment-timeline-layout ".concat(status === 0 ? 'hide-time-line' : '')
@@ -1,62 +1,179 @@
1
1
  @font-face {
2
- font-family: 'lm-player-iconfont';
3
- src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAlMAAsAAAAAE2wAAAj/AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCFMAqUcJEXATYCJANICyYABCAFhWUHgh4boxAR1az/IPt5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aOFfc/QH9Fn+lpltKR6GOMJe5PY0/iMxv4b/jDyxj/yx7tuZN9ApEI5rNU8CPbp3YfwGu1wKS93JPjgp94/Mdoj3GH3VjAUmhQOSyBnTAKSZBJLT06Y8Oyw+PrTep9IHzZu0EQu2PpNkJs4aNyw9BPYc3TPh1o7IedlUz6ChOZF+SSMacN4y/dhAImnGZqeBmZmBqD9VBsA1J/x/bJYb62lufBOI6gPIHGFbqWlgXWIfo4h81t6P835wPC/dCJdOBcQ6iDqugBhlygdSlsDsNQv+37o/D0Nn9aRv3LCn/2ktl+vPwv28iI5UG1RBPgdR8Nc4192xahgxxYNG5AHjXb4/TFMpwDwehCQOE2Y/1OLKd5EBBwlauxKoQO6ANqlKwGD7oErCwEuYED33ZVHD3ixgCTfaBBmBKC7H1wJRH+uFCz4m6MxzQgYdHu5skhtDjCgW+bKQ638mgI69zE/nkAxDER/KmqNyZhDeW1lrJqgpkBVdTlPYEtQ1FjD/CPegHKNSXRkuyXnHBLQqU7II9tlNsIQRnG2eBiEgKIhHIJm6ZibXqtlXC+QGuPMGsYjQGFgQOibRr5rGkrMTmwNK0WVxm5dmQKk8gBPMtIqy7aTd50R3qRmJsarL3RI7Z00z4XkrvbW8mcjVldaMqMaJLMj4WyigqAzkdC49xoCGpPcDumNnpZozvgK8vRi/OZmAfBQv9QRJcmKqumGadmO6/nEThwkCcszUA3qZDc2YygRKh0ww37h4IQUVahM6UNaq58Y1WTNqUqGz1tVp1Xnh0KmhdfnI8bLNNHaKXwCRpXAFa2NkPuy8O4CQ5Bd5c2Jk5rPSggjeTXl1/Z60jMW0rA9DzLSHX6aV50o8qsFoEi7I5ysOAlGZyrz1iyYcFLh86a2jmdmAA==') format('woff2');
2
+ font-family: "lm-player-iconfont"; /* Project id 1153292 */
3
+ src: url('iconfont.woff2?t=1661511384224') format('woff2'),
4
+ url('iconfont.woff?t=1661511384224') format('woff'),
5
+ url('iconfont.ttf?t=1661511384224') format('truetype');
4
6
  }
7
+
5
8
  .lm-player-iconfont {
6
- font-family: 'lm-player-iconfont' !important;
9
+ font-family: "lm-player-iconfont" !important;
7
10
  font-size: 16px;
8
11
  font-style: normal;
9
12
  -webkit-font-smoothing: antialiased;
10
13
  -moz-osx-font-smoothing: grayscale;
11
14
  }
12
- .lm-player-Loading:before {
13
- content: '\e65d';
15
+
16
+ .lm-player-xiazai:before {
17
+ content: "\e6d0";
14
18
  }
15
- .lm-player-volume-close:before {
16
- content: '\e602';
19
+
20
+ .lm-player-bofang:before {
21
+ content: "\e6cf";
17
22
  }
18
- .lm-player-volume-normal-fuben:before {
19
- content: '\e604';
23
+
24
+ .lm-player-tingzhi:before {
25
+ content: "\e6ce";
20
26
  }
21
- .lm-player-volume-max:before {
22
- content: '\e605';
27
+
28
+ .lm-player-quanbuguanbi:before {
29
+ content: "\e6cc";
23
30
  }
24
- .lm-player-Pause_Main:before {
25
- content: '\e652';
31
+
32
+ .lm-player-huamianshiying:before {
33
+ content: "\e6cb";
26
34
  }
27
- .lm-player-Play_Main:before {
28
- content: '\e654';
35
+
36
+ .lm-player-quanping:before {
37
+ content: "\e6c6";
29
38
  }
30
- .lm-player-ZoomIn_Main:before {
31
- content: '\e663';
39
+
40
+ .lm-player-a-guanbi_close-one11:before {
41
+ content: "\e623";
32
42
  }
33
- .lm-player-ZoomDefault_Main:before {
34
- content: '\e664';
43
+
44
+ .lm-player-lunxunkaishi:before {
45
+ content: "\e6c3";
35
46
  }
36
- .lm-player-ZoomOut_Main:before {
37
- content: '\e665';
47
+
48
+ .lm-player-fenping16:before {
49
+ content: "\e6c5";
38
50
  }
39
- .lm-player-Refresh_Main:before {
40
- content: '\e687';
51
+
52
+ .lm-player-xiangji1fill:before {
53
+ content: "\e77e";
41
54
  }
42
- .lm-player-ExitFull_Main:before {
43
- content: '\e68e';
55
+
56
+ .lm-player-M_Device_jiazaishibai:before {
57
+ content: "\e6de";
44
58
  }
45
- .lm-player-Full_Main:before {
46
- content: '\e690';
59
+
60
+ .lm-player-M_Bar_CloudAuto:before {
61
+ content: "\e6c9";
47
62
  }
48
- .lm-player-PlaySource:before {
49
- content: '\e6cd';
63
+
64
+ .lm-player-S_Box_VideoCloud:before {
65
+ content: "\e6ca";
50
66
  }
67
+
68
+ .lm-player-S_Bar_LatLongYes:before {
69
+ content: "\e792";
70
+ }
71
+
72
+ .lm-player-S_Device_kuaijin:before {
73
+ content: "\e6c7";
74
+ }
75
+
76
+ .lm-player-S_Device_shezhi:before {
77
+ content: "\e6c8";
78
+ }
79
+
80
+ .lm-player-S_View_Playerpley:before {
81
+ content: "\e827";
82
+ }
83
+
84
+ .lm-player-S_View_RotateRight:before {
85
+ content: "\e828";
86
+ }
87
+
88
+ .lm-player-S_View_ScreenSizeFull:before {
89
+ content: "\e82d";
90
+ }
91
+
92
+ .lm-player-S_View_SoundMiddle:before {
93
+ content: "\e835";
94
+ }
95
+
96
+ .lm-player-S_Edit_LoadDown:before {
97
+ content: "\e7b6";
98
+ }
99
+
100
+ .lm-player-S_Edit_Reset:before {
101
+ content: "\e7c3";
102
+ }
103
+
104
+ .lm-player-S_View_SearchBox:before {
105
+ content: "\e833";
106
+ }
107
+
108
+ .lm-player-S_View_PlayerPlay1:before {
109
+ content: "\e6b7";
110
+ }
111
+
51
112
  .lm-player-YesorNo_No_Dark:before {
52
- content: '\e6dd';
113
+ content: "\e6dd";
114
+ }
115
+
116
+ .lm-player-Refresh_Main:before {
117
+ content: "\e687";
53
118
  }
119
+
54
120
  .lm-player-SearchBox:before {
55
- content: '\e706';
121
+ content: "\e706";
122
+ }
123
+
124
+ .lm-player-ZoomIn_Main:before {
125
+ content: "\e663";
126
+ }
127
+
128
+ .lm-player-ZoomDefault_Main:before {
129
+ content: "\e664";
130
+ }
131
+
132
+ .lm-player-ZoomOut_Main:before {
133
+ content: "\e665";
56
134
  }
135
+
57
136
  .lm-player-PrevFast:before {
58
- content: '\e71f';
137
+ content: "\e71f";
59
138
  }
139
+
60
140
  .lm-player-NextFast_Light:before {
61
- content: '\e720';
141
+ content: "\e720";
142
+ }
143
+
144
+ .lm-player-volume-close:before {
145
+ content: "\e602";
146
+ }
147
+
148
+ .lm-player-volume-normal-fuben:before {
149
+ content: "\e604";
150
+ }
151
+
152
+ .lm-player-volume-max:before {
153
+ content: "\e605";
154
+ }
155
+
156
+ .lm-player-ExitFull_Main:before {
157
+ content: "\e68e";
158
+ }
159
+
160
+ .lm-player-Full_Main:before {
161
+ content: "\e690";
162
+ }
163
+
164
+ .lm-player-Loading:before {
165
+ content: "\e65d";
166
+ }
167
+
168
+ .lm-player-Pause_Main:before {
169
+ content: "\e652";
170
+ }
171
+
172
+ .lm-player-Play_Main:before {
173
+ content: "\e654";
174
+ }
175
+
176
+ .lm-player-PlaySource:before {
177
+ content: "\e6cd";
62
178
  }
179
+
Binary file
Binary file
Binary file
@@ -1,3 +1,11 @@
1
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
+
3
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+
5
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
6
+
7
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
8
+
1
9
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
10
 
3
11
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -28,7 +36,7 @@ function LivePlayer(_ref) {
28
36
  var _useState = useState({
29
37
  screenNum: 4,
30
38
  selectIndex: 0,
31
- mode: 1
39
+ modes: []
32
40
  }),
33
41
  _useState2 = _slicedToArray(_useState, 2),
34
42
  state = _useState2[0],
@@ -70,7 +78,10 @@ function LivePlayer(_ref) {
70
78
  }
71
79
 
72
80
  if (newState.hasOwnProperty('mode')) {
73
- obj.mode = newState.mode;
81
+ var newModes = _toConsumableArray(state.modes);
82
+
83
+ newModes[state.selectIndex] = newState.mode;
84
+ obj.modes = newModes;
74
85
  }
75
86
 
76
87
  setState(function (old) {
@@ -89,8 +100,10 @@ function LivePlayer(_ref) {
89
100
  }, /*#__PURE__*/React.createElement("div", {
90
101
  className: "player-layout"
91
102
  }, screenList.map(function (item, index) {
103
+ var _a;
104
+
92
105
  return /*#__PURE__*/React.createElement(LivePlayerWithExt, Object.assign({}, item, {
93
- mode: state.mode,
106
+ mode: (_a = item.mode) !== null && _a !== void 0 ? _a : state.modes[index],
94
107
  isLive: true,
95
108
  key: "".concat(item.url, "-").concat(index),
96
109
  updatePlayer: function updatePlayer(player) {
@@ -116,7 +129,7 @@ function LivePlayer(_ref) {
116
129
  toggleFit: toggleFit,
117
130
  getPlayerItem: getPlayerItem,
118
131
  screenNum: state.screenNum,
119
- mode: state.mode,
132
+ mode: state.modes[state.selectIndex],
120
133
  containerRef: domRef,
121
134
  updateState: updateState
122
135
  }), children && /*#__PURE__*/React.cloneElement(children, {
@@ -79,20 +79,57 @@ function LiveTools(_ref) {
79
79
  title: "\u91CD\u8F7D"
80
80
  })), /*#__PURE__*/React.createElement("span", {
81
81
  className: "player-tools-item",
82
- onClick: onClose
82
+ onClick: function onClick() {
83
+ return updateState({
84
+ mode: mode !== 2 ? 2 : 1
85
+ });
86
+ }
83
87
  }, /*#__PURE__*/React.createElement(IconFont, {
84
- type: "lm-player-YesorNo_No_Dark",
85
- title: "\u5173\u95ED\u5F53\u524D"
88
+ style: {
89
+ top: 2,
90
+ position: 'relative',
91
+ left: 1
92
+ },
93
+ type: "lm-player-S_Device_shezhi",
94
+ title: "\u5207\u6362".concat(mode === 1 ? '插件' : '浏览器', "\u6A21\u5F0F")
86
95
  }))), /*#__PURE__*/React.createElement("div", {
87
96
  className: "player-tools-mid"
88
- }, /*#__PURE__*/React.createElement("span", {
97
+ }, /*#__PURE__*/React.createElement("div", {
98
+ className: "player-tools-item",
99
+ onClick: onClose,
100
+ style: {
101
+ marginRight: 6
102
+ }
103
+ }, /*#__PURE__*/React.createElement(IconFont, {
104
+ type: "lm-player-tingzhi",
105
+ title: "\u505C\u6B62",
106
+ style: {
107
+ fontSize: 16,
108
+ position: 'relative',
109
+ top: 1
110
+ }
111
+ })), /*#__PURE__*/React.createElement("div", {
89
112
  className: "player-tools-item",
90
- onClick: playToggle
113
+ onClick: playToggle,
114
+ style: {
115
+ marginLeft: 6
116
+ }
91
117
  }, player && !player.video.paused ? /*#__PURE__*/React.createElement(IconFont, {
92
118
  type: "lm-player-Pause_Main",
93
- title: "\u6682\u505C"
119
+ title: "\u6682\u505C",
120
+ style: {
121
+ fontSize: 22,
122
+ position: 'relative',
123
+ top: -2
124
+ }
94
125
  }) : /*#__PURE__*/React.createElement(IconFont, {
95
- type: "lm-player-Play_Main",
126
+ style: {
127
+ fontSize: 17,
128
+ position: 'relative',
129
+ left: 2,
130
+ top: 2
131
+ },
132
+ type: "lm-player-bofang",
96
133
  title: "\u64AD\u653E"
97
134
  }))), /*#__PURE__*/React.createElement("div", {
98
135
  className: "player-tools-right"
@@ -100,38 +137,31 @@ function LiveTools(_ref) {
100
137
  className: "player-tools-item",
101
138
  onClick: onCloseAll
102
139
  }, /*#__PURE__*/React.createElement(IconFont, {
103
- type: "lm-player-YesorNo_No_Dark",
140
+ type: "lm-player-quanbuguanbi",
104
141
  title: "\u5173\u95ED\u6240\u6709"
105
- })), /*#__PURE__*/React.createElement("span", {
106
- className: "player-tools-item",
107
- onClick: function onClick() {
108
- return updateState({
109
- mode: mode === 1 ? 2 : 1
110
- });
111
- }
112
- }, /*#__PURE__*/React.createElement(IconFont, {
113
- type: "lm-player-YesorNo_No_Dark",
114
- title: "\u5207\u6362".concat(mode === 1 ? '插件' : '浏览器', "\u6A21\u5F0F")
115
- })), /*#__PURE__*/React.createElement("span", {
142
+ })), /*#__PURE__*/React.createElement(ScreenSelect, {
143
+ screenNum: screenNum,
144
+ updateState: updateState
145
+ }), /*#__PURE__*/React.createElement("span", {
116
146
  className: "player-tools-item",
117
147
  onClick: toggleFit
118
148
  }, fit === 'fill' ? /*#__PURE__*/React.createElement(IconFont, {
119
- type: "lm-player-S_View_ScreenSizeFull",
149
+ type: "lm-player-huamianshiying",
120
150
  title: "\u81EA\u9002\u5E94"
121
151
  }) : /*#__PURE__*/React.createElement(IconFont, {
122
- type: "lm-player-S_View_ScreenSizeFull",
152
+ type: "lm-player-huamianshiying",
123
153
  title: "\u586B\u5145"
124
- })), /*#__PURE__*/React.createElement(ScreenSelect, {
125
- screenNum: screenNum,
126
- updateState: updateState
127
- }), /*#__PURE__*/React.createElement("span", {
154
+ })), /*#__PURE__*/React.createElement("span", {
128
155
  className: "player-tools-item",
129
- onClick: toggleFullscreen
156
+ onClick: toggleFullscreen,
157
+ style: {
158
+ marginRight: 0
159
+ }
130
160
  }, isFullscreen ? /*#__PURE__*/React.createElement(IconFont, {
131
- type: "lm-player-ExitFull_Main",
161
+ type: "lm-player-quanping",
132
162
  title: "\u5168\u5C4F"
133
163
  }) : /*#__PURE__*/React.createElement(IconFont, {
134
- type: "lm-player-Full_Main",
164
+ type: "lm-player-quanping",
135
165
  title: "\u5168\u5C4F"
136
166
  }))));
137
167
  }
@@ -9,11 +9,11 @@ interface ILivePlayerWithExtProps extends ISinglePlayerProps {
9
9
  pluginDownloadUrl?: string;
10
10
  }
11
11
  export declare function LivePlayerWithExt({ mode, isLive, url, type, style, className, updatePlayer, onClick, pluginDownloadUrl, ...props }: ILivePlayerWithExtProps): JSX.Element;
12
- interface ISegmentPlayerWithExtProps extends Omit<ILivePlayerWithExtProps, 'url' | 'mode'> {
12
+ interface ISegmentPlayerWithExtProps extends Omit<ILivePlayerWithExtProps, 'url'> {
13
13
  segments?: ISegmentType[];
14
14
  begin?: number;
15
15
  }
16
- export declare function SegmentPlayerWithExt({ begin, style, className, segments, updatePlayer, onClick, ...props }: ISegmentPlayerWithExtProps): JSX.Element;
16
+ export declare function SegmentPlayerWithExt({ begin, style, className, segments, updatePlayer, onClick, mode, ...props }: ISegmentPlayerWithExtProps): JSX.Element;
17
17
  interface IFrontendPlayerWithExtProps extends Omit<ILivePlayerWithExtProps, 'url'> {
18
18
  segments?: ISegmentType[];
19
19
  begin?: number;