Upload Widgets allow uploading as well as publishing a video to a Channel or a main Account. To use this API, the user must be logged in and therefore User Context is established. The user uploading and publishing video must have rights to upload and publish media. In case the user does not have appropriate rights, an error will be returned.

 

Sample Code


<div class="upload"></div>
<script type="text/javascript" src="http://video.lexcorpinc.com/JavaScript/bundles/widgets.js"></script>
<script type="text/javascript">
  var opt = { 'access_token': AccessToken }
    vidizmo.videos.upload('#upload’, opt);

});

</script>

 

 Properties


Property

Comments

title

Title of the video. This value is required.

description 

Description of the video

tags

Tags Array.

categories

 

 

Category Id this video, or pass 0 to set ‘General’ Category.

 

category_id =  2329; 

//assign 2329 category id to video

player

Player theme to apply on published video

completion_criteria

Percentage of video after which video will be assumed to have been  completely watched; possible value 

 

completion_criteria = 100; 

// means 100% 

social_sharing_enabled

true/  false


If sharing of this video on Social networking sites is allowed. Social  Networking sites supported are Facebook, LinkedIn, and Twitter; 

embed_enabled

true/  false


If a general user is allowed to take embed code from Player 

download_enabled

true/  false


If viewer is allowed to download video for offline viewing 

comments_enabled

true/ false 
 
 

If viewer is allowed to add comment on the video


Note: user will not be able to comment if commenting is disabled on  channel 

comment_moderation_required

true/ false 


If comments added by viewer are supposed to be moderated 

show_on_channel_library

true/ false 
 
 

If published video is to be listed on channel library

is_featured

true/ false 
 
If the published video will be a featured video (to appear on channel home page). 

available_from

Date when this video will start appearing in channel library 

 

Date() value

expires_after

Date when this video will stop appearing in channel library 

 

Date() value 

 

Response

 

{
 "video_status_id": 3,
 "video_url": "http://arsalan.farooq.tv/MashupPlayBack.aspx?id=88o6DfSFvuqPYGHI1E5Rkw%3d%3d",
 "video_id": "176953",
 "video_id_hash": "88o6DfSFvuqPYGHI1E5Rkw%3d%3d",
 "content_id": "663458",
 "tracking_id": null,
 "tracking_id_hash": null,
 "status": 1,
 "status_code": 200,
 "message": "Published"
}

 

Properties


 

Property

Comments

video_id 

Id of the video published

video_id_hash

Hash code of video id. This will be used by VIDIZMO Widget API

video_url

Playback URL of the video published. This will be linked to channel playback page on VIDIZMO

message

Possible values:

 

Published    // you get this status if video was published successfully

Error           // if there’s an error occurred during the process.

UnAuthorized     // UnAuthorized status is set when user doesn’t have rights to  publish video

Error

Text message is displayed in case an error occurs.



To learn more how these Widgets work, click here on VIDIZMO Widgets API Implementation.

For a complete list of VIDIZMO APIs, click here on VIDIZMO Developer APIs.