I am trying to set the video source in XAML code, the video is not playing:
<MediaElement x:Name="bgvideo" Width="800" Height="600"Source="/Videos/BG_LOOP_BIG.wmv" />
Therefore, I am trying to set the video source to codebehind, which also does not play.
bgvideo.Source = new Uri(@"pack://application:,,,/Videos/BG_LOOP_BIG.wmv", UriKind.Absolute);
or
bgvideo.Source = new Uri(@"/Videos/BG_LOOP_BIG.wmv");
It just plays when the absoulte video source:
bgvideo.Source = new Uri(@"C:\SomeFolder\Videos\BG_LOOP_BIG.wmv");
How to set a video source with a relative source?
source
share