You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
App Id
d3uuugdyhexx3o
Region
eu-west-1 (Ireland)
Amplify Hosting feature
Not applicable
Describe the bug
I have a HTML 5 video tag on a simple, brand-new Vue JS application which references a webm video file. When running locally, the video displays as expected with no issue.
Here's how I'm rendering the video:
<video v-if="renderVideo" playsinline autoplay muted loop>
<source src="../assets/media/video_crf40_311x600.webm" width="311" height="600" type="video/webm" />
Your browser does not support the video tag.
</video>
I am hosting this single page application on AWS Amplify.
When deployed, the video does not display. There are no console errors and nothing to indicate why the video is not showing. When inspecting the DOM, I can see the video element is definitely there.
After checking the Network tab in Chrome dev tools, I can see the request is being made for the video file but for some reason it's returning only 812B (the video is >1MB) and the status code is 206 (Partial Content). What's even more weird is that the content type is text/html and the response content contains the content of my project's index.html file!
Headers:
Response Content:
Expected behavior
The video file should be served correctly with the expected content-type of video/webm.
Reproduction steps
For the purposes of aiding diagnosis, I have created a separate Vue JS application where I have downloaded a sample webm file and changed nothing in the boilerplate application except adding this webm file to a video element. You can view the code in this repo: https://github.com/andyfurniss4/vue-webm-amplify-test. As a side note, this proves that it is not an issue with my particular webm file but rather all webm files (as the sample one also does not work).
These are the steps I took for this new repo/application:
Add webm file to src/assets directory in Vue JS application.
Replace src/views/HomeView.vue contents with the following:
<script setup>
//import TheWelcome from '@/components/TheWelcome.vue'
</script>
<template>
<main>
<h2>Local asset (../assets/big-buck-bunny_trailer.webm)</h2>
<video playsinline autoplay muted loop style="border:1px solid black;">
<source src="../assets/big-buck-bunny_trailer.webm" width="311" height="600" type="video/webm" />
Your browser does not support the video tag.
</video>
<h2>Web reference (https://dl8.webmfiles.org/big-buck-bunny_trailer.webm)</h2>
<video playsinline autoplay muted loop style="border:1px solid black;">
<source src="https://dl8.webmfiles.org/big-buck-bunny_trailer.webm" width="400" type="video/webm" />
Your browser does not support the video tag.
</video>
</main>
</template>
This should render two videos. One is a reference to our local webm video and one is a reference to the version hosted at webmfiles.org.
Hook up Amplify to the GitHub project and deploy.
Observe that only one video shows; the one hosted on webmfiles.org and not our version hosted in Amplify.
Hi @andyfurniss4 apologies for the delay. With SPA apps we autogenerate a rewrite rule that ensures users can navigate throughout the app without triggering a server request on each page navigation. Please see Redirects for single page applications (SPA).
The regular expression that excludes different file formats from this behavior doesn't include webm which is why you're running into this issue.
The workaround is to add webm to that redirect expression like so:
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Before opening, please confirm:
App Id
d3uuugdyhexx3o
Region
eu-west-1 (Ireland)
Amplify Hosting feature
Not applicable
Describe the bug
I have a HTML 5 video tag on a simple, brand-new Vue JS application which references a webm video file. When running locally, the video displays as expected with no issue.
Here's how I'm rendering the video:
I am hosting this single page application on AWS Amplify.
When deployed, the video does not display. There are no console errors and nothing to indicate why the video is not showing. When inspecting the DOM, I can see the video element is definitely there.
After checking the Network tab in Chrome dev tools, I can see the request is being made for the video file but for some reason it's returning only 812B (the video is >1MB) and the status code is 206 (Partial Content). What's even more weird is that the content type is
text/html
and the response content contains the content of my project'sindex.html
file!Headers:
Response Content:
Expected behavior
The video file should be served correctly with the expected content-type of video/webm.
Reproduction steps
For the purposes of aiding diagnosis, I have created a separate Vue JS application where I have downloaded a sample webm file and changed nothing in the boilerplate application except adding this webm file to a video element. You can view the code in this repo: https://github.com/andyfurniss4/vue-webm-amplify-test. As a side note, this proves that it is not an issue with my particular webm file but rather all webm files (as the sample one also does not work).
These are the steps I took for this new repo/application:
This should render two videos. One is a reference to our local webm video and one is a reference to the version hosted at webmfiles.org.
Observe that only one video shows; the one hosted on webmfiles.org and not our version hosted in Amplify.
https://main.d3uuugdyhexx3o.amplifyapp.com/
Build Settings
Additional information
No response
The text was updated successfully, but these errors were encountered: