Flowplayer没有显示音频播放器

时间:2011-02-22 15:48:49

标签: html flowplayer

我想在html页面中播放视频和音频。我有点视频工作正常,但音频没有出现。任何帮助将不胜感激

http://www.wholesalewealthmachine.com/abc/

        <div id="video" style="border: 1px solid rgb(204, 204, 204); width: 490px; height: 385px; margin:0 auto;">
                    <a  href="http://wholesaletoriches.com/newthankyouvideos/wwm new thankyou final/wwm new thankyou final.mp4"     style="display:block;width:470px;height:365px;padding:10px;"    id="player"> </a>
                                         <script type="text/javascript">
                                         flowplayer("player", "flowplayer-3.2.2.swf",{
                                        plugins: {
                                            controls: null

                                            },                                              
                                                canvas: {backgroundColor: '#ffffff',backgroundGradient: "none"}
                                                ,
                                        clip: {
                                            url: 'http://wholesaletoriches.com/newthankyouvideos/wwm new thankyou final/wwm new thankyou final.mp4'
                                            },
                                            onLoad: function() {
                                            this.setVolume(100);
                                            }}
                                            );
                                            </script> 

    </div>

    <div id="audio" style="width:750px;height:30px;display:block">
<a href="http://releases.flowplayer.org/data/fake_empire.mp3" style="display:block" id ="player1"></a>
<script language='javascript'>

  $f("audio", "http://releases.flowplayer.org/swf/flowplayer-3.2.6.swf", {

// fullscreen button not needed here
plugins: {
    controls: {
        fullscreen: false,
        height: 30,
        autoHide: false
    }
},

clip: {
    autoPlay: false,

    // optional: when playback starts close the first audio playback
    onBeforeBegin: function() {
        $f("player").close();
    }
}

   });
   </script>
</div>  

3 个答案:

答案 0 :(得分:2)

你需要从中获取Flowplayer Audio插件 http://flowplayer.org/plugins/streaming/audio.html

然后将其添加到插件参数

plugins:{  audio:  { url: "http:/yourpathtotheaudioplugin/flowplayer.audio.swf"}  }

答案 1 :(得分:1)

感谢GraemeLeighfield http://flowplayer.org/forum/2/47848

$ f不起作用。而不是使用$ f使用flowplayer。所以看起来应该是这样的:

flowplayer(“audio”,“http://releases.flowplayer.org/swf/flowplayer-3.2.6.swf”,{...

大约一年前在Flowplayer论坛上报告了这个问题和修复。 (参见链接)据我所知,Flowplayer的开发人员还没有更新他们的文档。我和Graeme有同样的问题。他发布的修复程序为我解决了这个问题。

答案 2 :(得分:0)

我在网站上工作时遇到了麻烦。最好是从flowplayer下载代码并将其加载到服务器上。

音频部分:http://flash.flowplayer.org/plugins/streaming/audio.html滚动到页面底部,然后下载3个文件     flowplayer.audio-3.2.10.swf
    flowplayer.audio-3.2.10.zip
    flowplayer.audio-3.2.10-src.zip

将它们放在根目录中。(例如)Flow-Player-Audio

将此脚本置于头部

<script type="text/javascript"
  src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js">
</script>

<script src="http://www.domain.com/Flow-Player-Audio/flowplayer-3.2.6.min.js"></script>



<!-- set up player container  -->
<a id="mb" style="display:block;width:250px;height:30px;"
href="http://www.domain.com/audio/something.mp3 or mp4"></a>

<script type="text/javascript">
// install flowplayer into container
$f("mb", "http://www.domain.com/Flow-Player-Audio/flowplayer-3.2.7.swf", {

// fullscreen button not needed here
plugins: {
    controls: {
        fullscreen: false,
        height: 30,
        width: 250,
        autoHide: false
    }
},

clip: {
    autoPlay: false,
    // optional: when playback starts close the first audio playback
    onBeforeBegin: function() {
        $f("player").close();
    }

   }

 });
</script>

视频

下载 http://flash.flowplayer.org/download/

抓下载ZIP和源代码

放在服务器上的swf文件中

脚本文件

      <!-- 1. jquery library -->
     <script type="text/javascript"
      src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js">
     </script>

     <!-- 2. flowplayer -->
     <script type="text/javascript" src="js/flowplayer.js"></script>

     <!-- 3. skin -->
     <link rel="stylesheet" type="text/css" href="skin/minimalist.css" />

然后只需添加您的视频标记。