video-react attribute width and height is not working

二次信任 提交于 2019-12-11 12:46:51

问题


As per this 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?


回答1:


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>

They've updated this in there doc too.



来源:https://stackoverflow.com/questions/44917569/video-react-attribute-width-and-height-is-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!