2

我有一个视频页面和许多播放列表文件。

问题是我不知道如何使 JWplayer 的“文件”参数成为变量,以便它可以读取我的任何播放列表文件。我已经研究过并且有关于 flashvars 和查询字符串的这个和那个,但我是新手,不明白它是如何完成的。

查询字符串是正确的方法,还是有更好的方法?

<script type="text/javascript">
    jwplayer('container').setup({
        'file': 'playlist/0000001.xml',
        'flashplayer': 'player/player.swf',
        'skin': 'skins/glow.zip',
        'width': '640',
        'height': '600',
        'controlbar': 'bottom',
        'playlist.position': 'bottom',
        'playlist.size': '240'
    });
</script>
4

1 回答 1

1

我找到了使用查询字符串的解决方案。

将此代码放在我的标题中...

<%
    Dim strPar
    If Request.QueryString("playlist") = "" Then
        strPar = "0000009.xml"
    Else
        strPar = Request.QueryString("playlist")
    End If
%>

然后我只是将这一行用于 JWPplayer 播放列表......

'文件': '播放列表/<%=strPar%>',

我现在可以使用这些链接...

index.asp?playlist=0000001.xml

index.asp?playlist=0000002.xml

index.asp?playlist=0000003.xml 等...

于 2011-10-15T01:13:41.060 回答