I'm using mediaelement.js to load a youtube video with custom CSS and it's working fine.

html

```
<div class="wrap">
  <video width="1049" height="590" id="yt_video" style="width: 100%; height: 100%;">
      <!-- Pseudo HTML5 -->
      <source type="video/youtube" src="https://www.youtube.com/watch?v=ZSQDk_zLkiM" />
  </video>
</div>

```

css

```
.wrap{width:100%;}

```

js

```
$('video').mediaelementplayer({
  success: function(mediaElement, domObject) {
      if (mediaElement.pluginType == 'flash') {
          mediaElement.addEventListener('canplay', function() {
              mediaElement.play();
              mediaElement.pause();
          }, false);
      }
  }
});

```

The problem:
I need that the video player have 100% width and max-height 590px, the embed video should have 590px too but the embed video is filling 100% too and it's height is overflowing the player area.