rails/rails — Issue #4919: Always use content_tag for video/audio
Author: brentkirby
Created: 2012-02-07 04:57:43+00:00
State: open

Using audio/video tags as "self-closing" seems to cause an issue where content following the tag gets "eaten" buy the media tag itself. This at least happens in latest versions Webkit and Firefox.

I setup a couple tests, [one for audio](http://dev.kurbmedia.com/audio_test.html), and [one for video](http://dev.kurbmedia.com/video_test.html) to demonstrate, you'll have to view source to check it out but the gist is that when using the self closing version.....

```html

This content gets "eaten" by the audio tag

```

...the content immediately following the tag disappears. Opening up webkit inspector/firebug actually shows the content rendered inside the tag (which is just compensating I'm sure), which, since this is technically for "fallback" content (or source information) by default it shouldn't show since audio/video is supported.

Switching the tags from `` to ` ` and `` to `` fixes the issue. I know this is the case right now if multiple sources are used, but with the single source it still uses the basic `tag` helper.