mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 13:33:42 +00:00
Add close item action to AVPlayer on tvOS
This commit is contained in:
parent
8054c9f44a
commit
cda6dc8b9b
@ -43,6 +43,12 @@ extension PlayerModel {
|
||||
}
|
||||
}
|
||||
|
||||
var closeCurrentItemAction: UIAction {
|
||||
UIAction(title: "Close video", image: UIImage(systemName: "xmark")) { [weak self] _ in
|
||||
self?.closeCurrentItem()
|
||||
}
|
||||
}
|
||||
|
||||
var switchToMPVAction: UIAction? {
|
||||
UIAction(title: "Switch to MPV", image: UIImage(systemName: "m.circle")) { _ in
|
||||
self.avPlayerBackend.controller?.dismiss(animated: false)
|
||||
@ -89,6 +95,7 @@ extension PlayerModel {
|
||||
#if os(tvOS)
|
||||
avPlayerBackend.controller?.playerView.transportBarCustomMenuItems = [
|
||||
restoreLastSkippedSegmentAction,
|
||||
closeCurrentItemAction,
|
||||
rateMenu,
|
||||
streamsMenu,
|
||||
playbackModeMenu,
|
||||
|
Loading…
Reference in New Issue
Block a user