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?

posta un anno fa398 visualizzazioni
2 Risposte
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

con risposta 4 mesi fa
-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
ESPERTO
con risposta un anno fa
  • 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.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande