nicecode-v2/packages/meta/es/VideoPlayer/components/Loading/index.js
2024-01-16 11:44:26 +08:00

46 lines
1.7 KiB
JavaScript

import React from 'react';
import { Spin } from 'antd';
import classNames from 'classnames';
import Icon from "../../../iconfont";
import "./index.less";
var componentName = "zhst-image__video-view";
var Loading = function Loading(props) {
var status = props.status,
reload = props.reload;
return /*#__PURE__*/React.createElement("div", {
className: classNames("".concat(componentName, "__player-mask")),
onClick: function onClick(e) {
e.stopPropagation();
}
}, status === 'LOADING' && /*#__PURE__*/React.createElement(Spin, {
tip: "\u52A0\u8F7D\u4E2D...",
spinning: status === 'LOADING'
}), status === 'END' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
onClick: function onClick() {
reload();
},
className: classNames("".concat(componentName, "__icon-wraper"))
}, /*#__PURE__*/React.createElement(Icon, {
styles: {
fill: '#ffffff',
color: '#ffffff'
},
size: 54,
icon: 'icon-shuaxin'
})), /*#__PURE__*/React.createElement("div", {
className: classNames("".concat(componentName, "__player-mask-title"))
}, '点击刷新后,将重新播放')), status === 'ERROR' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
className: classNames("".concat(componentName, "__icon-wraper"))
}, /*#__PURE__*/React.createElement(Icon, {
styles: {
color: '#ffffff'
},
size: 54,
icon: 'icon-jiazaishibai'
})), /*#__PURE__*/React.createElement("div", {
className: classNames("".concat(componentName, "__player-mask-title"))
}, '视频加载失败,', /*#__PURE__*/React.createElement("a", {
onClick: reload
}, " ", '刷新'))));
};
export default Loading;