feat: Introduce distinct mobile and desktop video player UI, controls, and state management, along with new styling and icon components.

This commit is contained in:
kuekhaoyang
2025-11-21 12:34:45 +08:00
parent d199c7aa6f
commit 36488e545c
31 changed files with 3634 additions and 3532 deletions
+43
View File
@@ -0,0 +1,43 @@
import type { VideoSource } from '@/lib/types';
// Default predefined video sources - Real Chinese video APIs
export const DEFAULT_SOURCES: VideoSource[] = [
{ id: 'feifan', name: '非凡资源', baseUrl: 'http://ffzy5.tv/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 1 },
{ id: 'wolong', name: '卧龙资源', baseUrl: 'https://wolongzyw.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 2 },
{ id: 'zuida', name: '最大资源', baseUrl: 'https://api.zuidapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 3 },
{ id: 'baiduyun', name: '百度云资源', baseUrl: 'https://api.apibdzy.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 4 },
{ id: 'baofeng', name: '暴风资源', baseUrl: 'https://bfzyapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 5 },
{ id: 'jisu', name: '极速资源', baseUrl: 'https://jszyapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 6 },
{ id: 'tianya', name: '天涯资源', baseUrl: 'https://tyyszy.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 7 },
{ id: 'wujin', name: '无尽资源', baseUrl: 'https://api.wujinapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 8 },
{ id: 'modu', name: '魔都资源', baseUrl: 'https://www.mdzyapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 9 },
{ id: 'sanliuling', name: '360资源', baseUrl: 'https://360zy.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 10 },
{ id: 'dytt', name: '电影天堂', baseUrl: 'http://caiji.dyttzyapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 11 },
{ id: 'ruyi', name: '如意资源', baseUrl: 'https://cj.rycjapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 12 },
{ id: 'wangwang', name: '旺旺资源', baseUrl: 'https://wwzy.tv/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 13 },
{ id: 'hongniu', name: '红牛资源', baseUrl: 'https://www.hongniuzy2.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 14 },
{ id: 'guangsu', name: '光速资源', baseUrl: 'https://api.guangsuapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 15 },
{ id: 'ikun', name: 'iKun资源', baseUrl: 'https://ikunzyapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 16 },
{ id: 'youku', name: '优酷资源', baseUrl: 'https://api.ukuapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 17 },
{ id: 'huya', name: '虎牙资源', baseUrl: 'https://www.huyaapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 18 },
{ id: 'xinlang', name: '新浪资源', baseUrl: 'http://api.xinlangapi.com/xinlangapi.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 19 },
{ id: 'lezi', name: '乐子资源', baseUrl: 'https://cj.lziapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 20 },
{ id: 'haihua', name: '海豚资源', baseUrl: 'https://hhzyapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 21 },
{ id: 'jiangyu', name: '鲸鱼资源', baseUrl: 'https://jyzyapi.com/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 22 },
{ id: 'yilingba', name: '1080资源', baseUrl: 'https://api.1080zyku.com/inc/api_mac10.php', searchPath: '', detailPath: '', enabled: true, priority: 23 },
{ id: 'aidan', name: '爱蛋资源', baseUrl: 'https://lovedan.net/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 24 },
{ id: 'leba', name: '乐播资源', baseUrl: 'https://lbapi9.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 25 },
{ id: 'moduzy', name: '魔都影视', baseUrl: 'https://www.moduzy.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 26 },
{ id: 'feifanapi', name: '非凡API', baseUrl: 'https://api.ffzyapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 27 },
{ id: 'feifancj', name: '非凡采集', baseUrl: 'http://cj.ffzyapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 28 },
{ id: 'feifancj2', name: '非凡采集HTTPS', baseUrl: 'https://cj.ffzyapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 29 },
{ id: 'feifan1', name: '非凡线路1', baseUrl: 'http://ffzy1.tv/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 30 },
{ id: 'wolong2', name: '卧龙采集', baseUrl: 'https://collect.wolongzyw.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 31 },
{ id: 'baofeng2', name: '暴风APP', baseUrl: 'https://app.bfzyapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 32 },
{ id: 'wujin2', name: '无尽ME', baseUrl: 'https://api.wujinapi.me/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 33 },
{ id: 'tianyazy', name: '天涯海角', baseUrl: 'https://tyyszyapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 34 },
{ id: 'guangsu2', name: '光速HTTP', baseUrl: 'http://api.guangsuapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 35 },
{ id: 'xinlang2', name: '新浪HTTPS', baseUrl: 'https://api.xinlangapi.com/xinlangapi.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 36 },
{ id: 'yilingba2', name: '1080JSON', baseUrl: 'https://api.1080zyku.com/inc/apijson.php', searchPath: '', detailPath: '', enabled: true, priority: 37 },
{ id: 'lezi2', name: '乐子HTTP', baseUrl: 'http://cj.lziapi.com/api.php/provide/vod', searchPath: '', detailPath: '', enabled: true, priority: 38 },
];
+3 -346
View File
@@ -4,352 +4,7 @@
*/
import type { VideoSource } from '@/lib/types';
// Default predefined video sources - Real Chinese video APIs
const DEFAULT_SOURCES: VideoSource[] = [
{
id: 'feifan',
name: '非凡资源',
baseUrl: 'http://ffzy5.tv/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 1,
},
{
id: 'wolong',
name: '卧龙资源',
baseUrl: 'https://wolongzyw.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 2,
},
{
id: 'zuida',
name: '最大资源',
baseUrl: 'https://api.zuidapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 3,
},
{
id: 'baiduyun',
name: '百度云资源',
baseUrl: 'https://api.apibdzy.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 4,
},
{
id: 'baofeng',
name: '暴风资源',
baseUrl: 'https://bfzyapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 5,
},
{
id: 'jisu',
name: '极速资源',
baseUrl: 'https://jszyapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 6,
},
{
id: 'tianya',
name: '天涯资源',
baseUrl: 'https://tyyszy.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 7,
},
{
id: 'wujin',
name: '无尽资源',
baseUrl: 'https://api.wujinapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 8,
},
{
id: 'modu',
name: '魔都资源',
baseUrl: 'https://www.mdzyapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 9,
},
{
id: 'sanliuling',
name: '360资源',
baseUrl: 'https://360zy.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 10,
},
{
id: 'dytt',
name: '电影天堂',
baseUrl: 'http://caiji.dyttzyapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 11,
},
{
id: 'ruyi',
name: '如意资源',
baseUrl: 'https://cj.rycjapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 12,
},
{
id: 'wangwang',
name: '旺旺资源',
baseUrl: 'https://wwzy.tv/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 13,
},
{
id: 'hongniu',
name: '红牛资源',
baseUrl: 'https://www.hongniuzy2.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 14,
},
{
id: 'guangsu',
name: '光速资源',
baseUrl: 'https://api.guangsuapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 15,
},
{
id: 'ikun',
name: 'iKun资源',
baseUrl: 'https://ikunzyapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 16,
},
{
id: 'youku',
name: '优酷资源',
baseUrl: 'https://api.ukuapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 17,
},
{
id: 'huya',
name: '虎牙资源',
baseUrl: 'https://www.huyaapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 18,
},
{
id: 'xinlang',
name: '新浪资源',
baseUrl: 'http://api.xinlangapi.com/xinlangapi.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 19,
},
{
id: 'lezi',
name: '乐子资源',
baseUrl: 'https://cj.lziapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 20,
},
{
id: 'haihua',
name: '海豚资源',
baseUrl: 'https://hhzyapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 21,
},
{
id: 'jiangyu',
name: '鲸鱼资源',
baseUrl: 'https://jyzyapi.com/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 22,
},
{
id: 'yilingba',
name: '1080资源',
baseUrl: 'https://api.1080zyku.com/inc/api_mac10.php',
searchPath: '',
detailPath: '',
enabled: true,
priority: 23,
},
{
id: 'aidan',
name: '爱蛋资源',
baseUrl: 'https://lovedan.net/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 24,
},
{
id: 'leba',
name: '乐播资源',
baseUrl: 'https://lbapi9.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 25,
},
{
id: 'moduzy',
name: '魔都影视',
baseUrl: 'https://www.moduzy.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 26,
},
{
id: 'feifanapi',
name: '非凡API',
baseUrl: 'https://api.ffzyapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 27,
},
{
id: 'feifancj',
name: '非凡采集',
baseUrl: 'http://cj.ffzyapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 28,
},
{
id: 'feifancj2',
name: '非凡采集HTTPS',
baseUrl: 'https://cj.ffzyapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 29,
},
{
id: 'feifan1',
name: '非凡线路1',
baseUrl: 'http://ffzy1.tv/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 30,
},
{
id: 'wolong2',
name: '卧龙采集',
baseUrl: 'https://collect.wolongzyw.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 31,
},
{
id: 'baofeng2',
name: '暴风APP',
baseUrl: 'https://app.bfzyapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 32,
},
{
id: 'wujin2',
name: '无尽ME',
baseUrl: 'https://api.wujinapi.me/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 33,
},
{
id: 'tianyazy',
name: '天涯海角',
baseUrl: 'https://tyyszyapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 34,
},
{
id: 'guangsu2',
name: '光速HTTP',
baseUrl: 'http://api.guangsuapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 35,
},
{
id: 'xinlang2',
name: '新浪HTTPS',
baseUrl: 'https://api.xinlangapi.com/xinlangapi.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 36,
},
{
id: 'yilingba2',
name: '1080JSON',
baseUrl: 'https://api.1080zyku.com/inc/apijson.php',
searchPath: '',
detailPath: '',
enabled: true,
priority: 37,
},
{
id: 'lezi2',
name: '乐子HTTP',
baseUrl: 'http://cj.lziapi.com/api.php/provide/vod',
searchPath: '',
detailPath: '',
enabled: true,
priority: 38,
},
];
import { DEFAULT_SOURCES } from './default-sources';
/**
* Get source by ID
@@ -358,3 +13,5 @@ export function getSourceById(id: string): VideoSource | undefined {
return DEFAULT_SOURCES.find(source => source.id === id);
}
// Re-export DEFAULT_SOURCES for backward compatibility
export { DEFAULT_SOURCES };