How to use Front-facing camera to take pictures on windows phone? -
i've got 2 questions how access camera on windows phone 8:
- how can access front-facing camera take pictures?
- 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
Post a Comment