<video>
0.4 cn
Summary
Use the <video> component to embed video content in a weex page. The video component use src attribute to specify the source of a video.
Child Components
This component supports no child components but a text content.
Attributes
src
: <string> The URL of the video to embed.play-status
: <boolean>play
|pause
. Use it to control video's play/pause. Default value ispause
.auto-play
: <boolean>true
|false
. Use it to control whether it is playing when the page initialization finished. Defalut value isfalse
.
Other attributes please check out the common attributes.
Styles
common styles: check out the common styles
- support flexbox related styles
- support box model related styles
- support
position
related styles - support
opacity
,background-color
etc.
Events
start
: triggered when playback state is Playing.pause
: triggered when playback state is Paused.finish
: triggered when playback state is Finished.fail
: triggered when playback state is Failed.
common events: check out the common events
- support
click
event. Check out common events - support
appear
/disappear
event. Check out common events
Example
<div>
<video class="video" auto-play="true" play-status="play" src="..." style="width:500;height:500;"></video>
</div>