VideoSet.MigrateVideo(SPFile) VideoSet.MigrateVideo(SPFile) VideoSet.MigrateVideo(SPFile) Method

Definition

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.

public:
 static Microsoft::SharePoint::SPListItem ^ MigrateVideo(Microsoft::SharePoint::SPFile ^ videoFile);
[Microsoft.SharePoint.Client.ClientCallableExceptionConstraint(Condition="Video file parent hierarchy cannot be established.", ErrorType=typeof(System.ArgumentNullException), FixedId="ArgumentNullException")]
[Microsoft.SharePoint.Client.ClientCallableExceptionConstraint(Condition="Video file cannot be found.", ErrorType=typeof(System.IO.FileNotFoundException), FixedId="FileNotFoundException")]
[Microsoft.SharePoint.Client.ClientCallableMethod(ClientLibraryTargets=Microsoft.SharePoint.Client.ClientLibraryTargets.NonRESTful)]
public static Microsoft.SharePoint.SPListItem MigrateVideo (Microsoft.SharePoint.SPFile videoFile);
Public Shared Function MigrateVideo (videoFile As SPFile) As SPListItem
Parameters
videoFile
SPFile SPFile SPFile

Standalone video file with a known file extension to be migrated.

Returns

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

Exceptions

Remarks

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.

Applies to