feat: 展示出来视频
This commit is contained in:
parent
0670c686d2
commit
68582b82cb
@ -305,8 +305,8 @@ public class ImageUploaderGetID: ObservableObject {
|
||||
}
|
||||
|
||||
print("✅ 成功获取上传URL")
|
||||
print(" - 文件ID: \(fileId)")
|
||||
print(" - 上传URL: \(uploadURLString)")
|
||||
print(" ❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️ - 文件ID: \(fileId)")
|
||||
print(" - 上传URL: \(uploadURLString)")
|
||||
|
||||
completion(.success((fileId: fileId, uploadURL: uploadURL)))
|
||||
} catch {
|
||||
|
||||
@ -27,7 +27,7 @@ struct MemoryItem: Identifiable, Decodable {
|
||||
var title: String { name ?? "Untitled" }
|
||||
var subtitle: String { description ?? "" }
|
||||
var mediaType: MemoryMediaType {
|
||||
let url = fileInfo.url.lowercased()
|
||||
let url = fileInfo.fileName.lowercased()
|
||||
if url.hasSuffix(".mp4") || url.hasSuffix(".mov") {
|
||||
return .video(url: fileInfo.url, previewUrl: previewFileInfo.url)
|
||||
} else {
|
||||
@ -416,6 +416,9 @@ struct MemoryCard: View {
|
||||
height: (UIScreen.main.bounds.width / 2 - 24) * (1/memory.aspectRatio))
|
||||
.clipped()
|
||||
.cornerRadius(12)
|
||||
.onAppear {
|
||||
print("ℹ️ℹ️ℹ️ℹ️ℹ️ℹ️ℹ️ℹ️ Memory Card Appeared - Media Type: \(memory.mediaType)")
|
||||
}
|
||||
|
||||
// Show play button for videos
|
||||
if case .video = memory.mediaType {
|
||||
@ -432,6 +435,9 @@ struct MemoryCard: View {
|
||||
.font(Typography.font(for: .body, family: .quicksandBold))
|
||||
.foregroundColor(.themeTextMessageMain)
|
||||
.lineLimit(1)
|
||||
.onTapGesture {
|
||||
print("🐰🐰🐰🐰🐰🐰🐰🐰🐰🐰🐰 \(memory)")
|
||||
}
|
||||
|
||||
Text(memory.subtitle)
|
||||
.font(.system(size: 14))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user