Update IPTVPlayer.tsx
parent
1e5b899214
commit
b4dbd22600
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { Maximize, Pause, Play, Settings, Volume2, VolumeX } from 'lucide-react';
|
||||
import { Maximize, Pause, Play, Volume2, VolumeX } from 'lucide-react';
|
||||
|
||||
interface IPTVChannel {
|
||||
id: string;
|
||||
|
@ -17,7 +17,7 @@ interface IPTVPlayerProps {
|
|||
onChannelChange?: (channel: IPTVChannel) => void;
|
||||
}
|
||||
|
||||
export function IPTVPlayer({ channels: _channels, currentChannel, onChannelChange: _onChannelChange }: IPTVPlayerProps) {
|
||||
export function IPTVPlayer({ channels, currentChannel, onChannelChange: _onChannelChange }: IPTVPlayerProps) {
|
||||
const videoRef = useRef<HTMLVideoElement>(null);
|
||||
const [isPlaying, setIsPlaying] = useState(false);
|
||||
const [isMuted, setIsMuted] = useState(false);
|
||||
|
@ -118,7 +118,7 @@ export function IPTVPlayer({ channels: _channels, currentChannel, onChannelChang
|
|||
};
|
||||
|
||||
// 按组分类频道(暂未使用,为未来功能预留)
|
||||
// const groupedChannels = _channels.reduce((acc, channel) => {
|
||||
// const groupedChannels = channels.reduce((acc, channel) => {
|
||||
// const group = channel.group || '其他';
|
||||
// if (!acc[group]) acc[group] = [];
|
||||
// acc[group].push(channel);
|
||||
|
|
Loading…
Reference in New Issue