2011-04-11 68 views
3

我正在使用flowpalyer播放视频。我正在尝试将png图像显示为开始图像,而不是普通的黑屏。但对于某些原因,它不起作用任何人都可以帮助我,我认出了什么问题显示一个图像作为使用流水游戏的第一帧并点击图像播放视频

<script type="text/javascript" src="http://brianhaskins.com/protege/flowplayer-3.2.2.min.js"></script> 

<div style="width: 290px; padding-bottom: 0px;" id="optin"> 
<div style="width:264px;height:198px;border:1px solid red;"> 
<a href="http://brianhaskins.com/blogvideo/blogoptinfinal/blogoptinfinal.mp4" 
style="display:block;width:290px;height:171px;"  id="player"> </a> 
<script language="JavaScript"> 
flowplayer("player", "http://brianhaskins.com/protege/flowplayer-3.2.2.swf"{ 

    // here is our playlist with two clips 
    playlist: [ 

     // this first PNG clip works as a splash image 
     { 
      url: 'http://brianhaskins.com/blogvideo/blogoptinfinal/FirstFrame.png', 
      scaling: 'orig' 
     }, 

     // second clip is a video. when autoPlay is set to false the splash screen will be shown 
     { 
      url: 'http://brianhaskins.com/blogvideo/blogoptinfinal/blogoptinfinal.mp4', 
      autoPlay: false, 

      // video will be buffered when splash screen is visible 
      autoBuffering: true 
     } 
    ] 
});</script> 
</div> 
+0

JWPlayer有一个选项,可以在视频加载时显示图像。也许Flowplayer有类似的东西?将图像设置为播放列表项目会更有意义。 (可能这个功能并不存在,不过我不太了解Flowplayer。) – 2011-04-11 09:56:14

+1

http://flowplayer.org/demos/configuration/playlist-splash.html。我从他上面的地址 – Prady 2011-04-11 10:13:19

+0

得到他啊,够公平的。那么这是我猜想的正式方式。 – 2011-04-11 10:20:37

回答

2

这是我使用的代码。希望它有助于其他人处于我的位置

</script><script type="text/javascript" src="http://brianhaskins.com/protege/flowplayer-3.2.2.min.js"></script> 

<div style="width: 271px; padding-bottom: 0px;border:3px solid #ccc;margin:0 auto" id="optin"> 
<div style="width:264px;height:198px;margin:0 auto"> 
<a href="http://brianhaskins.com/blogvideo/blogoptinfinal/blogoptinfinal.mp4" style="display:block;width:264px;height:198px;z-index:300" id="player"> </a> 
<script language="JavaScript"> 
    flowplayer("player", "http://brianhaskins.com/protege/flowplayer-3.2.2.swf",{ 

// here is our playlist with two clips 
playlist: [ 

    // this first PNG clip works as a splash image 
    { 
     url: 'http://brianhaskins.com/blogvideo/blogoptinfinal/FirstFrame.jpg', 
     scaling: 'orig' 
    }, 

    // second clip is a video. when autoPlay is set to false the splash screen will be shown 
    { 
     url: 'http://brianhaskins.com/blogvideo/blogoptinfinal/blogoptinfinal.mp4', 
     autoPlay: false, 

     // video will be buffered when splash screen is visible 
     autoBuffering: true 
    } 
] 
});</script> 
相关问题