VideoProperties class

Applies to Windows and Windows Phone

Provides access to the video-related properties of an item (like a file or folder).

Syntax


var videoProperties = fileInformation.videoProperties;

Attributes

[Version(0x06020000)]

Members

The VideoProperties class has these types of members:

Methods

The VideoProperties class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
RetrievePropertiesAsync Retrieves the specified properties associated with the item.
SavePropertiesAsync() Saves all properties associated with the item.
SavePropertiesAsync(IIterable(IKeyValuePair)) Saves the specified properties and values associated with the item.

 

Properties

The VideoProperties class has these properties.

PropertyAccess typeDescription

Bitrate

Read-onlyGets the sum audio and video bitrate of the video.

Directors

Read-onlyGets the directors of the video.

Duration

Read-onlyGets the duration of the video.

Height

Read-onlyGets the height of the video.

Keywords

Read-onlyGets the collection of keywords associated with the video.

Latitude

Read-onlyGets the latitude coordinate where the video was shot.

Longitude

Read-onlyGets the longitude coordinate where the video was shot.

Orientation

Read-onlyGets a VideoOrientation value that indicates how the video should be rotated to display it correctly.

Producers

Read-onlyGets the producers of the video.

Publisher

Read/writeGets or sets the publisher of the video.

Rating

Read/writeGets or sets the rating associated with a video file.

Subtitle

Read/writeGets or sets the subtitle of the video.

Title

Read/writeGets or sets the title of the video.

Width

Read-onlyGets the width of the video.

Writers

Read-onlyGets the script writers for the video.

Year

Read/writeGets or sets the year that the video was shot or released.

 

Remarks

You can access a VideoProperties object asynchronously using the getVideoPropertiesAsync method from the Properties property of an item (like a file of folder), or synchronously using the VideoProperties property if it is available.

You can get a VideoProperties object using any of the following methods and properties:

Note  Properties that are get or set using a property handler that is defined by another app (like Microsoft Word) may not be accessible. Instead, you can try to get these properties using a file query that is backed by the system index. For more information, see QueryOptions.

For more code samples about accessing properties, see the File access sample.

Examples

This example demonstrates how to retrieve properties of a file, including video properties like Year and Rating.



var file = SdkSample.sampleFile;
if (file !== null) {
    var outputDiv = document.getElementById("output");

    // Get video properties
    file.properties.getVideoPropertiesAsync().done(function (videoProperties) {
        outputDiv.innerHTML += "Year: " + videoProperties.year + "<br />";
        outputDiv.innerHTML += "Rating: " + videoProperties.rating + "<br />";
    },
    // Handle errors with an error function
	   function (error) {
	      // Handle errors encountered while retrieving properties
    });
}

After GetVideoPropertiesAsync completes, videoProperties gets a VideoProperties object.

In the example, file contains a StorageFile that represents the file to retrieve properties for.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8

Namespace

Windows.Storage.FileProperties
Windows::Storage::FileProperties [C++]

Metadata

Windows.winmd

See also

StorageItemContentProperties.getVideoPropertiesAsync method
Windows.Storage.BulkAccess.FileInformation.videoProperties property
Windows.Storage.BulkAccess.FolderInformation.videoProperties property
Windows.Storage.BulkAccess.IStorageItemInformation.VideoProperties property

 

 

Show:
© 2014 Microsoft