1

Trying to find a way to get a playlist for jPlayer to stream audio or video.

This page showed the way to have a playlist for jPlayer but that is not for streaming purpose while this page showed the way to stream an audio.

Just cannot find a way.. and I think there is no code to paste here as a playlist for non-streaming media and a way to stream media can't go together.

Any way out there?

4

1 回答 1

0

我在这里遇到了和大卫一样的问题:昨天它没有工作(当我点击播放或点击播放列表中的标题时没有发生任何事情),但今天它奇迹般地按预期工作。在此过程中,我尝试了无数不同的参数组合,但这几乎是最简单的方法,我昨天一定首先尝试过。

这是现在对我有用的完整代码。我希望你能发现你的方法有什么不同,这可能会导致你观察到的任何错误。

<!DOCTYPE html>
<html dir="ltr" lang="en-US">
<head>
<meta charset="UTF-8" />
<title>Your Siblings – Left Embed on Event Page</title>
<link rel="stylesheet" type="text/css" media="all" href="style.css" />
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'></script>
<link href="jPlayer/skin/jplayer.blue.monday.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jPlayer/jquery.jplayer.min.js"></script>
<script type="text/javascript" src="jPlayer/add-on/jplayer.playlist.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    var playlist = [
        {
            "title": "Fractured Frequencies",
            "mp3": "http://radio.ponyvillelive.com:8032/stream?sid=1;stream.nsv"
        },
        {
            "title": "Brony Radio",
            "mp3": "http://dj.bronyradio.com:8000/stream?sid=1;stream.nsv"
        },
        {
            "title": "Alicorn Radio",
            "mp3": "http://radio.ponyvillelive.com:8008/stream?sid=1;stream.nsv"
        },
        {
            "title": "Fillydelphia Radio",
            "mp3": "http://listen.fillyradio.com:8000/;stream.nsv"
        },
        {
            "title": "Luna Radio",
            "mp3": "http://radio.ponyvillelive.com:8002/stream?sid=1;stream.nsv"
        },
        {
            "title": "Everypony Radio",
            "mp3": "http://denver5.yourstreamnow.com:8071/;stream.nsv"
        },
        {
            "title": "Ponyville FM",
            "mp3": "http://radio.ponyvillelive.com:8014/stream?sid=1;stream.nsv"
        },
        {
            "title": "Sonic RadioBoom",
            "mp3": "http://radio.ponyvillelive.com:8020/stream?sid=1;stream.nsv"
        }
    ];
    new jPlayerPlaylist({
        jPlayer: "#jquery_jplayer_1",
        cssSelectorAncestor: "#jp_container_1"
    }, playlist, {
        swfPath: "jPlayer",
        supplied: "mp3",
        wmode: "window",
        preload: "none",
        keyEnabled: true
    });
});
</script>
</head>
<body>
<div id="viewer">

<div id="jquery_jplayer_1" class="jp-jplayer"></div>

<div id="jp_container_1" class="jp-audio">
    <div class="jp-type-playlist">
        <div class="jp-gui jp-interface">
            <ul class="jp-controls">
                <li><a href="javascript:;" class="jp-previous" tabindex="1">previous</a></li>
                <li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li>
                <li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li>
                <li><a href="javascript:;" class="jp-next" tabindex="1">next</a></li>
                <li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li>
                <li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li>
                <li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li>
                <li><a href="javascript:;" class="jp-volume-max" tabindex="1" title="max volume">max volume</a></li>
            </ul>
            <div class="jp-progress">
                <div class="jp-seek-bar">
                    <div class="jp-play-bar"></div>

                </div>
            </div>
            <div class="jp-volume-bar">
                <div class="jp-volume-bar-value"></div>
            </div>
            <div class="jp-current-time"></div>
            <div class="jp-duration"></div>
            <ul class="jp-toggles">
                <li><a href="javascript:;" class="jp-shuffle" tabindex="1" title="shuffle">shuffle</a></li>
                <li><a href="javascript:;" class="jp-shuffle-off" tabindex="1" title="shuffle off">shuffle off</a></li>
                <li><a href="javascript:;" class="jp-repeat" tabindex="1" title="repeat">repeat</a></li>
                <li><a href="javascript:;" class="jp-repeat-off" tabindex="1" title="repeat off">repeat off</a></li>
            </ul>
        </div>
        <div class="jp-playlist">
            <ul>
                <li></li>
            </ul>
        </div>
        <div class="jp-no-solution">
            <span>Update Required</span>
            To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
        </div>
    </div>
</div>

</div>
</body>
</html>
于 2013-07-14T12:33:27.190 回答