mukeshydv / YoutubePlayerView

Helper library for iOS developers that want to embed YouTube videos in their iOS apps with the iframe player API. 📹
MIT License
78 stars 32 forks source link

status bar behaviour changes when exiting the full screen. #21

Open kunwar231 opened 4 years ago

kunwar231 commented 4 years ago

When exiting the full screen view, the status bar gets hidden. Status bar is not set as per a single view controller in the info.plist, so its not possible for me to update it for a single viewcontroller.

mukeshydv commented 4 years ago

Can you share some more details, like a screen shot of current behavior and desired behavior?

kunwar231 commented 4 years ago

I added the player in a viewcontroller and pushed this viewcontroller from another viewcontroller on an action. Now when I play the video, it expands to full screen. In the full screen view, if I tap on the cross button in the top left of the screen, the player exits the full screen but the status bar in the viewcontroller now gets hidden. My viewcontroller also has a navigationbar

kunwar231 commented 4 years ago

@mukeshydv please suggest a solution

kunwar231 commented 4 years ago

It's not an issue in the simulator but in the devices. Checked in iphone 6, 8 and Xr

mukeshydv commented 4 years ago

can you paste code of your viewcontroller which has video view?

kunwar231 commented 4 years ago

Hi, I just have an iboutlet for the youtubePlayerView. And one line in viewdidload that is videoplayer.loadWithVideoId() In which I pass the video id

On Fri, May 29, 2020, 01:16 Mukesh notifications@github.com wrote:

can you paste code of your viewcontroller which has video view?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mukeshydv/YoutubePlayerView/issues/21#issuecomment-635558026, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPEJ4M2WGFH2ZJKNIYV6YTRT25Q5ANCNFSM4NNAPQAA .

mukeshydv commented 4 years ago

try adding this code in the video view controller

    override var prefersStatusBarHidden: Bool {
        return false
    }
kunwar231 commented 4 years ago

This can only be used if in the info.plist viewcontroller based status bar is set to true. And in that case I'll have to set the status bar in all of the viewcontrollers. That is just not possible.

On Mon, Jun 1, 2020, 00:35 Mukesh notifications@github.com wrote:

try adding this code in the video view controller

override var prefersStatusBarHidden: Bool {
    return false
}

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mukeshydv/YoutubePlayerView/issues/21#issuecomment-636514122, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPEJ4JFXYTCVTSRMNUOPK3RUKTADANCNFSM4NNAPQAA .

mukeshydv commented 4 years ago

https://github.com/react-native-community/react-native-webview/issues/62

kunwar231 commented 4 years ago

Setting viewcontroller based status bar to true is still required to call prefersstatusbarhidden. And why have you closed the issue, when it's not resolved?

mukeshydv commented 4 years ago

This is not library's issue, so closing it. https://stackoverflow.com/questions/52136497/status-bar-disappeared-after-full-screen-video-in-wkwebview-only-in-ios-12

kunwar231 commented 4 years ago

This is library's issue. I don't need to handle the status on any other viewcontroller, but the viewcontroller in which your library is used, requires it to b used in. It should be mentioned in the requirements section of the library. Otherwise it's just misleading people

On Mon, Jun 1, 2020, 13:02 Mukesh notifications@github.com wrote:

This is not library's issue, so closing it.

https://stackoverflow.com/questions/52136497/status-bar-disappeared-after-full-screen-video-in-wkwebview-only-in-ios-12

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mukeshydv/YoutubePlayerView/issues/21#issuecomment-636665748, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPEJ4J333LG7Q7ZYGMH34TRUNKPPANCNFSM4NNAPQAA .

mukeshydv commented 4 years ago

I'm busy for some time, can you open a PR with the fix? thanks.

kunwar231 commented 4 years ago

I don't have a fix. I would just ask you to reopen the issue, may be someone else could solve it

On Wed, Jun 3, 2020, 18:03 Mukesh notifications@github.com wrote:

I'm busy for some time, can you open a PR with the fix? thanks.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mukeshydv/YoutubePlayerView/issues/21#issuecomment-638167354, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPEJ4IWONAFYJCQ2CTENZDRUY7KLANCNFSM4NNAPQAA .