pds-dev-kit-web-test 2.5.382 → 2.5.385

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.
@@ -60,13 +60,6 @@ function VideoPlayer(props) {
60
60
  var videoRef = (0, react_1.useRef)(null);
61
61
  var _d = (0, react_1.useState)(false), videoLoaded = _d[0], setVideoLoaded = _d[1];
62
62
  var onLoadedMetadata = function () {
63
- var video = videoRef.current;
64
- if (!video || isEditMode) {
65
- return;
66
- }
67
- if (typeof CB_CONTENT_PROP_VIDEO_SPEC_STARTTIME === 'number') {
68
- video.currentTime = CB_CONTENT_PROP_VIDEO_SPEC_STARTTIME;
69
- }
70
63
  setVideoLoaded(true);
71
64
  };
72
65
  (0, react_1.useEffect)(function () {
@@ -77,6 +70,9 @@ function VideoPlayer(props) {
77
70
  var handleIntersection = function (entries) {
78
71
  entries.forEach(function (entry) {
79
72
  if (entry.isIntersecting) {
73
+ if (typeof CB_CONTENT_PROP_VIDEO_SPEC_STARTTIME === 'number') {
74
+ video.currentTime = CB_CONTENT_PROP_VIDEO_SPEC_STARTTIME;
75
+ }
80
76
  video.muted = true;
81
77
  video.play().catch(function (err) {
82
78
  // eslint-disable-next-line no-console
@@ -121,7 +117,7 @@ function getBGColorStyles(props, device) {
121
117
  ];
122
118
  return (0, colorUtil_1.parseStyleColorToCSSProp)({ availableSpecCodes: availableSpecCodes, props: props, propKey: 'BGCOLOR', device: device });
123
119
  }
124
- var S_Video = styled_components_1.default.video(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 100%;\n object-fit: cover;\n pointer-events: ", ";\n width: 100%;\n"], ["\n height: 100%;\n object-fit: cover;\n pointer-events: ", ";\n width: 100%;\n"])), function (_a) {
120
+ var S_Video = styled_components_1.default.video(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n aspect-ratio: 16 / 9;\n height: 100%;\n max-height: 100%;\n object-fit: cover;\n /* overflow: hidden; */\n pointer-events: ", ";\n width: 100%;\n"], ["\n aspect-ratio: 16 / 9;\n height: 100%;\n max-height: 100%;\n object-fit: cover;\n /* overflow: hidden; */\n pointer-events: ", ";\n width: 100%;\n"])), function (_a) {
125
121
  var isEditMode = _a.isEditMode;
126
122
  return (isEditMode ? 'none' : 'auto');
127
123
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.5.382",
3
+ "version": "2.5.385",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",