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

193
Views
Reaccionar: cómo obtener una visualización/vista previa de video seleccionada desde la entrada

Estoy tratando de obtener una vista previa de video después de seleccionar un video del archivo de tipo de entrada. Pero no me da una vista previa del video, sin embargo, si funciona bien, si selecciono una imagen, pero no funciona bien para el video.

 import React, { useState } from 'react'; const [imgAvatar, setImgAvatar] = useState('') const handleFile = e => { const file = e.target.files[0] const fileReader = new FileReader() fileReader.onloadend = (e) => { setImgAvatar(e.target.result) } fileReader.readAsDataURL(file) } return( <video> <source src={imgAvatar} type="video/mp4"></source> </video> <img src={imgAvatar} alt='...'></img> )
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!