VideoProperties 클래스

정의

항목의 비디오 관련 속성(예: 파일 또는 폴더)에 대한 액세스를 제공합니다.

public ref class VideoProperties sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
class VideoProperties final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public sealed class VideoProperties
Public NotInheritable Class VideoProperties
상속
Object Platform::Object IInspectable VideoProperties
특성
구현

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10240.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v1.0에서 도입되었습니다.)

예제

이 예제에서는 Year 및 Rating과 같은 비디오 속성을 포함하여 파일의 속성을 검색하는 방법을 보여 줍니다.

try
{
    StorageFile file = rootPage.sampleFile;
    if (file != null)
    {
        StringBuilder outputText = new StringBuilder();

        // Get video properties
        VideoProperties videoProperties = await file.Properties.GetVideoPropertiesAsync();
        outputText.AppendLine("Year: " + videoProperties.Year);
        outputText.AppendLine("Rating: " + videoProperties.Rating);
    }
}
// Handle errors with catch blocks
catch (FileNotFoundException)
{
 // For example, handle a file not found error
}

GetVideoPropertiesAsyncvideoProperties 완료되면 VideoProperties 개체를 가져옵니다.

이 예제 file 에서는 속성을 검색할 파일을 나타내는 StorageFile 을 포함합니다.

설명

항목의 Properties 속성(예: 폴더 파일)에서 getVideoPropertiesAsync 메서드를 사용하여 VideoProperties 개체에 비동기적으로 액세스하거나 VideoProperties 속성을 사용할 수 있는 경우 동기적으로 액세스할 수 있습니다. 다음 메서드 및 속성을 사용하여 VideoProperties 개체를 가져올 수 있습니다.

참고

다른 앱(예: Microsoft Word)에서 정의한 속성 처리기를 사용하여 가져오기 또는 설정된 속성에 액세스할 수 없습니다. 대신 시스템 인덱스에서 백업하는 파일 쿼리를 사용하여 이러한 속성을 가져올 수 있습니다. 자세한 내용은 QueryOptions를 참조하세요.

속성에 액세스하는 방법에 대한 자세한 코드 샘플은 파일 액세스 샘플을 참조하세요.

속성

Bitrate

비디오의 합계 오디오 및 비디오 비트 전송률을 가져옵니다.

Directors

비디오의 감독을 가져옵니다.

Duration

비디오의 기간을 가져옵니다.

Height

비디오의 높이를 가져옵니다.

Keywords

비디오와 연결된 키워드의 컬렉션을 가져옵니다.

Latitude

비디오가 촬영된 위도 좌표를 가져옵니다.

Longitude

비디오가 촬영된 경도 좌표를 가져옵니다.

Orientation

비디오를 올바르게 표시하기 위해 회전하는 방법을 나타내는 VideoOrientation 값을 가져옵니다.

Producers

비디오의 생산자를 가져옵니다.

Publisher

비디오의 게시자를 가져오거나 설정합니다.

Rating

비디오 파일과 연결된 등급을 가져오거나 설정합니다.

Subtitle

비디오의 부제목을 가져오거나 설정합니다.

Title

비디오 제목을 가져오거나 설정합니다.

Width

비디오의 너비를 가져옵니다.

Writers

비디오의 스크립트 작성기를 가져옵니다.

Year

비디오가 촬영되거나 출시된 연도를 가져오거나 설정합니다.

메서드

RetrievePropertiesAsync(IIterable<String>)

항목과 연결된 지정된 속성을 검색합니다.

SavePropertiesAsync()

항목과 연결된 모든 속성을 저장합니다.

SavePropertiesAsync(IIterable<KeyValuePair<String,Object>>)

항목과 연결된 지정된 속성 및 값을 저장합니다.

적용 대상

추가 정보