Embedded audio and video

I think generic directives are the way to go here. Their syntax is general enough to use for pretty much anything, including embedded and/or external content. And since they specify the media type, there’d be no guessing games or corner cases.

As for generic directives’ dependence on English words, let’s fix that with some upside-down syntactic sugar…

| Media | Directive    | Shorthand |
|-------|--------------|-----------|
| Image | :image[](){} | ![](){}   |
| Video | :video[](){} | ^[](){}   |
| Audio | :audio[](){} | @[](){}   |

Both the “directive” and “shorthand” syntaxes should be available, so we’d have the best of both worlds. My guess is most people would use the shorthand form.

One issue is, some extensions might already be using these characters for other things – like ^ for superscripts, footnotes, etc. A parser that implements the “shorthand” syntax above would need to give it precedence over those other features.

1 Like