@doyourjob/gravity-ui-page-constructor 5.31.140-dev.0 → 5.31.141-dev.0
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.
|
@@ -8,7 +8,9 @@ const DefaultVideo_1 = require("../../DefaultVideo/DefaultVideo");
|
|
|
8
8
|
const ReactPlayer_1 = tslib_1.__importDefault(require("../../ReactPlayer/ReactPlayer"));
|
|
9
9
|
const b = (0, utils_1.block)('media-component-video');
|
|
10
10
|
const Video = (props) => {
|
|
11
|
-
const { video, height, analyticsEvents, previewImg, playButton: commonPlayButton, customBarControlsClassName, videoClassName, playVideo, setHasVideoFallback,
|
|
11
|
+
const { video, height, analyticsEvents, previewImg, playButton: commonPlayButton, customBarControlsClassName, videoClassName, playVideo, setHasVideoFallback,
|
|
12
|
+
// hasVideoFallback,
|
|
13
|
+
qa, ratio, } = props;
|
|
12
14
|
const qaAttributes = (0, utils_1.getQaAttrubutes)(qa, 'source');
|
|
13
15
|
const ref = (0, react_1.useRef)(null);
|
|
14
16
|
(0, react_1.useEffect)(() => {
|
|
@@ -62,16 +64,9 @@ const Video = (props) => {
|
|
|
62
64
|
ratio,
|
|
63
65
|
]);
|
|
64
66
|
const defaultVideoBlock = (0, react_1.useMemo)(() => {
|
|
65
|
-
return video.src.length ? (react_1.default.createElement("div", { className: b('wrap', videoClassName), style: { height
|
|
67
|
+
return video.src.length ? (react_1.default.createElement("div", { className: b('wrap', videoClassName), style: { height }, "data-qa": qaAttributes.default },
|
|
66
68
|
react_1.default.createElement(DefaultVideo_1.DefaultVideo, { ref: ref, video: video, qa: qaAttributes.source }))) : null;
|
|
67
|
-
}, [
|
|
68
|
-
video,
|
|
69
|
-
hasVideoFallback,
|
|
70
|
-
videoClassName,
|
|
71
|
-
height,
|
|
72
|
-
qaAttributes.default,
|
|
73
|
-
qaAttributes.source,
|
|
74
|
-
]);
|
|
69
|
+
}, [video, videoClassName, height, qaAttributes.default, qaAttributes.source]);
|
|
75
70
|
switch (video.type) {
|
|
76
71
|
case models_1.MediaVideoType.Player:
|
|
77
72
|
return reactPlayerBlock;
|
|
@@ -6,7 +6,9 @@ import ReactPlayerBlock from '../../ReactPlayer/ReactPlayer';
|
|
|
6
6
|
import './Video.css';
|
|
7
7
|
const b = block('media-component-video');
|
|
8
8
|
const Video = (props) => {
|
|
9
|
-
const { video, height, analyticsEvents, previewImg, playButton: commonPlayButton, customBarControlsClassName, videoClassName, playVideo, setHasVideoFallback,
|
|
9
|
+
const { video, height, analyticsEvents, previewImg, playButton: commonPlayButton, customBarControlsClassName, videoClassName, playVideo, setHasVideoFallback,
|
|
10
|
+
// hasVideoFallback,
|
|
11
|
+
qa, ratio, } = props;
|
|
10
12
|
const qaAttributes = getQaAttrubutes(qa, 'source');
|
|
11
13
|
const ref = useRef(null);
|
|
12
14
|
useEffect(() => {
|
|
@@ -60,16 +62,9 @@ const Video = (props) => {
|
|
|
60
62
|
ratio,
|
|
61
63
|
]);
|
|
62
64
|
const defaultVideoBlock = useMemo(() => {
|
|
63
|
-
return video.src.length ? (React.createElement("div", { className: b('wrap', videoClassName), style: { height
|
|
65
|
+
return video.src.length ? (React.createElement("div", { className: b('wrap', videoClassName), style: { height }, "data-qa": qaAttributes.default },
|
|
64
66
|
React.createElement(DefaultVideo, { ref: ref, video: video, qa: qaAttributes.source }))) : null;
|
|
65
|
-
}, [
|
|
66
|
-
video,
|
|
67
|
-
hasVideoFallback,
|
|
68
|
-
videoClassName,
|
|
69
|
-
height,
|
|
70
|
-
qaAttributes.default,
|
|
71
|
-
qaAttributes.source,
|
|
72
|
-
]);
|
|
67
|
+
}, [video, videoClassName, height, qaAttributes.default, qaAttributes.source]);
|
|
73
68
|
switch (video.type) {
|
|
74
69
|
case MediaVideoType.Player:
|
|
75
70
|
return reactPlayerBlock;
|