How to know which video formats my WPF application can play?

前端 未结 1 479
耶瑟儿~
耶瑟儿~ 2021-01-13 15:28

I have a small application that allows the playback of videos. First off, I do not restrict the user to select particular types of file. What I want to do is make sure I can

相关标签:
1条回答
  • 2021-01-13 16:15

    Why don't you:

    1. Try to play it
    2. if you immediately get an error from the media element, it isn't supported.

    You could always make the media element hidden while you did this. This will be much more reliable than any attempt to pre-calculate what is and isn't supported.

    0 讨论(0)
提交回复
热议问题