mp4 Video file doesn't load on AWS Amplify

0

This is last ditch effort to resolve this issue before I make my move to another provider.

I have a video tag in my React app that is not loading on AWS Amplify:

    <video className='video-bg' autoPlay loop muted>
      <source src="/videos/my-video.mp4" type="video/mp4"/>
    </video>

I have tried adding Redirects

</^[^.]+$|.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|ttf|map|json|mp4)$)([^.]+$)/> https://www.mydomain.ai 200 Rewrite

But I get a 206 and the video doesn't load. I can see that the video is there though if I access it separately at its path through the browser.

I also tried deleting all redirect/rewrite rules - no luck.

  • I am having this same issue. ive added the redirect and its still not working. were you able to solve this issue?

preguntada hace un año398 visualizaciones
2 Respuestas
0

</^[^.]+$|.(?!(css|gif|ico|jpg|mp4|js|png|txt|svg|woff|ttf|map|json)$)([^.]+$)/> worked for me with index.html and 200 rewrite

had the same error as you

respondido hace 4 meses
-1

Hi - This seems to be more of video tag not able to access the /videos/my-video.mp4. Have you tried directly the resolved link on this. Have you tried ./videos/my-video.mp4 or ../videos/my-video.mp4 or if check the name for spaces etc.

Perhaps this link may help to do some troubleshooting.

profile pictureAWS
EXPERTO
respondido hace un año
  • Hi AWS-User-Nitin, thank you but this is not the issue I am facing. If I go to mysite.ai/videos/my-video.mp4, I CAN see the video player load but the video isn't loaded in it. This works on other hostings and my local machine too. AWS Amplify is blocking the video as the mp4 network call only returns a few bytes and a 206 code.

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas