admin管理员组

文章数量:1208155

I am trying to display a local video in my React Native Expo app with controls for volume and video time. To do this, I have attempted to install the expo-av package. I have written import { Video } from "expo-av" at the top of my React Native file. This results in the error: Cannot find native module 'ExponentAV', js engine: hermes [Component Stack]. This error occurs without me having written any code to use the expo-video package.

Since this package was not working, I attempted to install the react-native-video package. However, this results in a similar error.

I am trying to display a local video in my React Native Expo app with controls for volume and video time. To do this, I have attempted to install the expo-av package. I have written import { Video } from "expo-av" at the top of my React Native file. This results in the error: Cannot find native module 'ExponentAV', js engine: hermes [Component Stack]. This error occurs without me having written any code to use the expo-video package.

Since this package was not working, I attempted to install the react-native-video package. However, this results in a similar error.

Share Improve this question asked Jan 20 at 15:28 user27793975user27793975 197 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Use the react-native-video package:

import Video from "react-native-video";

<Video source = {{ "uri": exercise.video }} style = {{ "width": "100%", "height": 300 }} resizeMode = "contain" controls = {true} />

Set the Video Source to the location of the video

本文标签: React NativeDisplay Local VideoStack Overflow