@cloud-app-dev/vidc 4.0.3 → 4.0.5

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.
@@ -166,10 +166,18 @@ function LivePlayer(_ref) {
166
166
  return /*#__PURE__*/_jsxs("div", {
167
167
  className: "split-screen-player-wrapper split-screen-player-live-wrapper",
168
168
  children: [/*#__PURE__*/_jsx("div", {
169
- className: "player-layout",
169
+ className: "player-layout container".concat(screenType === null || screenType === void 0 ? void 0 : screenType.name),
170
170
  ref: domRef,
171
171
  children: screenList.map(function (item, index) {
172
172
  var _item$url;
173
+ var className = state.selectIndex === index ? "item".concat(screenType === null || screenType === void 0 ? void 0 : screenType.name, "-").concat(index + 1, " player-current-index") : "item".concat(screenType === null || screenType === void 0 ? void 0 : screenType.name, "-").concat(index + 1);
174
+ var itemClick = function itemClick() {
175
+ return setState(function (old) {
176
+ return _objectSpread(_objectSpread({}, old), {}, {
177
+ selectIndex: index
178
+ });
179
+ });
180
+ };
173
181
  return /*#__PURE__*/_createElement(LivePlayerWithExt, _objectSpread(_objectSpread({}, item), {}, {
174
182
  mode: item.cid && state.modes[item.cid] ? state.modes[item.cid] : item.mode,
175
183
  key: (_item$url = item.url) !== null && _item$url !== void 0 ? _item$url : "".concat(index),
@@ -177,19 +185,15 @@ function LivePlayer(_ref) {
177
185
  if (item.cid) {
178
186
  playerRef.current[item.cid] = player;
179
187
  }
180
- },
181
- className: state.selectIndex === index ? 'player-current-index' : '',
182
- onClick: index !== state.selectIndex ? function () {
183
- return setState(function (old) {
184
- return _objectSpread(_objectSpread({}, old), {}, {
185
- selectIndex: index
186
- });
187
- });
188
- } : undefined,
189
- style: {
190
- width: screenType === null || screenType === void 0 ? void 0 : screenType.width,
191
- height: screenType === null || screenType === void 0 ? void 0 : screenType.height
192
- },
188
+ }
189
+ // className={state.selectIndex === index ? 'player-current-index' : ''}
190
+ ,
191
+ className: className
192
+ // onClick={index !== state.selectIndex ? () => setState((old) => ({ ...old, selectIndex: index })) : undefined}
193
+ ,
194
+ onClick: itemClick
195
+ // style={{ width: screenType?.width, height: screenType?.height }}
196
+ ,
193
197
  pluginDownloadUrl: props.pluginDownloadUrl
194
198
  }));
195
199
  })
@@ -3,7 +3,7 @@ import type { ExportPlayerType, ISegmentType, ISinglePlayerProps } from '../Play
3
3
  import type { PlayModeType } from '../PlayerExt';
4
4
  interface ILivePlayerWithExtProps extends ISinglePlayerProps {
5
5
  mode?: PlayModeType;
6
- style: React.CSSProperties;
6
+ style?: React.CSSProperties;
7
7
  onClick?: () => void;
8
8
  updatePlayer: (obj: React.MutableRefObject<ExportPlayerType>) => void;
9
9
  pluginDownloadUrl?: string;