From d66a6060534a2263914c93343a9e15ab8ef42ac3 Mon Sep 17 00:00:00 2001 From: mozzie Date: Wed, 1 Mar 2023 17:05:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AF=BE=E7=A8=8B=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-main/src/components/Nav/index.tsx | 13 ++-- .../web-main/src/components/Player/index.less | 1 - apps/web-main/src/components/Player/index.tsx | 66 +++++++++---------- apps/web-main/src/router/index.tsx | 1 + .../web-main/src/view/CourseDetail/index.less | 23 +++---- apps/web-main/src/view/CourseDetail/index.tsx | 36 ++++++---- 6 files changed, 74 insertions(+), 66 deletions(-) diff --git a/apps/web-main/src/components/Nav/index.tsx b/apps/web-main/src/components/Nav/index.tsx index ce2b6ea..5f2ad75 100644 --- a/apps/web-main/src/components/Nav/index.tsx +++ b/apps/web-main/src/components/Nav/index.tsx @@ -23,11 +23,14 @@ function Nav() { Backset
- {routerList.map((route) => ( - navigate(route.path)}> - {route.name} - - ))} + {routerList.map( + (route) => + !route.invisible && ( + navigate(route.path)}> + {route.name} + + ) + )}
diff --git a/apps/web-main/src/components/Player/index.less b/apps/web-main/src/components/Player/index.less index 8d17a14..485182c 100644 --- a/apps/web-main/src/components/Player/index.less +++ b/apps/web-main/src/components/Player/index.less @@ -37,7 +37,6 @@ } // 圆角 - .vjs-poster, .video-js { border-radius: 10px !important; diff --git a/apps/web-main/src/components/Player/index.tsx b/apps/web-main/src/components/Player/index.tsx index 0f31b9c..c3f37e6 100644 --- a/apps/web-main/src/components/Player/index.tsx +++ b/apps/web-main/src/components/Player/index.tsx @@ -1,14 +1,18 @@ -import { useRef } from "react"; +import { useEffect, useRef } from "react"; import { useLink, useMount, useScript } from "../../hook"; import "./index.less"; -interface IVideo { +export interface IVideo { fileID: string; appID: string; psign?: string; className?: string; } +interface IProps { + video: IVideo | null; +} + /** * demo页面:https://tcplayer.vcube.tencent.com/ * @@ -16,50 +20,44 @@ interface IVideo { * 有些浏览器环境不支持 Webrtc,播放器会将 Webrtc 流地址自动转换为 HLS 格式地址,因此快直播场景同样需要引入hls.min.x.xx.xm.js。 *