TrimStartTime | trimStartTime property

MediaTranscoder.TrimStartTime | trimStartTime property

Gets or sets the time interval to trim from the start of the output.

Syntax


public:
property TimeSpan TrimStartTime { 
   TimeSpan get();
   void set (TimeSpan value);
}

Property value

Type: Number [JavaScript] | System.TimeSpan [.NET] | Windows::Foundation::TimeSpan [C++]

A TimeSpan structure that contains the time interval.

Examples

The following example sets this property to 1 second.



function doTranscode() {
        // Clear any existing effects.
        transcoder.clearEffects;
        // Add video effect.
        transcoder.addVideoEffect(videoEffect);
        // Add audio effect.
        transcoder.addAudioEffect(audioEffect);
        // Set start and stop times for trimming.
        transcoder.trimStartTime(1000);
        transcoder.trimStopTime(9000);
        // Always reencode the source
        transcoder.alwaysReencode = true;

        return transcoder.prepareFileTranscodeAsync(source, destination, profile);
    }


Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Media.Transcoding
Windows::Media::Transcoding [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Media.Transcoding
Windows::Media::Transcoding [C++]

Metadata

Windows.winmd

See also

MediaTranscoder
Transcoding media sample (Windows 10)

 

 

Show:
© 2016 Microsoft