如何在PHP中使用Flow Player的while循环? [英] How to use a while loop for Flow Player in php?
本文介绍了如何在PHP中使用Flow Player的while循环?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有来自服务器的视频。第一个视频播放器工作正常,但其余是空的不知道为什么这里是我现在有什么。
while($ row = mysql_fetch_assoc($ query12))
{
echo< a
href ='$ urls'
style ='display:block; width:520px;身高:330px'
id ='player'>
< / a>
< br />
< br />
这是用于Flow Player
< script>
flowplayer(player,{
src:flowplayer-3.2.16.swf,
wmode:opaque//这允许HTML隐藏Flash内容
},{
clip:{
autoPlay:false
}
});
< / script>
解决方案 您可以将 id 为一个 class
并且初始化瞄准类名称的玩家。
h2>
PHP / Html
while($ row = mysql_fetch_assoc($ query12))
{
echo< a
href ='$ urls'
style ='display:block; width:520px; height:330px '
class ='player'>
< / a>
< br />
< br />
$ / code $ / pre
$ b $ p $ / $>
< script>
flowplayer(a.player,{
src:flowplayer-3.2.16.swf,
wmode:opaque//这允许HTML隐藏Flash内容
},{
clip:{
autoPlay:false
}
});
< / script>
现在,您可以在您的页面上设置多个玩家。
I have videos that are coming from the server. The first video player works fine but the rest is empty not sure why here is what i have right now.
while($row = mysql_fetch_assoc($query12))
{
echo"<a
href='$urls'
style='display:block;width:520px;height:330px'
id='player'>
</a>
<br/>
<br/>";
}
And this is for the Flow Player
<script>
flowplayer("player", {
src:"flowplayer-3.2.16.swf",
wmode: "opaque" // This allows the HTML to hide the flash content
}, {
clip: {
autoPlay: false
}
});
</script>
解决方案 You can replace the id
for a class
and initialise the players targeting the class name.
Example
Php/Html
while($row = mysql_fetch_assoc($query12))
{
echo"<a
href='$urls'
style='display:block;width:520px;height:330px'
class='player'>
</a>
<br/>
<br/>";
}
JS
<script>
flowplayer("a.player", {
src:"flowplayer-3.2.16.swf",
wmode: "opaque" // This allows the HTML to hide the flash content
}, {
clip: {
autoPlay: false
}
});
</script>
This will now setup multiple players on your page.
这篇关于如何在PHP中使用Flow Player的while循环?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文