Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
Accessing only the video not the auto stream for scanning QR Codes
Browse files Browse the repository at this point in the history
  • Loading branch information
COM8 committed Aug 23, 2019
1 parent c3a9505 commit ae0c490
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
8 changes: 4 additions & 4 deletions UWP XMPP Client/Controls/Omemo/QRCodeReaderControl.xaml.cs
@@ -1,9 +1,9 @@
using Logging;
using Microsoft.Toolkit.Uwp.Helpers;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Logging;
using Microsoft.Toolkit.Uwp.Helpers;
using Windows.Graphics.Display;
using Windows.Graphics.Imaging;
using Windows.Media.Capture;
Expand All @@ -15,7 +15,7 @@

namespace UWP_XMPP_Client.Controls.Omemo
{
public sealed partial class QRCodeReaderControl : UserControl
public sealed partial class QRCodeReaderControl: UserControl
{
//--------------------------------------------------------Attributes:-----------------------------------------------------------------\\
#region --Attributes--
Expand Down
8 changes: 7 additions & 1 deletion UWPX_UI/Controls/QrCodeScannerControl.xaml.cs
Expand Up @@ -50,7 +50,13 @@ public async Task StartCameraAsync()
try
{
camera = new MediaCapture();
await camera.InitializeAsync();

MediaCaptureInitializationSettings settings = new MediaCaptureInitializationSettings()
{
StreamingCaptureMode = StreamingCaptureMode.Video
};

await camera.InitializeAsync(settings);

displayRequest.RequestActive();
}
Expand Down
1 change: 0 additions & 1 deletion UWPX_UI/Package.appxmanifest
Expand Up @@ -41,6 +41,5 @@
<Capability Name="privateNetworkClientServer" />
<uap:Capability Name="picturesLibrary" />
<DeviceCapability Name="webcam" />
<DeviceCapability Name="microphone" />
</Capabilities>
</Package>

0 comments on commit ae0c490

Please sign in to comment.