mirror of
https://github.com/yattee/yattee.git
synced 2026-11-02 09:57:20 +00:00
Allow pinch-to-panscan on the video in the corner layout
The window-level pinch was blocked whenever the landscape panel was pinned and visible (the corner layout always counts as pinned) or a stale portrait-panel flag was set. In the corner layout the pinch now starts when it begins inside the video region, and the panscan control button is enabled there too.
This commit is contained in:
@@ -1373,6 +1373,19 @@ extension ExpandedPlayerSheet {
|
||||
fullWidth: width,
|
||||
fullHeight: height
|
||||
)
|
||||
#if os(iOS)
|
||||
.background {
|
||||
GeometryReader { proxy in
|
||||
Color.clear
|
||||
.onChange(of: proxy.frame(in: .global), initial: true) { _, frame in
|
||||
navigationCoordinator?.cornerVideoFrame = frame
|
||||
}
|
||||
.onDisappear {
|
||||
navigationCoordinator?.cornerVideoFrame = .zero
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
},
|
||||
onChannelTap: video.author.hasRealChannelInfo ? {
|
||||
navigationCoordinator?.navigateToChannel(for: video, collapsePlayer: true)
|
||||
@@ -1686,7 +1699,10 @@ extension ExpandedPlayerSheet {
|
||||
playerService.selectEmbeddedSubtitleTrack(trackID)
|
||||
},
|
||||
panscanValue: navigationCoordinator?.pinchPanscan ?? 0.0,
|
||||
isPanscanAllowed: !(isPanelPinned && isPanelVisible),
|
||||
// Corner layout: the video owns its own region, so it can
|
||||
// fill it even with the panels showing
|
||||
isPanscanAllowed: !(isPanelPinned && isPanelVisible)
|
||||
|| appEnvironment?.navigationCoordinator.isCornerLayoutActive == true,
|
||||
onTogglePanscan: { [weak navigationCoordinator] in
|
||||
navigationCoordinator?.togglePanscan()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user