Hi there I am working on a piece of software similar to Power Point. To add a video I add a video slide then select browse to search for the video. Once the video is added you have the option of right clicking on that video and within the options will be edit video. Selecting edit video will bring up another page with a media element and a slide bar below it with play, pause, stop buttons. When I call the video editor class from the main window class the video path is definitely getting passed over correctly (I have stepped through and found this) It adds the video path to the media element source but it never loads as though the path was never passed over. Within the editor there is a browse button to add more videos and when I add videos this way they appear correctly with the media elements.
The VideoWindow is the class for the video editor.
public VideoWindow(Video __video, Roots __roots)
{
InitializeComponent();
_roots = __roots;
string videoFilePathFull = "";
foreach (string file in Directory.EnumerateFiles(_roots.RunTimeTemp, "*.mp4*", SearchOption.AllDirectories))
{
videoFilePathFull = file;
}
mediaElement1.Source = new Uri(videoFilePathFull, UriKind.Relative);
_staticVideo = __video;
_tempVideo.Path = videoFilePathFull;
initVideo();
}
The editVideoElement method is the method called within the main window
private void editVideoElement(object sender, RoutedEventArgs e) {
string __vidFileName = "";
DesignerItem __item = getSingleSelectedElement();
ComponentProperties __props = _slideFactory.GetComponentProperties(__item.Name);
__vidFileName = __props.Video.Path;
VideoWindow __slideVideo = new VideoWindow(__props.Video, roots);
__slideVideo.Owner = this;
__slideVideo.ShowDialog();
}