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

FullScreenMode applies to the rootViewController and presents behind my viewController #271

Open
kyazdani opened this issue Mar 19, 2018 · 1 comment

Comments

@kyazdani
Copy link

Hi there,

I'm wanting to launch the player in full screen from the button on the bottom right of the video. However when I do this because I am on a modal viewController it is being attached to the rootViewController which is not what I want because it's displaying behind my modal viewController

I've tried creating a subclass of KPViewController in my project and rewriting the method below. However there are some properties that are private and only declared in the .m file.

Is this intended behaviour to attach it to the rootViewController? Is there away I can override the below method? Or is there another way to achieve what I would like to?

Thanks,

    KPLogTrace(@"Enter");
    _isFullScreenToggled = !_isFullScreenToggled;
    if (!_fullScreenToggeled) {
        
        if (_isFullScreenToggled) {
            self.view.frame = screenBounds();
            [self.topWindow addSubview:self.view];
            [self.topWindow makeKeyAndVisible];
            [self.topWindow.rootViewController.view addSubview:self.view];
        } else {
            self.view.frame = self.superView.bounds;
            [self.superView addSubview:self.view];
        }
    } else {
        _fullScreenToggeled(_isFullScreenToggled);
    }
    
    [self.controlsView updateLayout];
    
    if ([_delegate respondsToSelector:@selector(kPlayer:playerFullScreenToggled:)]) {
        [_delegate kPlayer:self playerFullScreenToggled:_isFullScreenToggled];
    }
    
    KPLogTrace(@"Exit");
}
@kaltura-hooks
Copy link

Hi @kyazdani,

Thank for you reporting an issue and helping to improve Kaltura!

If you're having some issues getting your player set up, there are quite a few steps that can be taken to figure things out.

In order to expedite the reporting process, please follow instructions in the doc below, prior to submitting a bug/issue

https://github.com/kaltura/player-sdk-native-ios/wiki/How-To-Report-an-Issue-with-the-Kaltura-iOS-Player-SDK

If you only have a general question rather than a bug report, please close this issue, post at:
https://forum.kaltura.org/c/community-forums/player-sdk

And add a comment to the Github issue linking to your post.

Thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants