I would suggest trying another MediaElement
in which you hook the MediaOpened
event and switch the element into view once it's fired. Make sure that you call Stop()
on the prior element to ensure that it stops playing and is cleaned up.
WPF mediaElement source switching
سؤال
I am planning to play a certain video using MediaElement
. If the user presses a button->that video is switched to a different one and plays. Thing is, whenever I change the mediaElement.Source
to the second video(and then play it), there are a few seconds of a black screen indicating the process of switching the videos. How can I achieve the effect that the videos switch right away? instead of the delayed screen.. Perhaps using several MediaElement
s? Thanks in advance for any light on that matter.
المحلول
لا تنتمي إلى StackOverflow