import { ArrowLeft, Gauge, RefreshCw, Sparkles } from 'lucide-react'
import type { PlayerMode } from './playerPageModel'
import { PLAYER_ICON_BUTTON } from '../components/playerTheme'
// PlayerTopBar — 播放器顶部的极简浮层。
//
// 以前这里只有「返回」和一个播放方式药丸按钮,用户看不到自己在看什么;而播放方式
// 又要和控制栏里的画质/倍速混在一起点。现在改成 B 站那样:左边是返回图标 + 当前
// 媒体标题,右边只留一个只读的播放方式状态标签(真正的切换入口收进了控制栏的
// 「设置」面板),顶栏因此不再参与「一堆药丸按钮」的视觉噪音。
type PlayerTopBarProps = {
/** 当前播放的媒体标题。 */
title?: string
/** 标题下的次要信息(集数、版本等)。 */
subtitle?: string
directOnly: boolean
isDirectStream?: boolean
directStreamLabel?: string
/** 已算好的播放方式文字(如「直连播放 · 115 直链」「115 云 HLS 转码」);传入时优先展示。 */
modeLabel?: string
mode: PlayerMode
onBack: () => void
}
export function PlayerTopBar({
title,
subtitle,
directOnly,
isDirectStream,
directStreamLabel,
modeLabel,
mode,
onBack,
}: PlayerTopBarProps) {
const derived = isDirectStream
? {
icon:
{title}
{subtitle ? ({subtitle}
) : null}