Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

224
Views
import video file with reactJs in symfony

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)
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!