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:
@@ -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.
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user