btw you don't need a special case here, just use the src attribute for video/audio too
see https://developer.mozilla.org/en-US/docs/HTML/Element/video