HTML and CSS Reference
In-Depth Information
_title = title;
}
/**
* Gets the length of the video in milliseconds
* @return {Integer}
*/
this.getLength = function(){
return _length;
}
/**
* Sets the length of the video in milliseconds
* @param {Integer} length
*/
this.setLength = function(length){
/**
* Use parseInt here just to ensure the length
* is an integer. If it's not, then it will
* return NaN. The isNaN method will check to
* see whether the value is not a number.
*/
_length = parseInt(length);
if(isNaN(_length)){
_length = 0;
}
}
/**
* Gets all of the video sources used for embedding video
* in POSH
* @return {Array}
*/
this.getSources = function(){
return _sources;
}
/**
* Sets all video sources using an array
* @param {Array} sources
*/
this.setSources = function(sources){
_sources.length = 0;
/**
* Rather than setting the sources all in one go,
* you use the addSource method, which can handle
* any validation for each source before it's
Search WWH ::




Custom Search