|
@@ -18,12 +18,14 @@ export default (props) => {
|
18
|
18
|
};
|
19
|
19
|
|
20
|
20
|
useEffect(() => {
|
21
|
|
- // 隐藏的时候取消视频播放
|
22
|
|
- if (visible) {
|
23
|
|
- getPreviewInfo('05a281758ccfe9c68fcada81faee7cae').then(setPreview);
|
24
|
|
- } else {
|
25
|
|
- if (hatcRef.current) {
|
26
|
|
- hatcRef.current.stop();
|
|
21
|
+ if (!IS_DEMO) {
|
|
22
|
+ // 隐藏的时候取消视频播放
|
|
23
|
+ if (visible) {
|
|
24
|
+ getPreviewInfo('05a281758ccfe9c68fcada81faee7cae').then(setPreview);
|
|
25
|
+ } else {
|
|
26
|
+ if (hatcRef.current) {
|
|
27
|
+ hatcRef.current.stop();
|
|
28
|
+ }
|
27
|
29
|
}
|
28
|
30
|
}
|
29
|
31
|
}, [visible]);
|
|
@@ -37,7 +39,16 @@ export default (props) => {
|
37
|
39
|
visible={visible}
|
38
|
40
|
onCancel={handleCancel}
|
39
|
41
|
>
|
40
|
|
- <Hatc width={width} ref={hatcRef} height={height} previewParams={preview} />
|
|
42
|
+ {IS_DEMO ? (
|
|
43
|
+ <video
|
|
44
|
+ controls
|
|
45
|
+ autoPlay
|
|
46
|
+ src="https://dz-machinery.oss-cn-nanjing.aliyuncs.com/video/ydpjksfw7bhh.mp4"
|
|
47
|
+ style={{ width: `${width}px`, height: `${height}px` }}
|
|
48
|
+ ></video>
|
|
49
|
+ ) : (
|
|
50
|
+ <Hatc width={width} ref={hatcRef} height={height} previewParams={preview} />
|
|
51
|
+ )}
|
41
|
52
|
</Modal>
|
42
|
53
|
);
|
43
|
54
|
};
|