1.添加引用 WebEye.StreamControl
Wpf代码
<Window x:Class="WpfApp2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:webEye="clr-namespace:WebEye.StreamControl.Wpf;assembly=WebEye.StreamControl.Wpf"
xmlns:local="clr-namespace:WpfApp2"
mc:Ignorable="d"
Title="MainWindow" Height="200" Width="300">
<Grid>
<webEye:StreamControl Name="play" Background="Black"/>
</Grid>
</Window>
后端代码
play.Stream = WebEye.Stream.FromUri(new Uri(_videoPath));
play.Stream.Start();