vee-dee-oh element
summary
Webcomponent which abstracts video element and video-js-swf to playback videos,
supporting both the browsers's supported mime types by its video element
(video/mp4, video/webm, video/ogg, application/x-mpegurl),
along with mime types supported by Flash playback formats
(video/mp4, video/flv, rtmp/mp4, rtmp/flv).
how to use
<!-- head -->
<script type="text/javascript" src="http://www.polymer-project.org/components/platform/platform.js"></script>
<script src="http://josepedrodias.github.io/vee-dee-oh/ext/embedSWF.js"></script>
<link rel="import" href="http://josepedrodias.github.io/vee-dee-oh/src/vee-dee-oh.html">
<!-- body -->
<vee-dee-oh poster="http://www.videojs.com/img/poster.jpg" impl="flash">
<source type="video/mp4" src="http://vjs.zencdn.net/v/oceans.mp4">
<source type="video/webm" src="http://vjs.zencdn.net/v/oceans.webm">
</vee-dee-oh>
attributes
- autoplay - if present, video will autoplay (if browser allows, most mobile don't)
events
- canplay
- canplaythrough
- click
- durationchange
- loadeddata
- loadedmetadata
- loadstart
- pause
- playing
- play
- seeking
- seeked
- volumechange
- waiting
- timeupdate
properties
- autoplay - if true, video plays automatically.
- currentTime - video's current time float in seconds.
- duration - duration float in seconds.
- poster - poster image URL.
- src - read-only src URL in use.
- type - read-only mime type in use.
- videoWidth - read-only integer. video width resolution in pixels.
- videoHeight - read-only integer. video height resolution in pixels.
- volume - volume. float between 0 (mute) and 1 (max).
methods
- isPlaying() - returns true iif video is playing.
- load(undefined|Object[]) - if no arguments are passed, loads sources from sub-DOM. otherwise expects array of {src, type} objects.
- pause()- pauses video playback.
- play() - starts/resumes video playback.