aframe-video-controls:如何调整PC中视频播放器的宽度和长度

时间:2016-08-08 16:16:32

标签: aframe

每次我都使用aframe-video-controls进行视频播放。显示完整的Web浏览器视频。我想以指定的长度或宽度显示视频。我也想把它放在像html一样的指定位置。我该怎么办?

https://github.com/oscarmarinmiro/aframe-video-controls

1 个答案:

答案 0 :(得分:0)

使用position组件定位并scale组件进行缩放。

  <!-- 360 video, rotated 180-degrees to select an initial view. -->
  <a-videosphere src="#cityVideo" rotation="0 180 0"></a-videosphere>

  <!-- Video controls. -->
  <a-entity
    video-controls="src: #cityVideo; backgroundColor: #333; barColor: #EF2D5E; textColor: #DADADA; infoTextTop: Gaze and click on the icon or progress bar.; infoTextBottom: Double-click outside of the player to toggle it."
    position="0 1 -2" scale="1 1.5 1"></a-entity>

https://aframe.io/docs/0.2.0/components/position.html https://aframe.io/docs/0.2.0/components/scale.html