Amplify FrontEnd Not Building All Assets

0

I have a simple front end using the html5 video tag. When deployed to my custom domain the video no longer shows. I've looked at the build locally and its working. I also looked at the build on AWS Amplify console and not getting errors. The import is as follow : import videoBg from '../videos/videobg.mp4'; So this is bundling and being hashed but its not showing on my website. Please advice asap...

gefragt vor 3 Monaten85 Aufrufe
2 Antworten
2
Akzeptierte Antwort

Within the Amplify console under "Rewrites and Redirects" you want to ensure that you are using the rigght file extensions and your particular one is on the list:

</^[^.]+$|.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|woff2|ttf|map|json|mp4|mov)$)([^.]+$)/>

Mine in particular was mp4 it was not in the list along with woff2...

beantwortet vor 3 Monaten
profile picture
EXPERTE
überprüft vor 2 Monaten
0

It sounds like your video isn't showing on your custom domain despite working locally and no errors in AWS Amplify. Here are some streamlined tips to troubleshoot:

  • Check Video Path: Ensure the video's path is correct after deployment. Use browser developer tools to see if there's a 404 error for the video file.
  • CORS Policy: If your video is hosted on a different domain, ensure CORS settings allow your website to access the video.
  • Content-Type Header: Verify the server is using the correct Content-Type header (video/mp4) for the video file.
  • Video Encoding: Make sure your video encoding is compatible with all browsers. H.264 is a widely supported format.
  • HTTPS Protocol: If your site is HTTPS, ensure the video is also served over HTTPS to prevent mixed content issues.

Next Steps:

  • Use browser developer tools to inspect network requests and console for errors.
  • Double-check the deployment process doesn't change the video's accessibility.

Give these steps a try, and if you uncover any new insights, please share them! It'll help us keep digging and get that video playing.

profile picture
EXPERTE
beantwortet vor 3 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen