我正在使用Videogular。我想动态设置高度和宽度。如何设置该值
videojs.options.width = sizeWidth;
videojs.options.height = sizeHeight;这是设置videogular的宽度和高度的正确方法吗?
发布于 2014-03-23 17:22:00
如果你想在一个响应式网站中自动调整Videogular的大小,你可以设置vg-responsive="true",Videogular将适合它的容器。
但是,如果您想手动更改大小,则必须更改绑定到vg-width和vg-height的属性,就像在代码中所做的那样。也许您的HTML是错误的,因此它应该是这样的:
<videogular vg-width="videojs.options.width" vg-height="videojs.options.height" vg-responsive="false" vg-theme="config.theme.url">
<video vg-src="videojs.options.sources" preload='metadata'>
<!-- You can also have sources here and remove vg-src="videojs.options.sources" -->
</video>
</videogular>https://stackoverflow.com/questions/22563642
复制相似问题