Estoy trabajando en un producto que toma un archivo de la API y lo lee como un blob. Pero presionar el botón de reproducción en el video no funciona. Intenté usar intenté usar querySelector o una variable useState. Todo no funciona. No hay errores como puede ver en los registros.
Puede leer un archivo local pero no desde la API.
const [outputImg, setOutputImg] = useState(null); useEffect(() => { getOutput() }, []) async function getOutput() { await axios.get("/output-image", {responseType: "blob"}) .then((response) => { var imageUrl = (window.URL || window.webkitURL).createObjectURL(response.data); setOutputImg(imageUrl); var vid = document.querySelector(".img1") console.log(response) }) console.log("Output image", outputImg) }sección HTML
<VideoPlayer className="img1" src={outputImg} poster={posterImg} controls width="100%" height="100%" />