score:0

i've decided to go with uploading the video to cloudinary, a remote source instead. thanks for everyone's help.

score:0

this way works for local photos and videos:

import concert from '../../assets/videos/concert.mp4'

render(){
return (
 <video controls>
      <source src={concert} type="video/mp4"/>
      your browser doesn't support html video.
 </video>
); }

score:1

this is a fix for me. https://github.com/facebook/create-react-app/issues/6822#issuecomment-483079845

you can use src/react-app-env.d.ts to test it out:

declare module '*.mp4' {
  const src: string;
  export default src;
}

score:2

this works for local file:

import videos from '../../app/assets/videos/concert.mp4'

render(){
return (
 <video loop autoplay>
      <source src={videos} type="video/mp4"/>
 </video>
); }

Related Query

More Query from same tag