Player"
From Documentation
Charlesqiu (talk | contribs) |
Charlesqiu (talk | contribs) |
||
Line 20: | Line 20: | ||
Most browsers do not support all the video formats,so we could specify multiple source files in different formats for different browsers. For examples: | 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" > | <source lang="xml" > | ||
− | <player src="zk.mp4, zk.webm, zk.ogg | + | <player src="zk.mp4, zk.webm, zk.ogg" /> |
</source> | </source> | ||
− | = CurrentTime = | + | = enableFullScreen = |
+ | Player provides a client-side method <tt>enableFullScreen()</tt> to use full screen mode. | ||
+ | <source lang="xml" > | ||
+ | <player id="player" src="zk.mp4" /> | ||
+ | <button xmlns:w="client" w:onClick="zk.$('$player').enableFullScreen()" /> | ||
+ | </source> | ||
+ | |||
+ | = Properties = | ||
+ | |||
+ | == CurrentTime == | ||
− | = TurnOffLight = | + | == TurnOffLight == |
= Supported Events = | = Supported Events = |
Revision as of 09:07, 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" />
enableFullScreen
Player provides a client-side method enableFullScreen() to use full screen mode.
<player id="player" src="zk.mp4" />
<button xmlns:w="client" w:onClick="zk.$('$player').enableFullScreen()" />
Properties
CurrentTime
TurnOffLight
Supported Events
None | None |
- Inherited Supported Events: XulElement
Supported Children
*NONE
Use Cases
Version | Description | Example Location |
---|---|---|