Class Video#setVideoSize

Video

Class Summary
Constructor Attributes Constructor Name and Description
 
Video#setVideoSize(successCallback, errorCallback, options)
Sets video size.

Class Detail

Video#setVideoSize(successCallback, errorCallback, options)
Sets video size.
Original video(source rectangle) will be adjusted to the full screen size. It can be resized or a zoom effect can be applied to the video.
Note : Using more than one video tag in an html page may not be supported due to hardware limitation.
// Javascript code
function setVideoSize () {
  var options = {source: {x:10, y:10, width:900, height:600}};
    
  function successCb() {
     // Do something
  }

  function failureCb(cbObject) {
     var errorCode = cbObject.errorCode;
     var errorText = cbObject.errorText;
     console.log ("Error Code [" + errorCode + "]: " + errorText);
  }

  var video = new Video();
  video.setVideoSize(successCb, failureCb, options);
}
Parameters:
{Function} successCallback
success callback function.
{Function} errorCallback
failure callback function.
{Object} options
source object vary depending on video resolution. And rectangle object has boundary value as :
source.x + source.width <= width of video resolution , source.y + source.height <= height of video resolution
x and y value of rectangle are upper than zero.

PropertyTypeDescriptionRequired
sourceObjectsource rectangle of video. required
source.xNumberThe x coordinate of the upper-left corner of the rectangle. required
source.yNumberThe y coordinate of the upper-left corner of the rectangle. required
source.widthNumberThe width of the rectangle. required
source.heightNumberThe height of the rectangle. required
Since:
1.0
Returns:

If the method is successfully executed, success callback function is called without a parameter.
If an error occurs, failure callback function is called with a failure callback object as a parameter.

See:
Video.getVideoStatus()
InputSource.initialize()