I'm by no means a CSS expert - but..
You should be able to change the
padding-bottom: 56.25%; /* 16/9 ratio */
part to fit your aspect ratio. There is nothing here that detects the aspect ratio of the video though so you need to know it up front.
Someone else can likely expand on this.