Today I worked on better media support. This involved a couple of changes.
- Reposting audio and video posts that show the player for the reposted media
- Support for audio + photo posts (shows as an audio player with poster image)
- Support for video + audio + photo posts (shows as the video player with a hidden audio link for mf2 consumers)
- Fallback for browsers that don't support <video> or <audio> that includes a link to download the files
Here's an example of a reposted podcast episode. It includes the episode name and an <audio> tag which plays the episode inline.
I can now also create audio posts that include an mp3 file. If the post also includes a photo, then the way it's rendered is in a <video> tag using the photo as the poster image. (ht tantek) This ends up looking essentially like a video player with a freeze frame in both Chrome and Firefox. On mobile, it looks like a video but the full-screen player that launches doesn't include the poster image.
I was unable to actually test the fallback support for when browsers don't support the <video> tag, but now I also include text that links to the video and audio files for browsers that don't render the player themselves. There is a setting in Firefox that I thought should disable the video tag (media.navigator.video.enabled), but it didn't seem to actually disable the video tag.