From cdd17b3bd64d376d8b381a79779b96bc1070c470 Mon Sep 17 00:00:00 2001 From: mozzie Date: Mon, 27 Feb 2023 18:01:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20react-alipalyer=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-main/src/components/Card/index.less | 26 ++++++++++++++ apps/web-main/src/components/Card/index.tsx | 36 +++++++++++++++++++ apps/web-main/src/components/Nav/index.less | 2 +- apps/web-main/src/components/Player/index.tsx | 20 ++++++++++- apps/web-main/src/view/Course/index.tsx | 25 ++++++++++++- 5 files changed, 106 insertions(+), 3 deletions(-) create mode 100644 apps/web-main/src/components/Card/index.less create mode 100644 apps/web-main/src/components/Card/index.tsx diff --git a/apps/web-main/src/components/Card/index.less b/apps/web-main/src/components/Card/index.less new file mode 100644 index 0000000..aaf5726 --- /dev/null +++ b/apps/web-main/src/components/Card/index.less @@ -0,0 +1,26 @@ +.bs-card { + .arco-card-body { + padding: 10px; + } + .mask { + height: 164px; + background-color: rgba(0, 0, 0, 0.3); + overflow: hidden; + .cover { + height: 100%; + background-size: cover; + } + } + .bottom-des { + display: flex; + justify-content: space-between; + span { + flex: 1; + color: var(--color-text-3); + } + a { + cursor: pointer; + color: rgb(var(--primary-6)); + } + } +} diff --git a/apps/web-main/src/components/Card/index.tsx b/apps/web-main/src/components/Card/index.tsx new file mode 100644 index 0000000..77d4ae0 --- /dev/null +++ b/apps/web-main/src/components/Card/index.tsx @@ -0,0 +1,36 @@ +import { Card } from "@arco-design/web-react"; +import { url } from "inspector"; +import "./index.less"; +const { Meta } = Card; + +function BsCard() { + return ( + +
+ + } + > + + card description + Go + + } + /> +
+ ); +} + +export default BsCard; diff --git a/apps/web-main/src/components/Nav/index.less b/apps/web-main/src/components/Nav/index.less index 1145046..de52543 100644 --- a/apps/web-main/src/components/Nav/index.less +++ b/apps/web-main/src/components/Nav/index.less @@ -2,7 +2,7 @@ header { position: fixed; left: 0; right: 0; - z-index: 1994; + z-index: 19; height: 60px; background: #24292f; color: #d7d7d7; diff --git a/apps/web-main/src/components/Player/index.tsx b/apps/web-main/src/components/Player/index.tsx index d9e987b..16d5067 100644 --- a/apps/web-main/src/components/Player/index.tsx +++ b/apps/web-main/src/components/Player/index.tsx @@ -1,12 +1,23 @@ +import { useRef } from "react"; import { useLink, useMount, useScript } from "../../hook"; import "./index.less"; +interface IVideo { + fileID: string; + appID: string; + psign?: string; +} + /** + * demo页面:https://tcplayer.vcube.tencent.com/ + * * 如果需要在 Chrome 和 Firefox 等现代浏览器中通过 H5 播放 Webrtc 视频, 需要在 tcplayer.vx.x.x.min.js 之前引入 TXLivePlayer-x.x.x.min.js。 * 有些浏览器环境不支持 Webrtc,播放器会将 Webrtc 流地址自动转换为 HLS 格式地址,因此快直播场景同样需要引入hls.min.x.xx.xm.js。 *