mirror of
https://github.com/yattee/yattee.git
synced 2024-12-13 22:00:31 +05:30
Faster replacing player item
This commit is contained in:
parent
3624c9619a
commit
62bff9283c
@ -29,6 +29,7 @@ extension PlayerModel {
|
||||
}
|
||||
|
||||
func playNow(_ video: Video, at time: TimeInterval? = nil) {
|
||||
player.replaceCurrentItem(with: nil)
|
||||
addCurrentItemToHistory()
|
||||
|
||||
enqueueVideo(video, prepending: true) { _, item in
|
||||
@ -92,6 +93,7 @@ extension PlayerModel {
|
||||
}
|
||||
|
||||
func advanceToItem(_ newItem: PlayerQueueItem, at time: TimeInterval? = nil) {
|
||||
player.replaceCurrentItem(with: nil)
|
||||
addCurrentItemToHistory()
|
||||
|
||||
remove(newItem)
|
||||
|
Loading…
Reference in New Issue
Block a user