video.jsファイルにナビゲートするいくつかのアプリケーションを操作して、ビデオが自動的に横長の向きでフルスクリーンで再生されるようにしたい。私が反応し、ネイティブビデオ リンクを使用していビデオを横長フルスクリーンの方向にロックする(反応 - ネイティブビデオ)
:https://github.com/react-native-community/react-native-video
render() {
return (
<View style={styles.container}>
<View style={styles.fullScreen}>
<Video
ref={(ref) => {
this.player = ref
}}
source={require('../vid/intro-video.mp4')}
style={styles.nativeVideoControls}
rate={this.state.rate}
paused={this.state.paused}
volume={this.state.volume}
muted={this.state.muted}
resizeMode={this.state.resizeMode}
onLoad={this.onLoad}
onLoadStart={this.loadStart}
onBuffer={this.onBuffer}
onProgress={this.onProgress}
onEnd={debounce(this.onEnd, 100)}
repeat={false}
controls={this.state.controls}
/>
</View>
</View>
);
}
私が回転したときに、私はloadStart関数の中、このベロコードを追加しようとするが、それは働いていない...とフルスクリーンモードではない場合、ビデオは私の画面の一番下に表示されます。
this.player.presentFullscreenPlayer()
私が試した解決策: 1)タグが、何が起こったのビューにonLayout使用。 2)this.player.presentFullscreenPlayer()を使用しても問題は解決されませんでした。