Giter VIP home page Giter VIP logo

Comments (9)

A-ANing avatar A-ANing commented on June 16, 2024

你可以在页面挂载生命周期内 手动改变StatusBar

from react-native-rn-videoplayer.

hectorqin avatar hectorqin commented on June 16, 2024

调用了没用==

from react-native-rn-videoplayer.

A-ANing avatar A-ANing commented on June 16, 2024

看看你代码

from react-native-rn-videoplayer.

hectorqin avatar hectorqin commented on June 16, 2024

` useEffect(() => {
console.log('showVideo ', showVideo);
if (!showVideo) {
if (Platform.OS === 'android') {
StatusBar.setBackgroundColor('#000');
StatusBar.setTranslucent(false);
StatusBar.setHidden(false);
}
StatusBar.setBarStyle('default');
}
}, [showVideo]);

if (!showVideo) {
return Platform.OS === 'android'
? // <Header width={Dimensions.get('screen').width} />
null
: null;
}
return (
<VideoPlayer
style={{flex: 1}}
url={convertSource(pageInfo.url).uri}
headers={convertSource(pageInfo.url).headers}
ref={(ref) => {
player = ref;
}}
statusBar={() => null}
title={pageInfo.title}
panSamplingTimes={5}
smallCloseIcon={true}
autoHide={false}
lockControl={true} />)
`

from react-native-rn-videoplayer.

hectorqin avatar hectorqin commented on June 16, 2024

全屏之后退出全屏,状态栏就会变白,调用接口设置无效

from react-native-rn-videoplayer.

A-ANing avatar A-ANing commented on June 16, 2024

视频页你设置成沉浸式试下
StatusBar.setBackgroundColor('rgba(0,0,0,0)');
StatusBar.setTranslucent(true);

from react-native-rn-videoplayer.

hectorqin avatar hectorqin commented on June 16, 2024

<StatusBar translucent={true} barStyle={'light-content'} /> <VideoPlayer style={{ flex: 1, paddingTop: Platform.OS === 'android' ? StatusBar.currentHeight : 0, }} url={convertSource(pageInfo.url).uri} headers={convertSource(pageInfo.url).headers} ref={(ref) => { player = ref; }} statusBar={() => null}

还是没用

from react-native-rn-videoplayer.

A-ANing avatar A-ANing commented on June 16, 2024

<StatusBar translucent={true} barStyle={'light-content'} backgroundColor={"rgba(0,0,0,0)"}/>

我不知道你状态栏具体什么样 加上backgroundColor试试

from react-native-rn-videoplayer.

hectorqin avatar hectorqin commented on June 16, 2024

算了,搞不定 ==

from react-native-rn-videoplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.