相关疑难解决方法(0)

问题:为什么 react native video 不能全屏播放视频?

我为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)

android reactjs react-native

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

android ×1

react-native ×1

reactjs ×1