8.0 相机和照片: 通过 AudioVideoCaptureDevice 捕获视频和音频
介绍
与众不同 windows phone 8.0 之 相机和照片
通过 AudioVideoCaptureDevice 捕获视频和音频
示例
演示 AudioVideoCaptureDevice(wp8)的应用
CameraAndPhoto/AudioVideoCaptureDeviceDemo.xaml
<phone:PhoneApplicationPage x:Class="Demo.CameraAndPhoto.AudioVideoCaptureDeviceDemo" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" SupportedOrientations="Portrait" Orientation="Portrait" mc:Ignorable="d" shell:SystemTray.IsVisible="True"> <Grid x:Name="LayoutRoot" Background="Transparent"> <StackPanel> <StackPanel Orientation="Horizontal"> <Canvas Width="240" Height="180" RenderTransformOrigin="0.5 0.5"> <Canvas.Background> <VideoBrush x:Name="videoBrush" /> </Canvas.Background> <Canvas.RenderTransform> <RotateTransform x:Name="rt" /> </Canvas.RenderTransform> </Canvas> <MediaElement Name="mediaElement" Width="240" Height="180" /> </StackPanel> <StackPanel Orientation="Horizontal" Margin="0 50 0 0"> <Button Name="btnCapture" Content="录像" Click="btnCapture_Click" /> <Button Name="btnStop" Content="停止" Click="btnStop_Click" IsEnabled="False" /> <Button Name="btnPlay" Content="播放" Click="btnPlay_Click" /> </StackPanel> <TextBlock x:Name="lblMsg" TextWrapping="Wrap" Margin="0 10 0 0" /> </StackPanel> </Grid> </phone:PhoneApplicationPage>
以上是小编为您精心准备的的内容,在的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索windows
, 视频
, 相机
, 音频
, 照片
phone
windows phone、windowsphone、windows phone 10、windowsphone手机、windowsphone应用商店,以便于您获取更多的相关知识。
时间: 2024-10-06 12:48:04