Skip to content

Instantly share code, notes, and snippets.

@kpq
Created July 16, 2013 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kpq/6011325 to your computer and use it in GitHub Desktop.
Save kpq/6011325 to your computer and use it in GitHub Desktop.
responsive videos with mediaelement
<div class="wrapper">
<video width="640" height="360" style="width: 100%; height: 100%;" id="player1">
<!-- Pseudo HTML5 -->
<source type="video/youtube" src="http://www.youtube.com/watch?v=nOEw9iiopwI" />
</video>
</div>
<script>
$('video').mediaelementplayer({
success: function(media, node, player) {
$('#' + node.id + '-mode').html('mode: ' + media.pluginType);
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment