The Edit API allows updating an already uploaded and published video in a Channel or a main Account. To use this API, the user must be logged in so that a User Context is established. User updating video must have rights to publish videos. In case the user doesn’t have appropriate rights, an error will be returned.
This API only expects ‘id’ parameter to execute. Rest of the properties whichever provided will be updated for the selected video. However, the user must have rights to perform this operation.
Sample Code
<script type="text/javascript" src="http://video.lexcorpinc.com/JavaScript/bundles/widgets.js"></script>
<script type="text/javascript">
function Edit() {
var videoId = 1001;
vidizmo.api.videos.update({
id : videoId,
description: "",
tags: [{ name: "tag1" }, {name: "tag2"}],
categoeries: [{ id: 0 }],
player : { id: 0 },
complete_at_percent : 100,
social_sharing_enabled: false,
embed_enabled: false,
download_enabled: false,
comments_enabled: false,
comment_moderation_required: false,
show_on_channel_library: false,
is_featured: false,
available_from: '01/01/2014',
expires_after: '12/31/2014',
viewingaccess: 2,
access_token: 'oo45%252f%252fpgC2skXAD8koQ%253d%253d',
on_error: function (msg, self) {
status.innerHTML = msg;
}
}, function (obj, self) {
// on completion
});
}
</script>
Properties
Property |
Comments |
Id |
The id of the video. |
title Required |
Title of video |
description |
Description of 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 the 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
{
"MashupId":"1402",
"MashupIdHash":"zefxlXfxUpI%3d",
"URL":"http://video.lexcorpinc.com/MashupPlayBack.aspx?id=zefxlXfxUpI%3d",
"Status":"Published",
"Error":null
}
Properties
MashupIdHash |
Hash code of video id. This will be used by VIDIZMO Widget API |
URL |
Playback URL of the published video. This will be the link to channel playback page on VIDIZMO |
Status |
Status of published video Possible values: Published // you get this status if video was published successfully Error // if there’s an error occurred during process you get Error in status UnAuthorized // UnAuthorized status is set when user doesn’t have rights to publish video |
Error |
Error message text in case an error occurred |
To learn more how these Widgets work, click here on VIDIZMO JS API Implementation.
For a complete list of VIDIZMO APIs, click here on VIDIZMO Developer APIs.