Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tvOS][QOL] Supports back button click when in the native player. #947

Merged
merged 4 commits into from
Jan 16, 2024

Conversation

nokeeo
Copy link
Contributor

@nokeeo nokeeo commented Jan 9, 2024

Conforms UINativeVideoPlayerViewController to AVPlayerViewControllerDelegate and implements playerViewControllerShouldDismiss. This method is called by AV player view controller when the player should be dismissed. This function is only called when the playback overlay is not displayed otherwise a back button press will dismiss the overlay.

Fixes #925

@nokeeo nokeeo changed the title [QOL][ATV] Supports back button click when in the native player. [tvOS][QOL] Supports back button click when in the native player. Jan 9, 2024
@nokeeo
Copy link
Contributor Author

nokeeo commented Jan 13, 2024

ping @LePips for review or please assign to whomever is appropriate.

@nokeeo nokeeo requested a review from LePips January 13, 2024 23:04
Copy link
Member

@LePips LePips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some cleanup, good to have the refactor comment about subclassing from AVPlayerViewController. Yeah it says subclassing isn't supported but we can generally get away/lazy with it, but we should wrap that into a parent view/VC that interacts with the underlying AVPlayerViewController.

Shared/Coordinators/VideoPlayerCoordinator.swift Outdated Show resolved Hide resolved
Shared/Coordinators/VideoPlayerCoordinator.swift Outdated Show resolved Hide resolved
Swiftfin tvOS/Views/VideoPlayer/NativeVideoPlayer.swift Outdated Show resolved Hide resolved
@nokeeo nokeeo requested a review from LePips January 14, 2024 02:14
@nokeeo
Copy link
Contributor Author

nokeeo commented Jan 16, 2024

Done. PTAL.

@nokeeo nokeeo requested a review from LePips January 16, 2024 02:15
@LePips LePips merged commit 3b59bed into jellyfin:main Jan 16, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ATV] Cannot exit playing session with native player
2 participants