如何在 Windows Phone Silverlight 8.1 应用程序中将 Source 设置为 mediaElement?

How to SetSource to mediaElement in Windows Phone Silverlight 8.1 app?

我想用这个APIhttps://msdn.microsoft.com/en-us/library/windows/apps/xaml/br244338.aspx

但它有以下要求:支持的最低要求phone Windows Phone 8.1 [Windows 仅限运行时应用程序]

我的 phone 是 wp8.1,我正在使用 wp silverlight 8.1 进行开发。

请问 wpSilverlight8.1 中的等价物是什么?

我尝试使用 PickSingleFileAndContinue(),它工作正常,直到我获得视频,但我不知道如何获取流以便将流分配给我的 mediaElement。

谢谢

找到它并且有效!

    public async void ContinueFileOpenPicker(FileOpenPickerContinuationEventArgs args)
    {
        StorageFile file = args.Files[0];

        if (file.Name.EndsWith("mp4")) {
            IRandomAccessStream fileStream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read);
            mediaControl.SetSource(fileStream, file.ContentType);
        ...
        }

从这里得到灵感:https://msdn.microsoft.com/en-us/library/windows/apps/dn642086(v=vs.105).aspx