Open imcrisanto opened 3 years ago
I wrote a reply earlier and lost it, but was going to say this is a good idea. Maybe it would be best as a wiki page and then the README could link to that.
Or perhaps it would also work to link to an official page from Apple and Android listing the supported codecs. Here is the Android list:
https://exoplayer.dev/supported-formats.html
I wasn't able to find the Apple one just now but I'm sure I have come across it before.
I was able to find the Apple one here but it's pretty old (but I think still accurate)
I agree with you that it would be good to optionally list relevant links such as the compatibility chart listed on the HTML5 audio Wikipedia page
https://en.wikipedia.org/wiki/HTML5_audio
I still think we should place the table with the most common audio formats as a quick guide. Perhaps we could add a disclaimer as well that there are no guarantees and if they encounter a problem they can submit a pull request to the table.
I have opened the Wiki to edits so please feel welcome to create a page for codec support. For the README, my preference is to have a simple link to that wikipedia page as that way we won't need to keep releasing new versions of just_audio just to make updates to the list.
I just realised the wiki wasn't actually open, but hopefully that is fixed now. I have created a wiki page for supported audio formats:
https://github.com/ryanheise/just_audio/wiki/Supported-audio-formats
Can you try copying and pasting your table into that wiki page and see if access permits it?
.m4a doesn't seem to work for me. mp3 is ok. I thought these were more or less the same?
From URL:
.aac works fine on both Android & iOS
Edit:
Seeking / Progress bar doesn't work on Android for .aac files
.m4a works fine on Android w/ seeking / progress bar but doesn't work on iOS
.webm works fine on Android w/ seeking / progress bar but doesn't work on iOS
.ogg works fine on Android w/ seeking / progress bar but doesn't work on iOS
.mp3 is ok, .m4a doesn't work on IOS I haven't tested Android,
When testing different formats, it's also important to eliminate any other reasons why audio might not be playing on iOS. For example, if playing from a URL, the HTTP headers must meet Apple's requirements: it must have the correct content-type, content-length and support byte range requests.
From memory, m4a
works on iOS for me. Do you have a URL of an .m4a
that doesn't work as a counter-example?
I was able to play mp4a format on the web. I used this link as a reference: (https://github.com/ryanheise/just_audio/issues/187#issuecomment-787423071)
I am guessing that "mp4a" is the same as m4a?
I don't think ogg is supported for macos
FYI there is also a question on StackOverflow that gives an answer by referencing other sources for iOS and Android.
To which pages does your suggestion apply?
Describe your suggestion This section will help new or novice users understand what files they can support in their app across different platforms. This section would be community supported through testing and updated to reflect any known issues that arise. This list would be sorted by popularity and updated and tested regularly. Here is a sample of how the section would look like.
Supported Audio File Formats (Community Tested)
This list is subject to constant change please consider reporting any bugs you encounter here
Contributions
I have not created a pull request yet as testing all of these formats will take a considerable amount of time and I would like to solicit the help of the community to help test and verify these formats before I propose any changes. Please comment on what formats you have tested for the latest package release of just_audio.
FORMAT: File Format
.xxx
tested on Android, iOS, macOS, Web all tests [succeeded/failed]I have currently verified that
mp3
andwav
works across all platforms and also noted in Issue #369 thatogg
files are not supported natively on iOS.I will close this issue after a pull request has been made or if there is no interest from the community.