Created
July 16, 2013 18:31
-
-
Save kpq/6011325 to your computer and use it in GitHub Desktop.
responsive videos with mediaelement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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