Always use content_tag for video/audio #4919

Closed
brentkirby opened this Issue Feb 7, 2012 · 0 comments

Projects

None yet

2 participants

@brentkirby

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, and one for video to demonstrate, you'll have to view source to check it out but the gist is that when using the self closing version.....

<audio src="http://somewhere.com/path-to-audio.mp3" />
<p>This content gets "eaten" by the audio tag</p>

...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 <audio /> to <audio> <audio /> and <video /> to <video></video> 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.

@josevalim josevalim closed this in e41425a Feb 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment