How to use Front-facing camera to take pictures on windows phone? -


i've got 2 questions how access camera on windows phone 8:

  1. how can access front-facing camera take pictures?
  2. how can access flash/torch of main camera?

this article msdn has example of both accessing front , cameras, accessing flash, assuming using c# (since didn't specify). here's snippet under creating capture device heading:

system.collections.generic.ireadonlylist<windows.foundation.size> supportedresolutions =     photocapturedevice.getavailablecaptureresolutions(camerasensorlocation.front); windows.foundation.size res = supportedresolutions[0]; this.capturedevice = await photocapturedevice.openasync(camerasensorlocation.front, res); 

for accessing flash of camera, here snippet under specifying camera properties heading:

cam.setproperty(knowncameraphotoproperties.flashmode, flashstate.on); cam.setproperty(knowncamerageneralproperties.playshuttersoundoncapture, true); cam.setproperty(knowncamerageneralproperties.autofocusrange, autofocusrange.infinity); 

hope helps!


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -