mirror of
https://github.com/yattee/yattee.git
synced 2025-08-06 18:54:11 +00:00
Close current video (fixes #15)
This commit is contained in:
@@ -233,7 +233,7 @@ final class PlayerModel: ObservableObject {
|
||||
loadCompositionAsset(stream.videoAsset, stream: stream, type: .video, of: video, preservingTime: preservingTime)
|
||||
}
|
||||
|
||||
func loadCompositionAsset(
|
||||
private func loadCompositionAsset(
|
||||
_ asset: AVURLAsset,
|
||||
stream: Stream,
|
||||
type: AVMediaType,
|
||||
@@ -517,4 +517,10 @@ final class PlayerModel: ObservableObject {
|
||||
|
||||
return "\(formatter.string(from: NSNumber(value: rate))!)×"
|
||||
}
|
||||
|
||||
func closeCurrentItem() {
|
||||
addCurrentItemToHistory()
|
||||
currentItem = nil
|
||||
player.replaceCurrentItem(with: nil)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user