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?

質問済み 1年前398ビュー
2回答
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

回答済み 4ヶ月前
-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
エキスパート
回答済み 1年前
  • 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.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ