Commit d231d520 authored by Carola Nitz's avatar Carola Nitz

VLCTabBarController: added open MivieViewcontroller with the correct frame for the minimized view

parent 1df3bc25
......@@ -832,7 +832,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
- (IBAction)minimizePlayback:(id)sender
{
LOCKCHECK;
[[UIApplication sharedApplication] sendAction:@selector(closeFullscreenPlayback) to:nil from:self forEvent:nil];
[[VLCPlayerDisplayController sharedInstance] closeFullscreenPlayback];
}
- (IBAction)positionSliderAction:(UISlider *)sender
......
......@@ -303,7 +303,7 @@ static NSString *const VLCPlayerDisplayControllerDisplayModeKey = @"VLCPlayerDis
if (@available(iOS 11.0, *)) {
miniPlayerHeight += self.view.safeAreaInsets.bottom;
}
const CGRect miniPlayerFrameIn = CGRectMake(0., viewRect.size.height-miniPlayerHeight, viewRect.size.width, miniPlayerHeight);
const CGRect miniPlayerFrameIn = CGRectMake(0., viewRect.size.height-miniPlayerHeight-self.view.layoutMargins.bottom, viewRect.size.width, miniPlayerHeight);
const CGRect miniPlayerFrameOut = CGRectMake(0., viewRect.size.height, viewRect.size.width, miniPlayerHeight);
BOOL needsShow = activePlaybackSession && !miniPlayerVisible;
......
......@@ -112,6 +112,13 @@ class VLCTabbarCooordinator: NSObject, VLCVideoControllerDelegate {
}
func videoViewControllerDidSelectMediaObject(VLCVideoViewController: VLCVideoViewController, mediaObject: NSManagedObject) {
//that should go into a Coordinator itself
let displayController = VLCPlayerDisplayController()
tabBarController.addChildViewController(displayController)
tabBarController.view.addSubview(displayController.view)
displayController.view.layoutMargins = UIEdgeInsets(top:0, left:0, bottom:tabBarController.tabBar.frame.size.height, right:0)
displayController.didMove(toParentViewController: tabBarController)
displayController.displayMode = .miniplayer
let vpc = VLCPlaybackController.sharedInstance()
vpc?.playMediaLibraryObject(mediaObject)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment