Skip to content
This repository has been archived by the owner on Jun 11, 2020. It is now read-only.

Android fullscreen video do not hides StatusBar #17

Open
Strate opened this issue Dec 20, 2018 · 7 comments
Open

Android fullscreen video do not hides StatusBar #17

Strate opened this issue Dec 20, 2018 · 7 comments

Comments

@Strate
Copy link

Strate commented Dec 20, 2018

Hi! THank you for this library!

I realized, that opening video in full screen do not hides device's statusbar. Could you plz fix this?

@droidMakk
Copy link

Import { StatusBar } from 'react-native';

@EugeneDraitsev
Copy link

@droidMakk but how you can handle toggle of fullscreen?

F.e. I have this jsx:

(
      <>
        <StatusBar hidden={isInFullscreenMode} />
        <VideoWebView
          automaticallyAdjustContentInsets={false}
          javaScriptEnabled
          injectedJavaScript={js}
          source={{ html: this.getHtml() }}
          originWhitelist={['*']}
          onMessage={this.onStateChange}
          decelerationRate="normal"
        />
      </>
    )

how I can handle toggle of fullscreen mode to identify isInFullscreenMode true or false?

@droidMakk
Copy link

droidMakk commented Jan 19, 2019

window.postmessage from webview if its your custom made.
And in React native

@EugeneDraitsev
Copy link

@droidMakk my problem is exactly about worst scenario. I don't have access to webview-source page code and to video. Maybe is it possible somehow extend functionality of fullscreen-webview like

 <VideoWebView hideStatusbar>

@Dunky45
Copy link

Dunky45 commented Jan 23, 2019

I also dont have any clue on how to hide it. Any guess?

@aanah0
Copy link

aanah0 commented Mar 21, 2019

I also dont have any clue on how to hide it. Any guess?

  componentDidMount() {
    if(Platform.OS === 'android') {
      DeviceEventEmitter.addListener("VideoWillEnterFullScreen", this.hideStatusBar);
      DeviceEventEmitter.addListener("VideoNotFullScreenAnymore", this.showStatusBar);
    }
  }```

@est7
Copy link

est7 commented Jul 18, 2019

just add mActivity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);and mActivity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); in onShowCustomView/onHideCustomView methods

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

No branches or pull requests

6 participants