@desynova-digital/player 4.0.32 → 4.0.34

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/actions/player.js CHANGED
@@ -333,10 +333,21 @@ function handleMarkerUpdate(leftMarker, rightMarker) {
333
333
  };
334
334
  return data;
335
335
  }
336
- function handleSDBorderChange(SDBorderActive) {
336
+
337
+ // export function handleSDBorderChange(SDBorderActive) {
338
+ // let data = {
339
+ // type: SD_BORDER_SWITCH,
340
+ // SDBorderActive
341
+ // };
342
+
343
+ // return data;
344
+ // }
345
+
346
+ function handleSDBorderChange(safeAreaObj) {
337
347
  var data = {
338
348
  type: SD_BORDER_SWITCH,
339
- SDBorderActive: SDBorderActive
349
+ key: safeAreaObj.key,
350
+ value: safeAreaObj.value
340
351
  };
341
352
  return data;
342
353
  }
@@ -241,6 +241,14 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
241
241
  key: "SDBorderActive",
242
242
  value: false
243
243
  });
244
+ this.actions.handleSDBorderChange({
245
+ key: "sixteenNineSafeArea",
246
+ value: true
247
+ });
248
+ this.actions.handleSDBorderChange({
249
+ key: "HDBorderActive",
250
+ value: true
251
+ });
244
252
  } else if (this.props.quality === 'sd') {
245
253
  this.actions.handleSDBorderChange({
246
254
  key: "HDBorderActive",
@@ -250,6 +258,14 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
250
258
  key: "sixteenNineSafeArea",
251
259
  value: false
252
260
  });
261
+ this.actions.handleSDBorderChange({
262
+ key: "fourThreeSafeArea",
263
+ value: true
264
+ });
265
+ this.actions.handleSDBorderChange({
266
+ key: "SDBorderActive",
267
+ value: true
268
+ });
253
269
  }
254
270
  } else {
255
271
  this.actions.handleSDBorderChange({
@@ -100,7 +100,7 @@ var defaultProps = {
100
100
  var SubTitleSection = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n font-family: SFUIText-Regular;\n font-size: 16px;\n bottom: 20px;\n width: 100%;\n display: flex;\n justify-content: center;\n text-align: center;\n color: #ffffff;\n height: 90%;\n align-items: center;\n\n .subtitleContainer {\n border-radius: 4px;\n width: fit-content;\n background: #000000;\n opacity: 0.9;\n padding: ", ";\n line-height: 20px;\n position: absolute;\n\n i,em {\n font-style: italic; /* Override the font style for <em> tags inside elements with the class .someClass */\n }\n\n strong{\n font-weight: bold; \n }\n \n }\n .longSubtitleStyles {\n overflow-y: auto;\n height: fit-content;\n max-height: 70px;\n max-width: 75%;\n width: fit-content;\n }\n"])), function (props) {
101
101
  return props.currentSubtitleObj && props.currentSubtitleObj.line1 ? '8px 10px' : '0px';
102
102
  });
103
- var VideoBlock = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n &.video-react-player-block {\n position: relative;\n transition: all 0.1s ease-in-out;\n -moz-transition: all 0.1s ease-in-out;\n -webkit-transition: all 0.1s ease-in-out;\n -ms-transition: all 0.1s ease-in-out;\n -o-transition: all 0.1s ease-in-out;\n video {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n right: 0;\n bottom: 0;\n }\n .audio-tracks {\n position: relative;\n display: flex;\n background: rgba(0, 0, 0, 0.5);\n color: #fff;\n z-index: 10;\n position: absolute;\n width: 100%;\n bottom: 0;\n p {\n cursor: pointer;\n padding: 10px;\n }\n }\n .loader-container {\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n z-index: 10;\n background: rgba(0, 0, 0, 0.5);\n }\n }\n &.ratio-border {\n // border: 1px solid rgba(255, 255, 255, 0.5);\n &:after {\n content: '16:9 Safe Area';\n position: absolute;\n color: #fff;\n font-family: SFUIText-Regular;\n font-size: 12px;\n transform: rotate(-90deg);\n top: 20%;\n left: -50px;\n }\n }\n"])));
103
+ var VideoBlock = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n &.video-react-player-block {\n position: relative;\n transition: all 0.1s ease-in-out;\n -moz-transition: all 0.1s ease-in-out;\n -webkit-transition: all 0.1s ease-in-out;\n -ms-transition: all 0.1s ease-in-out;\n -o-transition: all 0.1s ease-in-out;\n video {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n right: 0;\n bottom: 0;\n }\n .audio-tracks {\n position: relative;\n display: flex;\n background: rgba(0, 0, 0, 0.5);\n color: #fff;\n z-index: 10;\n position: absolute;\n width: 100%;\n bottom: 0;\n p {\n cursor: pointer;\n padding: 10px;\n }\n }\n .loader-container {\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n z-index: 10;\n background: rgba(0, 0, 0, 0.5);\n }\n }\n &.ratio-border {\n // border: 1px solid rgba(255, 255, 255, 0.5);\n &:after {\n // content: '16:9 Safe Area';\n position: absolute;\n color: #fff;\n font-family: SFUIText-Regular;\n font-size: 12px;\n transform: rotate(-90deg);\n top: 20%;\n left: -50px;\n }\n }\n"])));
104
104
  var Video = exports["default"] = /*#__PURE__*/function (_Component) {
105
105
  function Video(props) {
106
106
  var _this;
@@ -126,7 +126,8 @@ var ChildMenuButton = /*#__PURE__*/function (_Component) {
126
126
  subtitleData = _this$props3.subtitleData,
127
127
  theme = _this$props3.theme,
128
128
  player = _this$props3.player,
129
- activeChild = _this$props3.activeChild;
129
+ activeChild = _this$props3.activeChild,
130
+ actions = _this$props3.actions;
130
131
  switch (mainHeader) {
131
132
  case 'Subtitle':
132
133
  return subtitleData.map(function (subtitle, index) {
@@ -32,7 +32,7 @@ var propTypes = {
32
32
  player: _propTypes.PropTypes.instanceOf(Object),
33
33
  theme: _propTypes.PropTypes.string
34
34
  };
35
- var SafeAreaBlock = (0, _styledComponents["default"])('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n background: transparent;\n font-family: SFUIText-Medium;\n font-size: 12px;\n text-transform: uppercase;\n justify-content: flex-start;\n align-items: center;\n &:hover {\n background: ", ";\n }\n p {\n margin-left: 10px;\n white-space: nowrap;\n }\n"])), function (props) {
35
+ var SafeAreaBlock = (0, _styledComponents["default"])('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n background: transparent;\n font-family: SFUIText-Medium;\n font-size: 12px;\n text-transform: uppercase;\n justify-content: flex-start;\n // align-items: center;\n flex-direction: column;\n width: 100%;\n &:hover {\n background: ", ";\n }\n p {\n margin-left: 10px;\n white-space: nowrap;\n }\n"])), function (props) {
36
36
  return props.theme ? " ".concat(_tokens.colors[props.theme].videoPlayer.rgbaThemeColor) : 'rgba(0, 206, 198, 0.1)';
37
37
  });
38
38
  var SafeAreaControl = exports["default"] = /*#__PURE__*/function (_Component) {
@@ -49,30 +49,36 @@ var SafeAreaControl = exports["default"] = /*#__PURE__*/function (_Component) {
49
49
  value: function handleClick() {
50
50
  var _this$props = this.props,
51
51
  player = _this$props.player,
52
- actions = _this$props.actions;
53
- actions.handleSDBorderChange(!player.SDBorderActive);
52
+ actions = _this$props.actions,
53
+ keyData = _this$props.keyData,
54
+ siblingData = _this$props.siblingData;
55
+ actions.handleSDBorderChange({
56
+ key: keyData,
57
+ value: !player[keyData]
58
+ });
59
+ actions.handleSDBorderChange({
60
+ key: siblingData,
61
+ value: false
62
+ });
54
63
  }
55
64
  }, {
56
65
  key: "render",
57
66
  value: function render() {
58
67
  var _this$props2 = this.props,
59
68
  player = _this$props2.player,
60
- theme = _this$props2.theme;
69
+ theme = _this$props2.theme,
70
+ keyData = _this$props2.keyData,
71
+ name = _this$props2.name;
61
72
  return /*#__PURE__*/_react["default"].createElement(SafeAreaBlock, {
62
73
  onClick: this.handleClick,
63
74
  theme: theme
64
- }, /*#__PURE__*/_react["default"].createElement(_components.Icon, {
65
- name: "safe-area",
66
- width: 20,
67
- height: 20,
68
- color: player.SDBorderActive ? theme ? "".concat(_tokens.colors[theme].videoPlayer.themeColor) : '#00cec6' : '#333333'
69
- }), /*#__PURE__*/_react["default"].createElement("p", {
70
- style: player.SDBorderActive ? {
75
+ }, /*#__PURE__*/_react["default"].createElement("p", {
76
+ style: player[keyData] ? {
71
77
  color: theme ? " ".concat(_tokens.colors[theme].videoPlayer.themeColor) : '#00cec6'
72
78
  } : {
73
79
  color: '#333333'
74
80
  }
75
- }, "4:3 Safe Area"));
81
+ }, name));
76
82
  }
77
83
  }]);
78
84
  }(_react.Component);
@@ -110,6 +110,10 @@ function SettingsMenu(_ref) {
110
110
  "name": "16:9"
111
111
  }]
112
112
  };
113
+ (0, _react.useEffect)(function () {
114
+ setSettingStatus(true);
115
+ setSubtitleChildStatus(false);
116
+ }, [playerType]);
113
117
  var playerValue = playerType === 'default';
114
118
  var settingShow = settingStatus || !playerValue;
115
119
  return /*#__PURE__*/_react["default"].createElement(SettingsMenuContainer, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@desynova-digital/player",
3
- "version": "4.0.32",
3
+ "version": "4.0.34",
4
4
  "description": "Video Player Package for Contido Application",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -22,7 +22,10 @@ var initialState = {
22
22
  rightMarker: -1,
23
23
  selectedMarker: {},
24
24
  markerType: 'create',
25
- SDBorderActive: false,
25
+ SDBorderActive: true,
26
+ HDBorderActive: true,
27
+ fourThreeSafeArea: true,
28
+ sixteenNineSafeArea: true,
26
29
  buffered: null,
27
30
  waiting: false,
28
31
  seeking: false,
@@ -199,10 +202,13 @@ function player() {
199
202
  return _objectSpread(_objectSpread({}, state), {}, {
200
203
  controlType: action.controlType
201
204
  });
205
+ // case SD_BORDER_SWITCH:
206
+ // return {
207
+ // ...state,
208
+ // SDBorderActive: action.SDBorderActive
209
+ // };
202
210
  case _player.SD_BORDER_SWITCH:
203
- return _objectSpread(_objectSpread({}, state), {}, {
204
- SDBorderActive: action.SDBorderActive
205
- });
211
+ return _objectSpread(_objectSpread({}, state), {}, _defineProperty({}, action.key, action.value));
206
212
  case _player.SUBTITLE_STATUS:
207
213
  return _objectSpread(_objectSpread({}, state), {}, {
208
214
  SubtitleStatus: action.SubtitleStatus