开发者

Need help for multiple playlist files in JWPlayer using query string

I have a single video page and many playlist files.

The problem is I don't know how to make the JWplayer's 'file' parameter a variable so it can read any of my playlist files. I have researched and have this and that bout flashvars and query strings, but I'm new to this and don't understand ho开发者_JAVA百科w it is done.

Are query strings even the right way to go, or is there a better way?

<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>


I found a solution using query string.

Placed this code in my headers...

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

Then I just used this line for the JWPplayer playlist...

'file': 'playlist/<%=strPar%>',

I can now use these links...

index.asp?playlist=0000001.xml

index.asp?playlist=0000002.xml

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜