enyo.Video
enyo.Video is a control that allows you to play video. This component is an abstraction of HTML 5 Video.
Initialize a video component as follows:
{kind: "Video", src: "http://www.w3schools.com/html5/movie.mp4"}
To play a video, do this:
this.$.video.play();
You can get a reference to the actual HTML 5 Video element via this.$.video.node.
Published Properties
| Name | Default | Description |
| src | "" |
URL of the video resource. May be a path relative to the application's index.html file.
|
| showControls | true |
If true, shows playback controls.
|
| autoplay | false |
If true, playback begins automatically.
|
| loop | false |
If true, playback repeats in a loop.
|
| fitToWindow | false |
(webOS only) If true, stretches the video to fill the entire window.
|
Methods
pause()
Pauses (or, if already paused, resumes) video playback. The pause method takes no arguments and nothing is returned.
play()
Begins (or, if paused, resumes) video playback. The play method takes no arguments and nothing is returned.