# Class Video#setVideoSize

Video

- Defined in: video.js

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:0, y:0, width:100, height:100}};

      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.

  Property | Type | Description | Required
  --- | --- | --- | ---
  source | Object | source rectangle of video. | required
  source.x | Number | The x coordinate of the upper-left corner of the rectangle. | required
  source.y | Number | The y coordinate of the upper-left corner of the rectangle. | required
  source.width | Number | The width of the rectangle. | required
  source.height | Number | The 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()