Windows phone 8 windows phone 8.1中的屏幕录制
我正在使用windows phone 8.1应用程序。此应用程序的工作是记录屏幕活动并将mp4文件存储在存储器中。我没有得到任何编译时错误。但是Windows phone 8 windows phone 8.1中的屏幕录制,windows-phone-8,windows-phone-8.1,video-recording,Windows Phone 8,Windows Phone 8.1,Video Recording,我正在使用windows phone 8.1应用程序。此应用程序的工作是记录屏幕活动并将mp4文件存储在存储器中。我没有得到任何编译时错误。但是 var screenCapture = ScreenCapture.GetForCurrentView(); 行返回我UnauthorizedAccessException。我已经为清单文件添加了麦克风和网络摄像头功能。我还尝试在页面构造函数中和从单独的类中调用此代码。我正在使用HTC 8x设备和Windows Phone 8.1操作系统 以下是我的
var screenCapture = ScreenCapture.GetForCurrentView();
行返回我UnauthorizedAccessException。我已经为清单文件添加了麦克风和网络摄像头功能。我还尝试在页面构造函数中和从单独的类中调用此代码。我正在使用HTC 8x设备和Windows Phone 8.1操作系统
以下是我的代码块:
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();}
我提到:
我也读过这篇文章:您还需要检查访问视频库的功能 希望这有帮助