Video Component

Usage#

To use the video componentyou have to import it and use it.

Code#

import React from "react";
import { ReactVideo } from "reactjs-media";
const App = () => {
return (
<div>
<ReactVideo src="/video.mp4" poster="poster.jpg" type="video/mp4" />
</div>
);
};
export default App;

Output#

00:00
--:--
Download
Picture In Picture
1
Error: Failed to load Video
video poster

Incase of an error the component will tell the user.

component with an error#

00:00
--:--
Download
Picture In Picture
1
Error: Failed to load Video
video poster

To find more about props check the Video Props section.

tip

The new video component has been given a custom context menu to prevent users from altering teh UI