I am having a problem with firebase storage bandwidth.
I made a aplication that show some images and videos on loop.
The files have 20mb.
Image files from storage
I saved the files on firebase storage, but only url of the image is saved on firestore :
Url Images
useEffect(() => {
async function setNotice(){
try{
const notices = await fetch(`${process.env.REACT_APP_API_URL}/notices`)
const noticesJson = await notices.json()
if(noticesJson.length > 0){
for(let i =0; i< noticesJson.length;i++){
setSrcVideo('')
setSrcImage('')
setSrcHtml('')
setTitulo(noticesJson[i].title)
setTexto(noticesJson[i].text)
if(noticesJson[i].typeAviso === 'imagem'){
setSrcImage(noticesJson[i].urlImagem)
}else if(noticesJson[i].typeAviso === 'video'){
setSrcVideo(noticesJson[i].urlVideo)
}else if(noticessJson[i].typeAviso === 'html'){
setSrcHtml(noticesJson[i].urlHtml)
}
await delay(Number(noticesJson[i].tempoAviso))
}
}else{
await delay(30000)
setNotice()
}
await setNotice()
}catch(err){
console.log(` ${err}`)
setNotice()
}
}
setNotice()
},[])
My problem is that the use of bandwidth is very high and i don’t know if it is normal.
bandwidth
Is the cause of high usage of bandwidth when the page accesses the image or video url ?
what are causes for the high bandwidth usage ?
Jean Ferri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.