ArcGIS Pro 3.5 API Reference Guide
ArcGIS.Desktop.Presentations Namespace / Presentation Class / AddVideoPage Method
The path to a video file
The insert position. If -1, the page is added to the end of the page collection. If 0, the page is added to the beginning of the page collection.
Example

In This Topic
    AddVideoPage Method
    In This Topic
    Adds a new video page to the presentation. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Function AddVideoPage( _
       ByVal videoURI As String, _
       ByVal insertIndex As Integer _
    ) As VideoPresentationPage

    Parameters

    videoURI
    The path to a video file
    insertIndex
    The insert position. If -1, the page is added to the end of the page collection. If 0, the page is added to the beginning of the page collection.

    Return Value

    Exceptions
    ExceptionDescription
    This method must be called within the lambda passed to QueuedTask.Run.
    Example
    Video page
    //Must be on QueuedTask
    await QueuedTask.Run(() =>
    {
      // add a new video page in current active presentation
      var videoPage = presentation.AddVideoPage("my video file", -1);
    
      // change the image source
      videoPage.SetVideoSource("new video source");
    
      // change the start time of video to 3s
      videoPage.SetStartTime(3.0);
      // change the end time of video to 10s
      videoPage.SetEndTime(10.0);
    });
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.5 or higher.
    See Also