We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7974514 commit 0d2d48fCopy full SHA for 0d2d48f
unikernels/unikraft-cu/client/src/components/video.vue
@@ -815,7 +815,8 @@
815
const { offsetWidth, offsetHeight } = !this.fullscreen ? this._component : document.body
816
this._player.style.width = `${offsetWidth}px`
817
this._player.style.height = `${offsetHeight}px`
818
- this._container.style.maxWidth = `${(this.horizontal / this.vertical) * offsetHeight}px`
+ const aspectPreservingMaxWidth = (this.horizontal / this.vertical) * offsetHeight
819
+ this._container.style.maxWidth = `${!this.fullscreen ? Math.min(this.width, aspectPreservingMaxWidth) : aspectPreservingMaxWidth}px`
820
this._aspect.style.paddingBottom = `${(this.vertical / this.horizontal) * 100}%`
821
}
822
0 commit comments