1

I use flash player - flowplayer. and after using this player i need to remove it from my page. I use method unload(), but it does nothing. I tried to find question of this problem but find only this. But there are no aswers. Here we see that variable fp is steel exist

4

1 回答 1

3

通过查看有关事件的flowplayer 文档,unload它指出:

卸载:卸载播放器 Flash 组件并将其替换为容器元素的原始 HTML 内容。如果容器中没有 HTML,则此方法不执行任何操作。

您的示例不起作用,因为您的容器中没有任何内容。通常这是一个图像(启动画面)。用户点击图像开始播放视频,播放器被加载。最后卸载播放器,然后删除播放器并替换图像。

我在这里创建了一个工作演示。

例子

<a href="http://pseudo01.hddn.com/vod/demo.flowplayervod/flowplayer-700.flv" 
   class="player"
   style="display:block;width:425px;height:300px;margin:10px auto"
   id="player">
    <!-- splash image inside the container -->
    <img src="/media/img/home/flow_eye.jpg"
         alt="Search engine friendly content" />
</a>

$f("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.16.swf", {
    onFinish: function() {            
        this.unload();
    } 
});
于 2013-11-14T16:06:15.087 回答