Share via


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.SharePoint.Client.Video
Assembly:  Microsoft.SharePoint.Client.DocumentManagement (in Microsoft.SharePoint.Client.DocumentManagement.dll)

Syntax

'Declaration
Public Shared Function MigrateVideo ( _
    context As ClientRuntimeContext, _
    videoFile As File _
) As ListItem
'Usage
Dim context As ClientRuntimeContext
Dim videoFile As File
Dim returnValue As ListItem

returnValue = VideoSet.MigrateVideo(context, _
    videoFile)
public static ListItem MigrateVideo(
    ClientRuntimeContext context,
    File videoFile
)

Parameters

Return value

Type: Microsoft.SharePoint.Client.ListItem
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

Exception Condition
FileNotFoundException

Video file cannot be found.

ArgumentNullException

Video file parent hierarchy cannot be established.

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.

See also

Reference

VideoSet class

VideoSet members

Microsoft.SharePoint.Client.Video namespace