diff --git a/src/pages/live/index.tsx b/src/pages/live/index.tsx index 9e261d4..d042402 100644 --- a/src/pages/live/index.tsx +++ b/src/pages/live/index.tsx @@ -206,22 +206,24 @@ export default function LiveIndex() { {contextHolder}
-
-
直播界面
-
-
- { - setState({playProgress: progress}) - }} - /> +
+
+
直播界面
+
+
+ { + setState({playProgress: progress}) + }} + /> +
+
+
+ 视频时长: {formatDuration(currentTotalDuration)} / {formatDuration(totalDuration)}
-
-
- 视频时长: {formatDuration(currentTotalDuration)} / {formatDuration(totalDuration)}
diff --git a/src/pages/video/index.tsx b/src/pages/video/index.tsx index 4481ebd..1aac079 100644 --- a/src/pages/video/index.tsx +++ b/src/pages/video/index.tsx @@ -127,28 +127,30 @@ export default function VideoIndex() { return (
-
-
预览视频 - 点击视频列表播放
-
-
- { - console.log(state) - if (state.end || state.error) setState({playingIndex: -1}) - }} - onProgress={(current, duration) => { - setState({ - playState: { - current: current, - total: duration - } - }) - }} - className="w-[360px] h-[640px] bg-white"/> +
+
+
预览视频 - 点击视频列表播放
+
+
+ { + console.log(state) + if (state.end || state.error) setState({playingIndex: -1}) + }} + onProgress={(current, duration) => { + setState({ + playState: { + current: current, + total: duration + } + }) + }} + className="w-[360px] h-[640px] bg-white"/> +
+
{formatDuration(state.playState.current)} / {formatDuration(state.playState.total)}
-
{formatDuration(state.playState.current)} / {formatDuration(state.playState.total)}