<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 is pause.
  • auto-play: <boolean> true | false. Use it to control whether it is playing when the page initialization finished. Defalut value is false.

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

Example

<div>
    <video class="video" auto-play="true" play-status="play" src="..." style="width:500;height:500;"></video>
</div>

results matching ""

    No results matching ""