SupabaseS
Supabase12mo ago
MO

Issue with Playing .mp4 Videos in Flutter App IOS

Hello Support Team,

I am currently developing a Flutter application where I am using your service to host video files. While everything works perfectly with .MOV files, I am facing an issue with .MP4 files.

When I upload and attempt to play an .MP4 video, the app fails to load it and throws the following error:

[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: PlatformException(VideoError, Failed to load video: Operation Stopped: The server is not correctly configured.: The operation couldn’t be completed. (CoreMediaErrorDomain error -12939 - byte range and no content length - error code is 200), null, null)


Details:

  1. The .MP4 video URL works perfectly when tested in a browser.
  2. .MOV videos play without any issues in the app.
  3. I am using the following Flutter packages for video playback:
    • <Specify the packages like video_player, pod_player, or chewie>
  4. The issue occurs only on iOS devices, while Android works fine.
  5. My videos are hosted at: <Your domain, e.g., *.*.com>
It seems the issue might be related to how .MP4 videos are being served or handled by iOS.

Questions/Help Needed:

  • Could this issue be related to the video format, server configuration, or how the .MP4 file is being streamed?
  • Do I need to add specific headers or modify the server configuration for .MP4 files to work on iOS?
  • Is there any recommended setup for serving .MP4 files optimized for iOS playback?
I would appreciate your guidance or any steps to resolve this issue.

Thank you for your support!

Best regards,
Mouad Zizi
Was this page helpful?