본문으로 건너뛰기
  1. Blog
  2. Files

FilesFilesMeasuredBugs

Adding more supported formats is what broke it on iPhone

Widening the list of accepted file types made the tools unusable on iOS. The stricter version had been the more helpful one. What went wrong, and how it was fixed.

Written by the site’s operator3 min read
A laptop
What a browser supports is best learned by asking the browser, not a person.Photo: NordWood Themes / Unsplash License / Unsplash

Accepting more file formats seemed like an obvious improvement. It broke the site on iPhone. Entirely self-inflicted.

The tools here used to be fairly strict about which files they would take. That looked like unnecessary friction, so the lists were widened on the principle of "be generous and let the decoder decide": ogg, opus, wma, amr, and for video mkv, avi, wmv, flv, were added to every picker.

A failure report came in from a real iPhone almost immediately. Safari on iOS can decode none of those.

Widening the gate threw away the signpost

The shape of the breakage is the interesting part. Before, choosing an unsupported file produced a clear "this format is not supported". Afterwards, with the gate gone, the file travelled all the way to the decoder, which returned its own terse "decoding failed" and nothing else.

From the visitor’s side the second is plainly worse: no indication of what was wrong or what would work instead. The restrictive version had been the more helpful one, precisely because it was restrictive.

Ask the browser instead

The picker is now built by asking the browser itself what it can play. That capability report is answered at runtime and is correct on every platform, including ones that have not shipped yet.

Hand-written list37 typesAfter asking the browser25 typesDropped in this build: .wma / .amr / .avi / .wmv / .flvAn iPhone is offered the 23 formats it can actually open, and never sees the 14 it cannot.
How many extensions the picker offers. Instead of a fixed list, the browser’s own answers narrow it.

Measured, this build went from 37 extensions to 25, dropping .wma, .amr, .avi, .wmv and .flv. Offering a choice that cannot work is worse than not offering it, so this is a straightforward improvement.

The answer is not perfect either

There is a second trap underneath. "Can you play this?" and "can you decode this?" are different questions, and they do not always agree. Measured here: aiff and quicktime both report that they cannot be played, and both decode perfectly well.

So the capability report is used only to shape the picker and the error text — never to refuse a file. Anything it drops still reaches the decoder if you pick it anyway, and the decoder remains the final authority.

What this means if you are on iOS

When an audio or video file will not open on an iPhone or iPad, the usual reason is simply that iOS cannot handle that format. It is not a broken device or a broken app. Treat ogg, opus, wma, amr, avi, wmv and flv as unlikely to work.

If a computer is available, converting to MP3 or MP4 first with file conversion is the reliable route — H.264 MP4, MP3 and M4A open almost anywhere on iOS. The conversion also happens inside the browser, so nothing has to be handed to a server on the way.

Tools for this article

Share this article
Share on X

Read next

Files

The browser said it could do it, and produced a broken file

The API that reports supported recording formats returned true, and the result was a corrupt 1,690-byte MP4. The four measurements, and why the fix was to stop asking and start measuring.

#Video#Measured
Files

I asked for 1 Mbps and got a file 2.8 times that size

Setting a bitrate when compressing video does not give you a file of that size. Measured here: 2.8 times what was requested. Why that happens, and what to change instead.

#Video#Files
Files

ローカル画像生成AIのはじめ方。手元のゲーミングPCで、実写もイラストも作れる

自分のPCで画像生成AIを動かす「ローカル画像AI」の入門。回数制限や月額を気にしなくていい理由、必要なPCの目安(VRAM)、実写・アニメ・高速生成の代表的なモデル、ComfyUIなどのソフト、導入の流れ、設定値、LoRAやControlNetなどの発展機能まで。

#画像#AI
Files

24-bit or 32-bit float, 44.1 kHz or 48 kHz? Choosing audio settings

24-bit, 32-bit float, 44.1 kHz, 48 kHz. Does a bigger number mean better sound? What sample rate and bit depth each do, and which to pick for music, video and handing work over.

#Files#Settings
Files

WAV, FLAC, MP3 or AAC? Which format to keep and which to send

Audio formats affect file size and editability as well as quality. The difference between lossless and lossy compression, and which of WAV, FLAC, MP3 and AAC to use for working files, archiving and sharing.

#Files#Conversion
Files

“Can you make this image smaller?” — smaller how?

Dimensions, file size and quality are three different things. Which one you move changes the work entirely. Here is how to pick, and how to do each.

#Images#Files

All articles