Tengo un producto en funcionamiento 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.
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
<video src={outputImg} className="img1 video-js vjs-default-skin" style={{position: "absolute"}}autoPlay controls preload="auto" width="100%" height="100%" data-setup='{"textTrackSettings": false}'/>