从https url在WPF中播放媒体
我正在尝试播放azure blob存储中的视频。使用wpf媒体元素播放时出现异常:从https url在WPF中播放媒体,wpf,mediaelement,mediastream,Wpf,Mediaelement,Mediastream,我正在尝试播放azure blob存储中的视频。使用wpf媒体元素播放时出现异常: Exception thrown: 'System.NullReferenceException' in PresentationCore.dll An unhandled exception of type 'System.NullReferenceException' occurred in PresentationCore.dll Object reference not set to an insta
Exception thrown: 'System.NullReferenceException' in PresentationCore.dll An unhandled
exception of type 'System.NullReferenceException' occurred in PresentationCore.dll Object
reference not set to an instance of an object.
因为url
是Https
我用http
检查它是否工作正常
代码
它给出了一个异常您是否也可以添加代码?尝试从“mePlayer.play();”后面的代码播放时的代码这是一个例外
<MediaElement Source="https://************MEDIA FROM API******" LoadedBehavior="Manual" x:Name="mePlayer" Visibility="Hidden">
<MediaElement.ContextMenu>
<ContextMenu />
</MediaElement.ContextMenu>
<MediaElement.DataContext>
<Properties:Resources/>
</MediaElement.DataContext>
</MediaElement>
mePlayer.Play();