feat(kling): 优化时间轴对比组件样式和交互
Some checks failed
Build and Deploy / deploy (push) Has been cancelled

- 重构 TimelinePanel.vue 组件,使用 Tailwind CSS 替代 Less,简化样式代码
- 改进视觉设计:更新颜色方案、间距和图标,提升用户体验
- 移除音频结束位置标记,优化刻度尺和轨道显示逻辑
- 统一时长差异提示的样式和状态显示

feat(infra): 扩展文件预签名接口支持 Content-Type 参数

- 在 FileApi、FileClient、FileService 接口中新增带 Content-Type 参数的 presignGetUrl 方法
- 实现 S3FileClient 对 Content-Type 参数的支持,确保浏览器正确渲染媒体文件
- 在 TikUserFileServiceImpl 中为音视频文件生成预签名 URL 时自动推断 Content-Type
- 支持公开访问和私有访问两种模式下的 Content-Type 参数传递
This commit is contained in:
2026-04-09 01:04:07 +08:00
parent c607316f53
commit 63d3e7eecb
8 changed files with 118 additions and 290 deletions

View File

@@ -339,7 +339,9 @@ public class TikUserFileServiceImpl implements TikUserFileService {
}
// 视频播放URL不缓存每次都生成新的签名URL使用 filePath 而非 fileUrl避免域名匹配问题
return fileApi.presignGetUrl(file.getFilePath(), PRESIGN_URL_EXPIRATION_SECONDS);
// 根据文件扩展名推断 Content-Type确保浏览器 <video> 元素能正确渲染
String contentType = java.net.URLConnection.guessContentTypeFromName(file.getFilePath());
return fileApi.presignGetUrl(file.getFilePath(), PRESIGN_URL_EXPIRATION_SECONDS, contentType);
}
@Override
@@ -354,7 +356,8 @@ public class TikUserFileServiceImpl implements TikUserFileService {
}
// 音频播放URL不缓存每次都生成新的签名URL使用 filePath 而非 fileUrl避免域名匹配问题
return fileApi.presignGetUrl(file.getFilePath(), PRESIGN_URL_EXPIRATION_SECONDS);
String contentType = java.net.URLConnection.guessContentTypeFromName(file.getFilePath());
return fileApi.presignGetUrl(file.getFilePath(), PRESIGN_URL_EXPIRATION_SECONDS, contentType);
}
@Override