Class Video#setRotatedVideoTransform

Video

Class Summary
Constructor Attributes Constructor Name and Description
 
Video#setRotatedVideoTransform(successCallback, errorCallback, options)
Sets position and size of rotated video.

Class Detail

Video#setRotatedVideoTransform(successCallback, errorCallback, options)
Sets position and size of rotated video.

Note :
This feature is supported after setting of rotated video by setContentRotation.
This API should be called after start of video playing and need 2 sec delay to get ID of video element.
// Javascript code
function setRotatedVideoTransform() {

	var successCb = function (){
            // Do Something
	}
	
	 var failureCb = function(cbObject){ 
	        var errorCode = cbObject.errorCode;
     		var errorText = cbObject.errorText;
     		console.log ("Error Code [" + errorCode + "]: " + errorText);
	}
	
    var video = new Video();

    video.setRotatedVideoTransform(successCb, failureCb, {
    //Portrait Standard
       x: 100, 
       y: 120,
       width: 900,
       height: 600
    });    
}

//Video file should be rotated before use setRotatedVideoTransform 
function setContentRotation () {
  var options = {degree : "90", aspectRatio : "full"};
    
  function successCb() {
     setRotatedVideoTransform();  
  }

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

  var video = new Video();
  video.setContentRotation(successCb, failureCb, options);
}
Parameters:
{Function} successCallback
success callback function.
{Function} errorCallback
failure callback function.
{Object} options


PropertyTypeDescriptionRequired
xStringpostion of x-axis in videorequired
yStringpostion of y-axis in videorequired
widthStringwidth of size in videorequired
heightStringheight of size in videorequired
Since:
1.3
Platform Version:
webOS Signage 2.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.setContentRotation()