Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Responsive design 在Videogular中动态设置宽度和高度_Responsive Design_Html5 Video_Videogular - Fatal编程技术网

Responsive design 在Videogular中动态设置宽度和高度

Responsive design 在Videogular中动态设置宽度和高度,responsive-design,html5-video,videogular,Responsive Design,Html5 Video,Videogular,我用的是录像带。我想动态设置高度和宽度。如何设置该值 videojs.options.width = sizeWidth; videojs.options.height = sizeHeight; 这是设置videogular的宽度和高度的正确方法吗?如果您想在响应式网站中自动调整videogular的大小,可以将vg responsive设置为true,videogular将适合其容器 但是,如果要手动更改大小,必须更改绑定到vg宽度和vg高度的属性,就像在代码中所做的那样。也许您的HTML

我用的是录像带。我想动态设置高度和宽度。如何设置该值

videojs.options.width = sizeWidth;
videojs.options.height = sizeHeight;

这是设置videogular的宽度和高度的正确方法吗?

如果您想在响应式网站中自动调整videogular的大小,可以将vg responsive设置为true,videogular将适合其容器

但是,如果要手动更改大小,必须更改绑定到vg宽度和vg高度的属性,就像在代码中所做的那样。也许您的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>

我将vg设置为true。它不起作用。我也传递了主题。你能给我发个例子看看代码吗?父页面HTML:子页面HTML:这是代码rgt吗?。在浏览器中可以查看绑定行vg reposive=true