原因和解决办法
如果恰好使用了MediaElement,在调用的时候,会出现空异常
var uri = new Uri("https://xxxx.mp4", UriKind.RelativeOrAbsolute); mediaElement.Source = uri; mediaElement.Play();//Getting exception here.
因为MediaElement不支持https,所以尽量使用http或者把视频下载下来
参考链接
https://stackoverflow.com/questions/30702505/playing-media-from-https-site-in-media-element-throwing-null-reference-exception?noredirect=1&lq=1#comment49463119_30702505
标签:media,实列,Source,https,MediaElement,30702505,WPF From: https://www.cnblogs.com/yinghualuowu/p/16815698.html