feat: 新增了聊天页面播放视频的功能

This commit is contained in:
xuncha
2026-01-18 23:19:58 +08:00
parent d4c7e86e05
commit 240514f1e5
11 changed files with 1245 additions and 51 deletions

View File

@@ -9,6 +9,8 @@ export interface ElectronAPI {
completeOnboarding: () => Promise<boolean>
openOnboardingWindow: () => Promise<boolean>
setTitleBarOverlay: (options: { symbolColor: string }) => void
openVideoPlayerWindow: (videoPath: string, videoWidth?: number, videoHeight?: number) => Promise<void>
resizeToFitVideo: (videoWidth: number, videoHeight: number) => Promise<void>
}
config: {
get: (key: string) => Promise<unknown>
@@ -107,6 +109,21 @@ export interface ElectronAPI {
onUpdateAvailable: (callback: (payload: { cacheKey: string; imageMd5?: string; imageDatName?: string }) => void) => () => void
onCacheResolved: (callback: (payload: { cacheKey: string; imageMd5?: string; imageDatName?: string; localPath: string }) => void) => () => void
}
video: {
getVideoInfo: (videoMd5: string) => Promise<{
success: boolean
exists: boolean
videoUrl?: string
coverUrl?: string
thumbUrl?: string
error?: string
}>
parseVideoMd5: (content: string) => Promise<{
success: boolean
md5?: string
error?: string
}>
}
analytics: {
getOverallStatistics: (force?: boolean) => Promise<{
success: boolean