首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Flowplayer控件: autoHide和autoPlay

Flowplayer控件: autoHide和autoPlay
EN

Stack Overflow用户
提问于 2011-11-16 19:29:41
回答 1查看 9.5K关注 0票数 1

我无法让我的播放器自动启动或控件自动隐藏。我相信我的设置是正确的,但它只是不起作用。下面是我的整个脚本标记:

代码语言:javascript
复制
<script type="text/javascript">
    // wait for the DOM to load using jQuery
    $(function() {

        // setup player normally
        $f("videoPlayer", "videos/flowplayer-3.2.7.swf", {

            // clip properties common to all playlist entries
            clip: {
                autoPlay: false,
                autoBuffering: true,
                baseUrl: 'http://thepartysource.com/videos/',
                subTitle: '',
                time: '' 
            },

            // our playlist
            playlist: [
                {
                    url: 'DRINK DIFFERENTLY - 480x272.m4v',
                    autoPlay: true
                },
                {
                    url: 'DRINK DIFFERENTLY - 480x272.m4v'
                }
            ],

            // show playlist buttons in controlbar
            plugins: {
                controls: {
                    playlist: true,

                    // display properties such as size, location and opacity
                    top: 20,
                    left: 0,
                    bottom: 0,
                    opacity: 0.95,

                    // styling properties (will be applied to all plugins)
                    background: '#000', // url(/my/custom/controls.png) no-repeat 3px 6px',
                    backgroundGradient: 'low',

                    // controlbar specific settings
                    timeColor: '#980118',
                    all: false,
                    play: false,
                    scrubber: true,
                    fullscreen: true,

                    // tooltips (since 3.1)
                    tooltips: {
                        buttons: false,
                        //fullscreen: 'Enter fullscreen mode'
                    },

                    autoHide: {
                        enabled: true,

                        // always enable
                        fullsccreenOnly: false,

                        // make it hide faster
                        hideDelay: 1000,

                        mouseOutDelay: 500
                    }
                }
            }
        });

        /*
            here comes the magic plugin. It uses first div.clips element as the 
            root for as playlist entries. loop parameter makes clips play
            from the beginning to the end.
        */
        $f("videoPlayer").playlist("div.clips:first", {loop:true});
    });

</script>

以下是HTML区域:

代码语言:javascript
复制
<div class="box-movie">
    <!-- the player using splash image -->
    <a class="player plain" id="videoPlayer">
        <img src="images/play_text_large.png" />
    </a>

    <div class="clips" style="margin-top:15px;">
        <!-- single playlist entry as an "template" -->
        <a href="${url}">&nbsp;
            <!--${title}--> <!--<span>${subTitle}</span>-->
            <!--<em>${time}</em>-->
        </a>
    </div>

    <!-- let rest of the page float normally -->
    <br clear="all"/>
</div>

编辑

我发现问题可能是什么了。当它加载时,它只是一个飞溅的图像,而不是真正的玩家。您可以在http://thepartysource.com/index_test.php上查看这个。如果我设置第二个剪辑自动播放,它这样做后,第一次完成。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-11-17 13:21:08

我不得不将div.clips标记更改为:

代码语言:javascript
复制
<!-- the player using splash image -->
<a href="videos/flowplayer-3.2.7.swf" class="player plain" id="videoPlayer">
</a>

将href指定给要开始使用的流播放器。这让播放器在页面上加载,而autoPlay开始工作。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8157501

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档