kaltura / player-sdk-native-ios

Kaltura iOS Player SDK
GNU Affero General Public License v3.0
45 stars 33 forks source link

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

Open kyazdani opened 6 years ago

kyazdani commented 6 years ago

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 commented 6 years ago

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!