lundi 1 décembre 2014

Screen recording in windows phone 8.1


Vote count:

0




I am working on an windows phone 8.1 application. Work of this app is to record screen activities and store mp4 file in storage. I do not get any compile time error. But



var screenCapture = ScreenCapture.GetForCurrentView();


line returns me UnauthorizedAccessException. I have already added capabilities for Microphone and Webcam to manifest file. I have also tried calling this code in page constructor and from separate class. I am using HTC 8x device with Windows Phone 8.1 OS


Following is my code block :



async private void Button_Tapped(object sender, TappedRoutedEventArgs e)
{
var screenCapture = ScreenCapture.GetForCurrentView();

mediaCapture = new MediaCapture();
await mediaCapture.InitializeAsync(new MediaCaptureInitializationSettings
{
VideoSource = screenCapture.VideoSource,
AudioSource = screenCapture.AudioSource,
});

var file = await KnownFolders.VideosLibrary.CreateFileAsync("screenrecording.mp4", CreationCollisionOption.ReplaceExisting);
await mediaCapture.StartRecordToStorageFileAsync(MediaEncodingProfile.CreateMp4(VideoEncodingQuality.Auto), file);

//sr.StartRecording();}


asked 52 secs ago







Screen recording in windows phone 8.1

Aucun commentaire:

Enregistrer un commentaire