Jive API (3.0.13) Core Javadocs

com.jivesoftware.community.media.video
Interface VideoProvider


public interface VideoProvider

Abstraction for video service providers that provide capabilities for uploading, transcoding, and playback of videos


Nested Class Summary
static class VideoProvider.ProviderActionStatus
           
 
Field Summary
static String VIDKEY
           
 
Method Summary
 boolean deleteVideo(long videoID)
          Deletes a video at the service provider
 Map<VideoProvider.ProviderActionStatus,String> getActionResults()
          Returns the struts action result types to invoke when the various VideoProvider.ProviderActionStatus results are encountered
 String getHtmlEmbedCode(User user, long videoID)
          Returns the html embed code for a user viewing the video with the given id
 String getHtmlEmbedCode(User user, String externalID)
          Returns the html embed code for a user viewing the video with the given id at the video service provider
 String getHtmlEmbedCode(User user, Video video)
          Returns the html embed code for a user viewing the given video
 String getJavaScriptEmbedCode(long videoID)
          Returns the javascript embed code for the video with the given id
 String getJavaScriptEmbedCode(String externalID)
          Returns the javascript embed code for the video with the given id at the service provider
 String getJavaScriptEmbedCode(Video video)
          Returns the javascript embed code for the given video
 String getName()
          Returns the unique name of the video service provider
 int getPercentTranscoded(long videoID)
          Returns the the transcoding progress of a video as a percentage of the total video duration.
 Map<String,Object> getProperties(long videoID)
          Retrieves properties for a video from the service provider.
 String getSiteAdminUrl()
          Returns the url of the admin site for the video service provider
 boolean isLicenseValid(String license)
          Returns true if the service providers is able to successfully validate the given license key
 boolean isTranscodedProgressSupported()
          Returns true if the service provider is able to give details about the transcoding progress (e.g., 60% done) of a particular video.
 boolean isVideoTypeSupported(String mimeType)
          Returns true if a particular mime type is supported by the video service provider
 Video uploadVideo(Video video)
          Uploads a video to the service provider
 

Field Detail

VIDKEY

static final String VIDKEY
See Also:
Constant Field Values
Method Detail

uploadVideo

Video uploadVideo(Video video)
                  throws InvalidLicenseException
Uploads a video to the service provider

Parameters:
video - to upload
Returns:
the uploaded video
Throws:
InvalidLicenseException

getProperties

Map<String,Object> getProperties(long videoID)
Retrieves properties for a video from the service provider. These properties, such as duration and transcoding status, can only be determined by the service provider

Parameters:
videoID - of video to retrieve details for
Returns:
a map containing property names and corresponding values

isTranscodedProgressSupported

boolean isTranscodedProgressSupported()
Returns true if the service provider is able to give details about the transcoding progress (e.g., 60% done) of a particular video.

Returns:
true if the service provider provides visibility into transcoding progress

getPercentTranscoded

int getPercentTranscoded(long videoID)
Returns the the transcoding progress of a video as a percentage of the total video duration.

Parameters:
videoID - of the video being transcoded
Returns:
the percent of the video that has been transcoded

deleteVideo

boolean deleteVideo(long videoID)
Deletes a video at the service provider

Parameters:
videoID - of the video to delete
Returns:
true if the deletion was successful

isVideoTypeSupported

boolean isVideoTypeSupported(String mimeType)
Returns true if a particular mime type is supported by the video service provider

Returns:
true if the mime type is supported

getHtmlEmbedCode

String getHtmlEmbedCode(User user,
                        Video video)
Returns the html embed code for a user viewing the given video

Parameters:
user - viewing the video
video - to be viewed
Returns:
the html embed code of the video player

getHtmlEmbedCode

String getHtmlEmbedCode(User user,
                        String externalID)
Returns the html embed code for a user viewing the video with the given id at the video service provider

Parameters:
user - viewing the video
externalID - id of the video at the service provider
Returns:
the html embed code of the video player

getHtmlEmbedCode

String getHtmlEmbedCode(User user,
                        long videoID)
Returns the html embed code for a user viewing the video with the given id

Parameters:
user - viewing the video
videoID - id of the video
Returns:
the html embed code of the video player

getJavaScriptEmbedCode

String getJavaScriptEmbedCode(Video video)
Returns the javascript embed code for the given video

Parameters:
video - to be viewed
Returns:
a javascript embed code for the video player

getJavaScriptEmbedCode

String getJavaScriptEmbedCode(String externalID)
Returns the javascript embed code for the video with the given id at the service provider

Parameters:
externalID - id of the video at the service provider
Returns:
a javascript embed code for the video player

getJavaScriptEmbedCode

String getJavaScriptEmbedCode(long videoID)
Returns the javascript embed code for the video with the given id

Parameters:
videoID - id of the video
Returns:
a javascript embed code for the video player

getName

String getName()
Returns the unique name of the video service provider

Returns:
the service provider name

getSiteAdminUrl

String getSiteAdminUrl()
Returns the url of the admin site for the video service provider

Returns:
the url of the admin site

getActionResults

Map<VideoProvider.ProviderActionStatus,String> getActionResults()
Returns the struts action result types to invoke when the various VideoProvider.ProviderActionStatus results are encountered

Returns:
a map of ProviderActionStatus to struts result type

isLicenseValid

boolean isLicenseValid(String license)
Returns true if the service providers is able to successfully validate the given license key

Returns:
true if the license key is valid, false otherwise

Jive Product Page

Copyright © 1999-2007 Jive Software.