Frontend: removed the forced MIME type from the Video.js sources object so it can correctly handle non-mp4 “regular” streams.

File: video-remote/src/components/VideoModal.tsx
Backend: updated /videos/{file_id}/stream-transcoded so that when a Range request is present, it computes an approximate duration_sec from the requested byte length and bitrate, and passes that to ffmpeg (so the response length aligns with Content-Length).

File: media-api/main.py
This commit is contained in:
salirezav
2026-03-18 15:04:06 -04:00
parent 78bfcf0261
commit 8a54a88729
2 changed files with 12 additions and 6 deletions

View File

@@ -52,7 +52,10 @@ export const VideoModal: React.FC<Props> = ({ fileId, onClose }) => {
sources: [
{
src: src,
type: 'video/mp4'
// Do not hardcode the MIME type: the "regular" endpoint may serve
// non-mp4 containers (avi/mkv/etc), and forcing mp4 can trigger
// MEDIA_ERR_SRC_NOT_SUPPORTED in Video.js/browser.
// Let Video.js/browser sniff based on the actual response.
}
]
})