Javascript 如何在 html 页面上插入 m3u 播放列表?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6871571/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-23 23:34:21 来源:igfitidea点击:
How do I insert an m3u playlist on a html page?
提问by Akila
I want to play a m3u file songs in a player
我想在播放器中播放 m3u 文件歌曲
I am using the following player, but it's not playing:
我正在使用以下播放器,但没有播放:
<OBJECT ID="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab# Version=5,1,52,701" STANDBY="Loading Microsoft Windows? Media Player components..." TYPE="application/x-oleobject" width="280" height="46">
<param name="fileName" value="songs/songs/1990/1990/enthiran/test1.m3u">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="autoStart" value="true">
<param name="showControls" value="true">
<param name="Volume" value="-300">
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="songs/1990/1990/enthiran/001Saravanapoigayel.mp3" name="MediaPlayer1" width=280 height=46 autostart=1 showcontrols=1 volume=-300>
</OBJECT>
回答by Balaji Kandasamy
This example code will be useful to you. Check it.
此示例代码对您很有用。核实。
Add your playlist location like <param name="fileName" value="YOUR PLAYLIST LOCATION URL">
添加您的播放列表位置,例如 <param name="fileName" value="YOUR PLAYLIST LOCATION URL">
<OBJECT ID="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab# Version=5,1,52,701" STANDBY="Loading Microsoft Windows? Media Player components..." TYPE="application/x-oleobject" width="280" height="46">
<param name="fileName" value="http://www.domain.com/music/music.m3u">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="autoStart" value="true">
<param name="showControls" value="true">
<param name="Volume" value="-300">
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://www.domain.com/music/music.m3u" name="MediaPlayer1" width=280 height=46 autostart=1 showcontrols=1 volume=-300>
</OBJECT>