ok I need to display a video in my react component but my webpackEncore returns me the error that it can't find my VideoMp4 file I use react with symfony.
error : Module parse failed: Unexpected character '' (1:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders (Source code omitted for this binary file)
my code :
import React, { Component, useState } from 'react';
import {render} from 'react-dom';
import { useEffect } from 'react/cjs/react.development';
import video from '../video/videoHome.mp4'
function FondEcran() {
return (
<div className="background">
<video muted autoPlay loop>
<source src={video} type="video/mp4" />
</video>
</div>
);
}
class fondEcran extends HTMLElement {
connectedCallback(){
render(<FondEcran/>,this)
}
}
customElements.define('fond-ecran' , fondEcran)