本文主要是介绍windows media player 中播放pls的方法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
windows media player目前只能播放 wpl 和 asm格式的列表文件。而linux下mplayer和vlc支持的pls,很遗憾没法支持。
不过,老外写了个“open pls in wmp”的插件,安装后就可以播放了。就是这个OpenPlsInWmp2Setup.exe
http://openplsinwmp.codeplex.com/
看起来挺酷,不过看一下代码就知道原理很简单。
using System;
using System.IO;
namespace Jon.Galloway.Wrote.Me
{
class OpenPlsInWM
{
[STAThread]
static void Main(string[] args)
{
if (args.GetUpperBound(0) > -1)
{
string filename = args[0];
using (StreamReader sr = new StreamReader(filename))
{
string line;
while ((line = sr.ReadLine()) != null)
{
if (line.ToLower().StartsWith("file1="))
这篇关于windows media player 中播放pls的方法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!