|
|
|
@ -105,6 +105,11 @@ struct SVideoPlayer: View, EditItemDelegate { |
|
|
|
HStack { |
|
|
|
VStack { |
|
|
|
HStack { |
|
|
|
Text(model.currentSnapshot.name).foregroundColor(Color.blue).fontWeight(Font.Weight.light) |
|
|
|
} |
|
|
|
LazyVGrid(columns: [ |
|
|
|
GridItem(.adaptive(minimum: 45)) |
|
|
|
], spacing: 5) { |
|
|
|
Button(action: { |
|
|
|
if model.dirty { |
|
|
|
if LocalManager.sharedInstance.settings.confirm { |
|
|
|
@ -130,7 +135,7 @@ struct SVideoPlayer: View, EditItemDelegate { |
|
|
|
closePlayer(withSave: false) |
|
|
|
} |
|
|
|
} |
|
|
|
if !model.baseItem.compilation { |
|
|
|
/* if !model.baseItem.compilation { |
|
|
|
Button(action: { |
|
|
|
if isEnd() { |
|
|
|
setEnd() |
|
|
|
@ -151,7 +156,7 @@ struct SVideoPlayer: View, EditItemDelegate { |
|
|
|
blackShown = false |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} */ |
|
|
|
KToggleButton(text: "\(relative())", binding: $more) |
|
|
|
|
|
|
|
Button(action: { |
|
|
|
@ -201,9 +206,7 @@ struct SVideoPlayer: View, EditItemDelegate { |
|
|
|
|
|
|
|
KToggleButton(text: "embd", binding: $embedded).frame(height: 30) |
|
|
|
} |
|
|
|
HStack { |
|
|
|
Text(model.currentSnapshot.name).foregroundColor(Color.blue).fontWeight(Font.Weight.light) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
HStack { |
|
|
|
ScrollViewReader { scrollvalue in |
|
|
|
@ -220,7 +223,7 @@ struct SVideoPlayer: View, EditItemDelegate { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}.frame(height: 50) |
|
|
|
// .onChange(of: scrollTarget { target in |
|
|
|
// if let tg = target { |
|
|
|
// scrollTarget = nil |
|
|
|
@ -233,7 +236,12 @@ struct SVideoPlayer: View, EditItemDelegate { |
|
|
|
|
|
|
|
Spacer() |
|
|
|
VStack { |
|
|
|
HStack { |
|
|
|
Text(""" |
|
|
|
(\(model.codec) \(model.height), \(model.nominalFrameRate), \(model.bitRate)m)\n\(model.scale, specifier: "%.2f")x (\(model.dragOffset.width, specifier: "%.0f"),\(model.dragOffset.height, specifier: "%.0f")) |
|
|
|
""").foregroundColor(Color.blue).fontWeight(Font.Weight.light) |
|
|
|
LazyVGrid(columns: [ |
|
|
|
GridItem(.adaptive(minimum: 45)) |
|
|
|
], spacing: 5) { |
|
|
|
Button(action: { model.edit.toggle() }, label: { |
|
|
|
Text("edit") |
|
|
|
}) |
|
|
|
@ -254,13 +262,10 @@ struct SVideoPlayer: View, EditItemDelegate { |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
Text(""" |
|
|
|
(\(model.codec) \(model.height), \(model.nominalFrameRate), \(model.bitRate)m)\n\(model.scale, specifier: "%.2f")x (\(model.dragOffset.width, specifier: "%.0f"),\(model.dragOffset.height, specifier: "%.0f")) |
|
|
|
""").foregroundColor(Color.blue).fontWeight(Font.Weight.light) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.frame(height: 50) |
|
|
|
// .frame(height: 50) |
|
|
|
|
|
|
|
GeometryReader { geometry in |
|
|
|
VStack { |
|
|
|
@ -674,6 +679,7 @@ struct SVideoPlayer: View, EditItemDelegate { |
|
|
|
let cgImage = try imgGenerator.copyCGImage(at: time, actualTime: nil) |
|
|
|
let thumbnail = UIImage(cgImage: cgImage) |
|
|
|
model.dirty = true |
|
|
|
UIPasteboard.general.image = thumbnail |
|
|
|
|
|
|
|
showThumbnail(currentItem: model.baseItem, thumbnail: thumbnail, time: time) |
|
|
|
|
|
|
|
|