I'm working in local with Bootstrap, jQuery and HTML. When you click in a button you get a data-url which gets put into an iframe video. If you put an empty src="", it is so much faster than not putting anything. Why is that? Apparently it looks like it doesn't matter.
Example:
<script>
var youtube = "https://www.youtube.com/embed/"
$("button[data-url]").click(function() {
var code = $(this).data("url")
var video = youtube + code
$("iframe").attr("src", video)
})
</script>
<button type="button" data-url="WhateverCode1">Video 1</button>
<button type="button" data-url="WhateverCode2">Video 2</button>
<!--With src="" is so much faster -->
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src=""></iframe>
</div>
<!-- Than no src -->
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item"></iframe>
</div>