我为什么要安装Windows Media Player?我的应用程序可以播放音频文件吗? [英] Why shall i install Windows Media Player To my app can play the audio files ?

查看:111
本文介绍了我为什么要安装Windows Media Player?我的应用程序可以播放音频文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为什么要在我的应用程序中安装Windows Media Player才能播放音频文件?

我在WPF中使用C#创建了一个音频播放器,并且使用了Media Element,但是我使用WMP.dll对其进行了更改,因为我希望它能够在不需要安装Windows Media Player或任何其他编解码器的情况下工作,但是现在如果我从Windows上卸载了Windows Media Player pc.

我收到Visual C#找不到的错误

Why shall i install Windows Media Player To my app can play the audio files ?

i created an audio player with C# in WPF and i used Media Element but i changed it with WMP.dll because i want it work without needed to Windows media player is installed or any other codecs, but now if i uninstalled Windows media player from my pc.

i get error that Visual C# can`t find

WMPLib.WindowsMediaPlayer



我还从我的电脑上卸载了Windows Media Player之前,将WMP.dll添加到了项目中.

反正在那里解决这个问题?

我希望我的应用程序无需安装Windows Media Player即可播放音乐文件,我只想使用.DLL文件.

有什么建议吗?

对不起,我的英语不好....



also i added the WMP.dll to the project before i uninstall the Windows media player from my pc .

dose there anyway to fix this ?

i want my app to play music files without require to windows media player in installed , i wanna use only .DLL files.

any advice tho ?

sorry for my bad English ....

推荐答案

因为WPF使用mediaplayer,而媒体播放器使用编解码器.如果删除它们,则无法播放任何内容.编解码器的大小可能很大,因为实际上有很多编解码器.我认为,这就是WPF自身不包含播放器的原因.
Because WPF uses mediaplayer and media players uses codecs. If you remove them you cannot play anything. Codecs can be huge in size as there are, literally, a lot of them. I think that''s the reason WPF does not includes a player on its own.


这篇关于我为什么要安装Windows Media Player?我的应用程序可以播放音频文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆