3

在默认模式下,jPlayer 播放列表显示在 jPlayer 控件下方。我想将它移动到页面上的另一个位置(在 2 列布局中的页面右侧,左侧有 jPlayer 控件/海报),但是当我将生成播放列表的代码移动到另一个位置时页,即

<div class="jp-playlist">
                    <ul>
                        <!-- The method Playlist.displayPlaylist() uses this unordered list -->
                        <li></li>
                    </ul>
                </div>

播放列表中没有显示任何内容。所以看起来这段代码需要包含在 jp_container_1 div 中。如果是这样,我怎样才能在我的页面右侧显示播放列表?

jPlayer 的完整标记如下:

<div id="jp_container_1" class="jp-video jp-video-270p">
            <div class="jp-type-playlist">
                <div id="jquery_jplayer_1" class="jp-jplayer"></div>
                <div class="jp-gui">
                    <div class="jp-video-play">
                        <a href="javascript:;" class="jp-video-play-icon" tabindex="1">play</a>
                    </div>
                    <div class="jp-interface">
                        <div class="jp-progress">
                            <div class="jp-seek-bar">
                                <div class="jp-play-bar"></div>
                            </div>
                        </div>
                        <div class="jp-current-time"></div>
                        <div class="jp-duration"></div>
                        <div class="jp-title">
                            <ul>
                                <li></li>
                            </ul>
                        </div>
                        <div class="jp-controls-holder">
                            <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-volume-bar">
                                <div class="jp-volume-bar-value"></div>
                            </div>
                            <ul class="jp-toggles">
                                <li><a href="javascript:;" class="jp-full-screen" tabindex="1" title="full screen">full screen</a></li>
                                <li><a href="javascript:;" class="jp-restore-screen" tabindex="1" title="restore screen">restore screen</a></li>
                                <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>
                </div>
                <div class="jp-playlist">
                    <ul>
                        <!-- The method Playlist.displayPlaylist() uses this unordered list -->
                        <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>
4

1 回答 1

0

jPlayer 的目标jp_container_1是渲染播放器和播放列表。你有几个选择:

  1. jp_container_1使用 CSS 定位重新排列元素的位置。

  2. 更改 jPlayer 中播放列表的目标元素add-on/jplayer-playlist.js

对于 jPlayer 2.2.0,jplayer-playlist.js > 第 39 行:

this.cssSelector.playlist = this.cssSelector.cssSelectorAncestor + " .jp-playlist";

改成:

this.cssSelector.playlist = this.cssSelector + " .jp-playlist";

如果你这样做,它会弄乱对 jPlayer 的多实例支持,这意味着你将只能拥有一个播放器实例,每页有一个播放列表。

于 2013-03-07T16:04:06.413 回答