c# - I use the following code to capture image from camera. But I cant record the video by this -


cameracaptureui capture = new cameracaptureui();  capture.photosettings.format = cameracaptureuiphotoformat.jpeg;  capture.photosettings.croppedaspectratio = new size(1, 2);  capture.photosettings.maxresolution=cameracaptureuimaxphotoresolution.highestavailable  storagefile storefile=await capture.capturefileasync(cameracaptureuimode.photo);  if (storefile != null) {     var stream = await storefile.openasync(fileaccessmode.read);      bitmapimage bimage = new bitmapimage();      bimage.setsource(stream);      image imageitem = new image();      imageitem.source = bimage;      my_canvas.children.add(imageitem); 

just use standard sample recording video capture photos , video cameracaptureui

cameracaptureui captureui = new cameracaptureui(); captureui.videosettings.format = cameracaptureuivideoformat.mp4;  storagefile videofile = await captureui.capturefileasync(cameracaptureuimode.video);  if (videofile == null) { // user cancelled photo capture return; } 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -