VideoSet.MigrateVideo method

For a document library containing the video content type, this method attempts to migrate specified standalone video files into the representation required by video content type.

Namespace:  Microsoft.Office.DocumentManagement.VideoSets
Assembly:  Microsoft.Office.DocumentManagement (in Microsoft.Office.DocumentManagement.dll)


Public Shared Function MigrateVideo ( _
    videoFile As SPFile _
) As SPListItem
Dim videoFile As SPFile
Dim returnValue As SPListItem

returnValue = VideoSet.MigrateVideo(videoFile)
public static SPListItem MigrateVideo(
    SPFile videoFile


Return value

Type: Microsoft.SharePoint.SPListItem
The list item corresponding to the migrated video or to the original specified file if migration could not complete for reasons specified in remarks.


Exception Condition

Video file cannot be found.


Video file parent hierarchy cannot be established.


For migration to be attempted, the specified file must be in a document library that contains the video content type. It must also be on the list of file extensions specified by web.config SharePoint/MediaAssets node attribute mediaFileExtensions and not appear on the html5AudioFileExtensions attribute value. Otherwise, the specified file will not be modified.

See also


VideoSet class

VideoSet members

Microsoft.Office.DocumentManagement.VideoSets namespace