c# - System.NotSupportedException while calling captureSource.Start() in wp8 -


system.notsupportedexception: specified method not supported i'm getting error while calling start method of capturesource record video on windows phone 8.

below code :

if (capturesource.videocapturedevice != null                     && capturesource.state == capturestate.started)                 {                     capturesource.stop();                     //updateui(buttonstate.recording, "initializing...");                      //create dir if not exist                     if (!isolatedstoragefile.getuserstoreforapplication().directoryexists(filelocation))                         isolatedstoragefile.getuserstoreforapplication().createdirectory(filelocation);                      datetime thedate = datetime.now;                     isovideofilename = thedate.tostring("yyyymmdd") + "_" + thedate.tostring("hhmmss") + "_" + "video" + "." + globaldto.videoformat;                      // connect input , output of filesink.                     capturesource = new capturesource();                     capturesource.capturefailed += new eventhandler<exceptionroutedeventargs>(oncapturefailed);                     capturesource.captureimagecompleted += capturesource_captureimagecompleted;                      filesink.capturesource = capturesource;                     filesink.isolatedstoragefilename = filelocation + isovideofilename;                 }                  // begin recording.                 if (capturesource.videocapturedevice != null                     && capturesource.state == capturestate.stopped)                 {                     videorecorderbrush.setsource(capturesource);                      capturesource.start();                     capturesource.captureimageasync();                 }                  // set button states , message.                 updateui(buttonstate.recording, "recording..."); 

that feature may not supported on phones? maybe why getting exception. should catch exception , handle in appropriate way inform user functionality not supported.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -