[英]How to scan a QR code in a Windows Phone 8.1 App? (not silverlight app)?
[英]How to SetSource to mediaElement in Windows Phone Silverlight 8.1 app?
我想使用此API https://msdn.microsoft.com/zh-cn/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/zh-cn/library/windows/apps/dn642086(v=vs.105).aspx
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.