Player"
From Documentation
Charlesqiu (talk | contribs) |
Charlesqiu (talk | contribs) |
||
Line 6: | Line 6: | ||
= Employment/Purpose = | = Employment/Purpose = | ||
An <tt>player</tt> component is used to play the video at the browser. Like <tt>audio</tt>, you could use the <tt>src</tt> property to specify an URL of an video resource, or the <tt>setContent</tt> method to specify a dynamically generated video. Developers might be able to control the play of an video by the <tt>play</tt>, <tt>stop</tt> and <tt>pause</tt> methods. | An <tt>player</tt> component is used to play the video at the browser. Like <tt>audio</tt>, you could use the <tt>src</tt> property to specify an URL of an video resource, or the <tt>setContent</tt> method to specify a dynamically generated video. Developers might be able to control the play of an video by the <tt>play</tt>, <tt>stop</tt> and <tt>pause</tt> methods. | ||
+ | |||
+ | = Example = | ||
+ | [[Image:Player-Sample.png]] | ||
+ | |||
+ | <source lang="xml" > | ||
+ | <player src="zk.mp4" controls="true" autoplay="true" loop="true" /> | ||
+ | </source> | ||
+ | |||
+ | = Supports HTML5 = | ||
+ | The player component support HTML 5, like <video>, it includes the properties like <tt>autoplay</tt>, <tt>controls</tt>, <tt>loop</tt>, <tt>muted</tt> and <tt>preload</tt>. | ||
+ | |||
+ | = Multiple Sources = | ||
+ | Most browsers do not support all the video formats,so we could specify multiple source files in different formats for different browsers. For examples: | ||
+ | <source lang="xml" > | ||
+ | <player src="zk.mp4, zk.webm, zk.ogg" controls="true" /> | ||
+ | </source> | ||
+ | |||
+ | = CurrentTime = | ||
+ | |||
+ | = TurnOffLight = | ||
+ | |||
+ | = Supported Events = | ||
+ | |||
+ | {| border="1" | width="100%" | ||
+ | ! <center>Name</center> | ||
+ | ! <center>Event Type</center> | ||
+ | |- | ||
+ | | None | ||
+ | | None | ||
+ | |} | ||
+ | *Inherited Supported Events: [[ZK_Component_Reference/Base_Components/XulElement#Supported_Events | XulElement]] | ||
+ | |||
+ | =Supported Children= | ||
+ | |||
+ | *NONE | ||
+ | |||
+ | = Use Cases = | ||
+ | |||
+ | {| border='1px' | width="100%" | ||
+ | ! Version !! Description !! Example Location | ||
+ | |- | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |} |
Revision as of 08:51, 13 April 2018
Player
Employment/Purpose
An player component is used to play the video at the browser. Like audio, you could use the src property to specify an URL of an video resource, or the setContent method to specify a dynamically generated video. Developers might be able to control the play of an video by the play, stop and pause methods.
Example
<player src="zk.mp4" controls="true" autoplay="true" loop="true" />
Supports HTML5
The player component support HTML 5, like <video>, it includes the properties like autoplay, controls, loop, muted and preload.
Multiple Sources
Most browsers do not support all the video formats,so we could specify multiple source files in different formats for different browsers. For examples:
<player src="zk.mp4, zk.webm, zk.ogg" controls="true" />
CurrentTime
TurnOffLight
Supported Events
None | None |
- Inherited Supported Events: XulElement
Supported Children
*NONE
Use Cases
Version | Description | Example Location |
---|---|---|