如何在 Windows Phone Silverlight 8.1 应用程序中将 TSource 设置为 mediaEl



我想使用此 API https://msdn.microsoft.com/en-us/library/windows/apps/xaml/br244338.aspx

但它有这个要求:最低支持的手机 Windows Phone 8.1 [仅限 Windows 运行时应用程序]

我的手机是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

最新更新