2024-11-11 13:23:58 +01:00
2025-06-30 19:32:12 +02:00
2025-06-30 19:32:12 +02:00
2025-06-30 19:32:12 +02:00
2025-06-30 19:32:12 +02:00
2025-06-30 19:32:12 +02:00
2025-06-30 19:32:12 +02:00
2025-06-30 19:32:12 +02:00
2025-06-30 19:32:12 +02:00
2025-06-30 19:32:12 +02:00
2025-06-30 19:32:12 +02:00
2025-06-30 19:32:12 +02:00
2024-11-11 13:23:58 +01:00
2025-06-30 19:32:12 +02:00
2025-06-30 19:32:12 +02:00
2025-06-30 19:32:12 +02:00
2025-06-30 19:32:12 +02:00
2025-06-30 19:32:12 +02:00
2024-11-11 13:23:58 +01:00
2024-10-29 16:03:53 +01:00
2025-06-30 19:32:12 +02:00
2025-06-30 19:32:12 +02:00
2025-06-30 19:32:12 +02:00
2025-06-30 19:32:12 +02:00
2025-06-30 19:32:12 +02:00

react-native-video

This is (PoC) v7 version of the react-native-video library. It's experimental and not recommended for production use.

It's working both on New and Old Architecture.

Requirements

Installation

You have to install react-native-nitro-modules (>=0.13.0) in your project.

yarn install react-native-nitro-modules

Then install the package

Important

This package is not published on npm yet. You have to install it from the local path.

yarn install react-native-video

Usage

import * as React from 'react';
import { VideoView, createPlayer } from "react-native-video";

const VideoPlayer = () => {

  // Remember to create a player instance outside of the render method to avoid creating a new instance on each render
  // You can also use useMemo to memoize the player instance
  const player = React.useMemo(() => createPlayer('https://www.w3schools.com/html/mov_bbb.mp4'), []);

  // Usage of player

  // Methods
  player.play();
  player.pause();

  // Properties
  player.currentTime = 10;
  player.volume = 0.5;

  // Usage of VideoView
  return (
    <VideoView
      player={player}
      style={{ width: 300, height: 300 }}
    />
  );
};

Known issues

  • Android: After passing player to second VideoView, the first VideoView will permanently lose player - #1
  • Android: VideoView does not show video on New Architecture - #2

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

Custom

This project is provided solely for demonstration and contribution purposes. Forking is permitted exclusively for submitting changes to the main repository. The code and its modifications may only be used within this repository or an authorized fork. Commercial use of the code is prohibited unless you have permission from TheWidlarzGroup


Made with create-react-native-library

Description
A component for react-native
Readme MIT 38 MiB
Languages
Java 40.2%
Swift 35.4%
TypeScript 11.8%
C++ 4.8%
Objective-C 3.5%
Other 4.3%