HTML5 videos (Answer)

This fiddle show two HTML5 video elements, the first one created with HTML, and the second one created with Javascript. Both are, in terms of funcionality, equals.

by Cristian

HTML

<!-- HTML5 video element -->
<video controls autoplay loop muted>
  <source src="http://techslides.com/demos/sample-videos/small.mp4" />
</video>

<hr/>

JavaScript

function Main() {
  /* HTML5 element created with JS */
  this.video = document.createElement("video");
  this.video.src = "http://techslides.com/demos/sample-videos/small.mp4";
  this.video.controls = true;
  this.video.autoplay = true;
  this.video.loop = true;
  this.video.muted = true
  document.body.appendChild(this.video);
}

var main = new Main();