视频反应属性宽度和高度不起作用 [英] video-react attribute width and height is not working
本文介绍了视频反应属性宽度和高度不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
根据这个doc
我们可以在属性中为玩家添加宽度和高度
We can add width and height for player in attribute
<Player playsInline width={100} height={50}>
<source src="https://media.w3.org/2010/05/sintel/trailer_hd.mp4"/>
<ControlBar>
<PlaybackRateMenuButton rates={[2,1.5,1]} order={7.1} />
<VolumeMenuButton disabled />
</ControlBar>
</Player>
但是这些不起作用..那么,我在这里做错了吗?
But these don't work .. So, did i doing something wrong here?
推荐答案
Video Width 和 Height 属性 只有我们设置了 fluid
才有效如 false
Video Width and Height attribute is effective only if we set fluid
as false
<Player playsInline fluid={false} width={100} height={50}>
<source src="https://media.w3.org/2010/05/sintel/trailer_hd.mp4"/>
<ControlBar>
<PlaybackRateMenuButton rates={[2,1.5,1]} order={7.1} />
<VolumeMenuButton disabled />
</ControlBar>
</Player>
他们也在doc中对此进行了更新.
They've updated this in there doc too.
这篇关于视频反应属性宽度和高度不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文