From 57ff9c035607f12549d8d22814952863420b1a6f Mon Sep 17 00:00:00 2001 From: mozzie Date: Thu, 2 Mar 2023 11:30:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=92=AD=E6=94=BE=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-main/index.html | 2 - apps/web-main/src/assets/base.less | 13 ++ .../web-main/src/components/Player/index.less | 2 +- apps/web-main/src/components/Player/index.tsx | 82 ++++---- .../view/Course/components/Timeline/index.tsx | 14 +- .../web-main/src/view/CourseDetail/index.less | 21 +- apps/web-main/src/view/CourseDetail/index.tsx | 179 ++++++++++++++---- 7 files changed, 207 insertions(+), 106 deletions(-) diff --git a/apps/web-main/index.html b/apps/web-main/index.html index e8d2d62..48b1033 100644 --- a/apps/web-main/index.html +++ b/apps/web-main/index.html @@ -10,7 +10,5 @@
- - diff --git a/apps/web-main/src/assets/base.less b/apps/web-main/src/assets/base.less index edff35f..46698aa 100644 --- a/apps/web-main/src/assets/base.less +++ b/apps/web-main/src/assets/base.less @@ -60,3 +60,16 @@ input { overflow: hidden; text-overflow: ellipsis; } + +.bs-scrollbar { + &::-webkit-scrollbar { + width: 12px; + height: 4px; + } + &::-webkit-scrollbar-thumb { + border: 4px solid transparent; + background-clip: padding-box; + border-radius: 7px; + background-color: var(--color-text-4); + } +} diff --git a/apps/web-main/src/components/Player/index.less b/apps/web-main/src/components/Player/index.less index 8688eb5..dcfce71 100644 --- a/apps/web-main/src/components/Player/index.less +++ b/apps/web-main/src/components/Player/index.less @@ -46,7 +46,7 @@ } .video-js { - box-shadow: 0 0 100px #c8c8c8 !important; + // box-shadow: 0 0 100px #c8c8c8 !important; } .vjs-control-bar { diff --git a/apps/web-main/src/components/Player/index.tsx b/apps/web-main/src/components/Player/index.tsx index f1f679e..26c8417 100644 --- a/apps/web-main/src/components/Player/index.tsx +++ b/apps/web-main/src/components/Player/index.tsx @@ -1,5 +1,5 @@ import { useEffect, useRef, useState } from "react"; -import { useLink, useMount, useScript } from "../../hook"; +import { useScript } from "../../hook"; import "./index.less"; export interface IVideo { @@ -10,70 +10,54 @@ export interface IVideo { } interface IProps { - video?: IVideo | null; + video: IVideo | null; } /** * 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。 - *