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