I am trying to Play video from https site into my media element throwing the following exception.
An exception of type 'System.NullReferenceException' occurred in PresentationCore.dll but was not handled in user code
Additional information: Object reference not set to an instance of an object.
This is my code in xmal
<MediaElement x:Name="mediaElement" LoadedBehavior="Manual" Stretch="Fill" Loaded="OnMediaElementLoaded" MediaOpened="MediaElement_OnMediaOpened" />
var uri = new Uri("https://f60b7719060a37f20253-4343910d3bf76239b8a83e4f56d17dc5.ssl.cf2.rackcdn.com/mov-2015-06-07-22-08-09-391574e61009867cfcb1a1641639b39e55c8a34c.mp4", UriKind.RelativeOrAbsolute);
mediaElement.Source = uri;
mediaElement.Play();//Getting exception here.
Any help please? I also tried the same using the some other http.