Windows 8 App의 경우 C#/Xaml에서 Launcher.LaunchFileAsync를 사용하여 컴퓨터에서 미디어 플레이어로 비디오를 시작하겠습니다.LaunchFileAsync를 사용하여 uri에서 비디오를 시작할 수 없습니다.
나는 URL에서 비디오 파일을 가지고 있고이 코드를 사용하고 있습니다 : 이것은
var uri = new Uri(myUrl,UriKind.RelativeOrAbsolute);
var file = await StorageFile.CreateStreamedFileFromUriAsync("aaa", uri, RandomAccessStreamReference.CreateFromUri(uri));
if (file != null)
{
// Launch the retrieved file
var success = await Windows.System.Launcher.LaunchFileAsync(file);
if (success)
{
// File launched
}
else
{
// File launch failed
}
}
else
{
// Could not find file
}
실제로 LaunchFileAsync의 문서에서 샘플 코드입니다. 내게는 좋았지 만 성공은 항상 거짓입니다. 이유가 궁금하십니까? URL의 동영상에 LaunchFileAsync를 사용할 수 있습니까? 다른 방법이 있습니까?