简体   繁体   English

动画警告:`useNativeDriver` 未在 React-Native 62.2 中指定用于 react-native-video-controls

[英]Warning Animated: `useNativeDriver` was not specified in React-Native 62.2 for react-native-video-controls

I am using react-native to develop Video sharing Android APP,I am using react-native-video-controls in my app after upgrading React_native from 60.0 to 62.2.我正在使用 react-native 开发视频共享 Android APP,我在将 React_native 从 60.0 升级到 62.2 后在我的应用程序中使用 react-native-video-controls。

I am getting error Warning Animated: useNativeDriver was not specified.我收到错误警告动画:未指定 useNativeDriver。 in React-Native 62.2 for react-native-video-controls在 React-Native 62.2 中用于 react-native-video-controls

My Code:我的代码:

import Video from 'react-native-video';

import VideoPlayer from 'react-native-video-controls';


 <View style={{ width: "100%", height: '100%', backgroundColor: '#065535' }} >
                  <VideoPlayer
                      navigator={this.props.navigator}

                      source={{ uri: "https://howtags.com/" + items.file_Name }}
                      style={{ width: '100%', height: '100%', top: 0, left: 0, bottom: 0, right: 0, position: "absolute" }}

                      ref={(ref) => { this.player = ref }}
                      resizeMode="cover"

                      posterResizeMode="cover"

                      fullscreen={true}
                      onEnd={this.onEnd}

                      onLoadStart={this.onLoadStart}
                      onProgress={this.onProgress}
                      paused={this.state.paused}

                      onFullScreen={this.state.isFullScreen}
                      volume={10}
                    />

    </View>

I am getting this error only after upgrading to "react-native": "^0.62.2",仅在升级到“react-native”后出现此错误:“^0.62.2”,

I am posting this question second time because last time i didn't get any answer for my question我第二次发布这个问题,因为上次我的问题没有得到任何答案

If anyone know the solution please help me如果有人知道解决方案,请帮助我

Since version 0.62, not setting useNativeDriver prop for Animated component will show you this warning.从 0.62 版开始,不为Animated组件设置useNativeDriver将向您显示此警告。 Since one of the libraries you're using seems to use Animated without explicitly setting this prop to true or false so you get this warning.由于您正在使用的库之一似乎使用 Animated 没有明确将此道具设置为 true 或 false,因此您会收到此警告。

I don't think you have much to do with this problem, just wait for an update to this library where contributors correct this issue.我认为您与此问题没有太大关系,只需等待此库的更新,贡献者会在其中纠正此问题。

Duplicate: react-native-video-controls Warning Animated: `useNativeDriver` was not specified.重复: react-native-video-controls 警告动画:未指定“useNativeDriver”。 in React-Native 62.2 在 React-Native 62.2

I revived this library here: https://github.com/criszz77/react-native-media-console我在这里恢复了这个库: https://github.com/criszz77/react-native-media-console

Fixed all the issues I could find + added TypeScript support.修复了我能找到的所有问题 + 添加了 TypeScript 支持。 Should be easy to migrate.应该很容易迁移。

Hope this helps anyone...希望这可以帮助任何人......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 React Native Animated with useNativeDriver - _reactNative.Animated.event(...) 不是函数 - React Native Animated with useNativeDriver - _reactNative.Animated.event(...) is not a function react-native-video: react-native-video-controls onBack 事件执行并导航到初始屏幕,但在初始屏幕 function 不工作, - react-native-video: react-native-video-controls onBack event executed and navigated to initial screen, but in initial screen function not working, 动画本机子菜单 - Animated submenu on react-native 使用`useNativeDriver`在React-native中将圆形动画化为带有圆边的方形 - Animating circle to square with rounded edges in React-native using `useNativeDriver` 如何解决“动画:不支持`useNativeDriver`,因为缺少本机动画模块。” 在反应导航? - How to resolve "Animated: `useNativeDriver` is not supported because the native animated module is missing." in react-navigation? react-native上传视频 - Upload video in react-native React-native和React - React-native and React React-Native 需要中断生产警告 - React-Native Requiring BREAK IN PRODUCTION Warning 为什么我的 Animated.Image 不旋转(React-Native) - Why is my Animated.Image not rotating (React-Native) React-Native:警告:未安装组件的 React 状态更新 - React-Native: Warning: React state update on an unmounted component
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM