Gordonium
Gordonium

Reputation: 3497

Why can't I use the Windows.Phone.Media.Capture namespace?

I'm attempting to use the AudioVideoCaptureDevice namespace in my application however I can't seem to locate the namespace. My guess is that I'm missing an assembly reference but I'm unsure if this should be required. I'm using Visual Studio 2015 and building against the Windows Phone 8.1 SDK.

enter image description here

enter image description here

enter image description here

enter image description here

Upvotes: 1

Views: 828

Answers (1)

Mateusz
Mateusz

Reputation: 91

AudioVideoCaptureDevice is available for use in Windows Phone Silverlight 8.1 Apps. You created Windows Phone 8.1 Store App which uses WinRT API.

Your main two options are:

  1. Create new project and use Windows Phone Silverlight 8.1
  2. Leave your project as it is but use MediaCapture class of Windows.Media.Capture namespace instead of AudioVideoCaptureDevice

There is code sample available here. It demonstrates how to use Media Capture API in Window Store App (it is for Windows 8.1 not for Windows Phone 8.1 but large part of API is shared between them and as such, this can be adapted for use in Windows Phone 8.1 App).

You might also want to read more about this subject because there are more differences between these two APIs.

Upvotes: 5

Related Questions