public class VideoCloudManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
VideoCloudManager.VideoCloudConfiguration |
Modifier and Type | Field and Description |
---|---|
static long[] |
CHUNK_UPLOAD_WAIT_RETRY_MILLIS |
Modifier and Type | Method and Description |
---|---|
VideoCloudManager.VideoCloudConfiguration |
getConfiguration() |
VideoInformation |
getInformation(Item item)
Return the information out of the Cumulus catalog.
|
static VideoCloudManager |
getInstance(Server server) |
VideoCloudProvider |
getProvider(java.lang.String providerID)
Get a specific video cloud provider instance.
|
java.lang.String |
getQueryToFindVideosInProgress()
Return a query string that finds all videos that are in the state of being uploaded or published (the variants are generated).
|
java.lang.String |
getQueryToFindVideosRecentlyFailed()
Return a query string that finds all videos that have a recent (not older than 24 hours) error logged in the "VideoCloud Log" sub-table.
|
java.lang.String |
getQueryToFindVideosToPublish()
Return a query string that finds all videos that are requested to publish.
|
java.lang.String |
getQueryToFindVideosToRemove()
Return a query string that finds all videos that are requested to be removed from the Video Cloud.
|
java.lang.String |
getQueryToFindVideosToUnpublish()
Return a query string that finds all videos that are requested to be unpublished in the Video Cloud.
|
java.lang.String |
getQueryToFindVideosToUpload()
Return a query string that finds all videos that should be uploaded to the Video Cloud.
|
java.util.Collection<UploadQueueItem> |
getUploadQueue() |
VideoCloudInformation |
getVideoCloudInformation(Item item)
Return the information directly from the video cloud provider.
|
java.lang.String |
getWebEmbedCode(Item item,
int width,
int height,
java.lang.String skin,
java.lang.String localeString)
Return the complete HTML+JavaScript code to embed a player in a web page.
|
void |
logError(Item item,
java.lang.String message) |
void |
logWarn(Item item,
java.lang.String message) |
boolean |
needsToUploadVideo(Item item) |
void |
removeVideo(Item item)
Deletes the video at the video cloud provider along with all of its variants.
|
void |
removeVideo(java.lang.String videoID)
Deletes the video at the video cloud provider along with all of its variants.
|
void |
requestPublishing(Item item)
Request a publishing of the video asset in it's video cloud provider.
|
void |
requestRemoving(Item item)
Request to remove the video asset from it's video cloud provider.
|
void |
requestUnpublishing(Item item)
Request to unpublish the video asset in it's video cloud provider.
|
void |
requestUpload(Item item)
Request an upload of the video asset to the given provider.
|
void |
setProviderConfiguration(java.lang.String providerConfiguration) |
void |
startPublishingVideo(Item item)
Let the provider generate the variants for different devices/environments/bandwidth.
|
void |
unpublishVideo(Item item)
Deactivate the video for publishing.
|
boolean |
updatePlayerSkins(java.lang.String videoProviderID,
int catalogID) |
void |
updateState(Item item)
Update the Video Cloud State value to "Uploaded" or "Published" if the Video Cloud provider says that the video is finished uploading or preparing
|
void |
updateVideoCloudInformation(Item item)
Update the "valid from" and "valid to" date for a published video at the video cloud provider.
|
void |
uploadMetadata(Item item,
java.util.Set<GUID> fieldsToUpdate)
Uploads metadata for a video at the video cloud provider.
|
void |
uploadVideo(Item item,
java.lang.String providerID)
Upload the video to the given provider.
|
public static final long[] CHUNK_UPLOAD_WAIT_RETRY_MILLIS
public static VideoCloudManager getInstance(Server server)
public VideoCloudProvider getProvider(java.lang.String providerID)
providerID
- The GUID of the video cloud providerpublic boolean updatePlayerSkins(java.lang.String videoProviderID, int catalogID) throws java.io.IOException
java.io.IOException
public java.lang.String getWebEmbedCode(Item item, int width, int height, java.lang.String skin, java.lang.String localeString)
item
- The asset record itemwidth
- The target player width in pixelsheight
- The target player height in pixelsskin
- The UI skin variant the player should be usinglocaleString
- The preferred locale of the video playback language.null
if the asset is not playable from the Video Cloud.public VideoInformation getInformation(Item item)
item
- The asset record itemnull
if not applicable.public VideoCloudInformation getVideoCloudInformation(Item item) throws java.io.IOException
item
- The asset record itemjava.io.IOException
public void requestUpload(Item item) throws FieldNotFoundException
item
- The asset record itemFieldNotFoundException
public void requestPublishing(Item item) throws FieldNotFoundException
item
- The asset record itemFieldNotFoundException
public void requestUnpublishing(Item item) throws FieldNotFoundException
item
- The asset record itemFieldNotFoundException
public void requestRemoving(Item item) throws FieldNotFoundException
item
- The asset record itemFieldNotFoundException
public java.lang.String getQueryToFindVideosToUpload()
uploadVideo(Item,
String)
to actually upload the video asset to the Video Cloud.public java.lang.String getQueryToFindVideosToPublish()
startPublishingVideo(Item)
to start
the preparation process.public java.lang.String getQueryToFindVideosInProgress()
updateState(Item)
to update the "Video Cloud State" field value accordingly.public java.lang.String getQueryToFindVideosRecentlyFailed()
public java.lang.String getQueryToFindVideosToUnpublish()
unpublishVideo(Item)
to unpublish them.public java.lang.String getQueryToFindVideosToRemove()
removeVideo(String)
to remove them.public boolean needsToUploadVideo(Item item)
public void uploadVideo(Item item, java.lang.String providerID) throws java.io.IOException
item
- The asset record itemproviderID
- The ID of the Video Cloud provider to use or null
if the default Video Cloud provider should be used.java.io.IOException
public void uploadMetadata(Item item, java.util.Set<GUID> fieldsToUpdate) throws java.io.IOException
item
- The item containing the metadatafieldsToUpdate
- The fields to update or null
when all fields should be updatedjava.io.IOException
public void startPublishingVideo(Item item) throws java.io.IOException
item
- The asset record itemjava.io.IOException
public void updateVideoCloudInformation(Item item) throws java.io.IOException
item
- The asset record itemjava.io.IOException
public void updateState(Item item) throws java.io.IOException
item
- The asset record itemjava.io.IOException
public void unpublishVideo(Item item) throws java.io.IOException
item
- The asset record itemjava.io.IOException
public void removeVideo(Item item) throws java.io.IOException
item
- The asset record itemjava.io.IOException
public void removeVideo(java.lang.String videoID) throws java.io.IOException
videoID
- The "Video Cloud ID" field valuejava.io.IOException
public java.util.Collection<UploadQueueItem> getUploadQueue()
public void setProviderConfiguration(java.lang.String providerConfiguration)
public VideoCloudManager.VideoCloudConfiguration getConfiguration()
public void logError(Item item, java.lang.String message)
public void logWarn(Item item, java.lang.String message)
www.canto.com
Canto, the Canto logo, the Cumulus logo, and Cumulus are registered trademarks of Canto GmbH, registered in the U.S. and other countries.