iosflutterjust-audio

Flutter just_audio oga cause 1002 Unsupported URL


Problem:

I forced to download voice messages in .oga format.

As handler I use fork of voice_message_package (which depends on just_audio).

Android works fine. IOS - error 1002 Unsupported URL.

Question: Is there any optimal solution without file conversion?


Solution

  • just_audio use iOS libs under the hood, which does not support codec Opus (.oga).

    So you need to extend supported codecs list.

    Solution:

    Add to info.plist

    pod 'YbridOpus'
    

    Result looks like this:

    target 'Runner' do
      use_frameworks!
      use_modular_headers!
      pod 'YbridOpus'
    
      flutter_install_all_ios_pods