File size: 2,550 Bytes
c02f046 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | /* ************************************************************************
qooxdoo - the new era of web development
http://qooxdoo.org
Copyright:
2004-2011 1&1 Internet AG, Germany, http://www.1und1.de
License:
LGPL: http://www.gnu.org/licenses/lgpl.html
EPL: http://www.eclipse.org/org/documents/epl-v10.php
See the LICENSE file in the project's top-level directory for details.
Authors:
* Adrian Olaru (adrianolaru)
************************************************************************ */
/**
* EXPERIMENTAL - NOT READY FOR PRODUCTION
*
* Media object for playing videos.
*/
qx.Class.define("qx.bom.media.Video",
{
extend : qx.bom.media.Abstract,
/**
* @param source {String} the source url to the sound file.
*/
construct : function(source)
{
this._video = document.createElement("video");
if (source) {
this._video.src = source;
}
this.base(arguments, this._video);
},
members :
{
_video : null,
/**
* Gets the width of the video element.
*
* @return {Number} the width of the video element
*/
getWidth: function() {
return this._video.width;
},
/**
* Sets the width of the video element.
*
* @param value {Number} The new value of width.
*/
setWidth: function(value) {
this._video.width = value;
},
/**
* Gets the height of the video element.
*
* @return {Number} the height of the video element
*/
getHeight: function() {
return this._video.height;
},
/**
* Sets the height of the video element.
*
* @param value {Number} The new value of height.
*/
setHeight: function(value) {
this._video.height = value;
},
/**
* Gets the width of the video.
*
* @return {Number} the width of the video
*/
getVideoWidth: function() {
return this._video.videoWidth;
},
/**
* Gets the height of the video.
*
* @return {Number} the height of the video
*/
getVideoHeight: function() {
return this._video.videoHeight;
},
/**
* Gets the poster of the video.
*
* @return {String} the URL of an image to act as the video poster
*/
getPoster: function() {
return this._video.poster;
},
/**
* Sets the poster of the video.
*
* @param value {String} The new value of poster.
*/
setPoster: function(value) {
this._video.poster = value;
}
}
});
|