Skip to content

Add Content-Type for MP4 files #234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

JosePineiro
Copy link

This patch ensures that HTTP responses serving .mp4 files include the correct Content-Type: video/mp4 header. This improves media compatibility across browsers and clients, and adheres to standard MIME type conventions for MP4 files. No changes were made outside of content-type handling for MP4.
If the correct content type is not sent, many browsers will ignore the Content-Disposition: inline header and download the file instead of playing it in-browser. In such cases, the browser assumes it cannot render the content inline and defaults to download behavior. This fix ensures MP4 files are properly recognized and played directly in the browser when expected.

This patch ensures that HTTP responses serving .mp4 files include the correct Content-Type: video/mp4 header. This improves media compatibility across browsers and clients, and adheres to standard MIME type conventions for MP4 files. No changes were made outside of content-type handling for MP4.
If the correct content type is not sent, many browsers will ignore the Content-Disposition: inline header and download the file instead of playing it in-browser. In such cases, the browser assumes it cannot render the content inline and defaults to download behavior. This fix ensures MP4 files are properly recognized and played directly in the browser when expected.
@mathieucarbou mathieucarbou merged commit 80af245 into ESP32Async:main Jul 18, 2025
33 checks passed
@JosePineiro JosePineiro deleted the fix/mp4-content-type-header branch July 18, 2025 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants