需要使用查询字符串在 JWPlayer 中获取多个播放列表文件的帮助
我有一个视频页面和许多播放列表文件。
问题是我不知道如何使 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>
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 how 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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了使用查询字符串的解决方案。
将此代码放在我的标题中...
然后我只是将这一行用于 JWPplayer 播放列表...
'file': 'playlist/<%=strPar%>',
我现在可以使用这些链接...
index.asp?playlist=0000001.xmlindex.asp
?playlist=0000002.xmlindex.asp
?playlist=0000003.xml等...
I found a solution using query string.
Placed this code in my headers...
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...