i want to play an audio or video file, and i made this but i do not know how i can check whether media element is playing file or not? Like using same button for Pause and Play how i can know that media is also playing file or not? i use below code to play the file
mediaElement1.LoadedBehavior = MediaState.Manual;
mediaElement1.Source = new Uri("C:/test.wma", UriKind.RelativeOrAbsolute);
mediaElement1.Play();
And one more thing i know how to play file in media element by code. I want to to design media element UI. how i can design this for both video and audio files? what properties should enable and what should be disable.
Last I checked you can't unless you are using Silverlight:
http://msdn.microsoft.com/en-us/library/cc189079(v=vs.95).aspx
I have an application using .Net 4 and as far I can remember you cannot verify if it is playing, stopped, paused, etc.
This is what you can do with .Net 4:
http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement(v=vs.100).aspx
Compared with Silverlight:
http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement(v=vs.95).aspx
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.