8.24.2012

Difference between MediaPlayer and MediaElement

Difference between MediaPlayer and MediaElement
S.No
MediaPlayer
MediaElement
1 MediaPlayer has no visual interface and not suitable to display videos. MediaElement has got visual interface and can easily display videos using its built in properties.
2
It cannot be placed on the XAML designer.
It is designed for XAML use and can be placed on the XAML designer.
3
It provides Media PlayBack for drawings.
It does not provide Media PlayBack for drawings.
Example:
 
MediaPlayer player = new MediaPlayer();
player.Open(new Uri("c:\\intro.wmv", UriKind.Relative));
VideoDrawing aVideoDrawing = new VideoDrawing();
aVideoDrawing.Rect = new Rect(0, 0, 100, 100);
aVideoDrawing.Player = player;
splayer.Play();

No comments:

Post a Comment