Add context menu to close current video from player bar

This commit is contained in:
Arkadiusz Fal
2021-12-19 18:19:21 +01:00
parent f89c5ff055
commit efce339234
2 changed files with 10 additions and 1 deletions

View File

@@ -42,6 +42,15 @@ struct PlayerControlsView<Content: View>: View {
.foregroundColor(.secondary)
.lineLimit(1)
}
.contextMenu {
Button {
model.closeCurrentItem()
} label: {
Label("Close Video", systemImage: "xmark.circle")
.labelStyle(.automatic)
}
.disabled(model.currentItem.isNil)
}
Spacer()
}