我为Android创建应用程序和IOS反应天然的(0.57.7),并使用反应本地视频播放上传到视频VIMEO。集成反应视频插件后,在两个设备上测试。在ios 中它运行良好,但在 android 中,我无法以全屏模式播放视频。这是我的Android代码:
import React, { PureComponent } from 'react';
import {
View,
Text,
Image,
ImageBackground,
StyleSheet,
SafeAreaView,
TouchableOpacity,
ActivityIndicator
} from 'react-native';
import PropTypes from 'prop-types'
import Video from "react-native-video";
import Orientation from 'react-native-orientation-locker';
import { widthPercentageToDP as wp, heightPercentageToDP as hp } from '../components/Resposive';
import RF from "react-native-responsive-fontsize"
export default class Videoplayer extends PureComponent {
constructor(props){
super(props);
this.state = {
loading: true,
videoFileArr:[],
showPlayer:false,
playing:false
}
}
componentDidMount() {
Orientation.lockToLandscape();
this.fetchVimeoVideo(); …Run Code Online (Sandbox Code Playgroud)