请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

react-native-video-custom-controls ios闪崩无报错,安卓没问题

import React from 'react';
import {StyleSheet, Text, View} from 'react-native';
import {IFound} from './index';
import VideoControls from 'react-native-video-custom-controls';
interface IProps {
  data: IFound;
}

class Item extends React.Component<IProps> {
  render() {
    const {data} = this.props;
    return (
      <View>
        <Text>{data.title}</Text>
        <VideoControls
          source={{uri: data.videoUrl}}
          paused={true}
          style={styles.video}
        />
      </View>
    );
  }
}
const styles = StyleSheet.create({
  video: {
    height: 220,
  },
});
export default Item;

版本如下;

{
  "name": "buluteacherapp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint . --ext .js,.jsx,.ts,.tsx"
  },
  "dependencies": {
    "@react-native-community/async-storage": "^1.12.1",
    "@react-native-community/blur": "^3.6.0",
    "@react-native-community/masked-view": "^0.1.10",
    "@react-native-community/slider": "^3.0.3",
    "@react-navigation/bottom-tabs": "^5.11.8",
    "@react-navigation/material-top-tabs": "^5.3.14",
    "@react-navigation/native": "^5.9.3",
    "@react-navigation/stack": "^5.14.3",
    "@types/lodash": "^4.14.168",
    "@types/react-native-snap-carousel": "^3.8.2",
    "@types/react-native-video": "^5.0.4",
    "axios": "^0.21.1",
    "babel-plugin-module-resolver": "^4.1.0",
    "dva-core-ts": "^2.0.7",
    "dva-loading-ts": "^3.0.23",
    "dva-model-extend": "^0.1.2",
    "lodash": "^4.17.21",
    "react": "16.13.1",
    "react-native": "0.63.4",
    "react-native-circular-progress": "^1.3.7",
    "react-native-config": "^1.4.2",
    "react-native-drag-sort": "^2.4.2",
    "react-native-gesture-handler": "^1.10.3",
    "react-native-linear-animated-gradient-transition": "^0.1.6",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-pager-view": "^5.0.12",
    "react-native-reanimated": "^2.0.0",
    "react-native-safe-area-context": "^3.2.0",
    "react-native-screens": "^2.18.1",
    "react-native-slider-x": "^0.11.3",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-sound": "^0.11.0",
    "react-native-storage": "^1.0.1",
    "react-native-svg": "^12.1.0",
    "react-native-tab-view": "^3.0.0",
    "react-native-video": "^5.1.1",
    "react-native-video-custom-controls": "^0.1.0",
    "react-navigation-header-buttons": "^7.0.0",
    "react-redux": "^7.2.2",
    "realm": "^10.2.0"
  },
  "devDependencies": {
    "@babel/core": "^7.8.4",
    "@babel/runtime": "^7.8.4",
    "@react-native-community/eslint-config": "^1.1.0",
    "@types/jest": "^25.2.3",
    "@types/react-native": "^0.63.2",
    "@types/react-redux": "^7.1.16",
    "@types/react-test-renderer": "^16.9.2",
    "babel-jest": "^25.1.0",
    "eslint": "^6.5.1",
    "jest": "^25.1.0",
    "metro-react-native-babel-preset": "^0.59.0",
    "react-native-iconfont-cli": "^2.2.1",
    "react-test-renderer": "16.13.1",
    "typescript": "^3.8.3"
  },
  "resolutions": {
    "@types/react": "^16"
  },
  "jest": {
    "preset": "react-native",
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "jsx",
      "json",
      "node"
    ]
  }
}

正在回答 回答被采纳积分+3

1回答

提问者 小资要奋斗 2021-03-21 17:38:23

已解决 谢谢

0 回复 有任何疑惑可以回复我~
  • 请问是什么解决的,我也遇到这个问题了
    回复 有任何疑惑可以回复我~ 2024-06-13 14:28:35
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号