的Flowplayer控制:自动隐藏而autoPlay [英] Flowplayer controls: autoHide and autoPlay

查看:1129
本文介绍了的Flowplayer控制:自动隐藏而autoPlay的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不能让我的球员自动启动或控制为自动隐藏。我相信我已经正确设置此,但它只是不工作。这里是我的整个脚本标签此:

I cannot get my player to auto start or the controls to auto hide. I believe I have set this up correctly, but it is just not working. Here is my entire script tag for this:

<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区:

<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>

修改

我居然发现什么问题可能是。当它加载,这是pretty简单,只是一个开机画面,而不是实际的播放器。您可以在 http://thepartysource.com/index_test.php 查看。如果我设置了第二个剪辑自动播放,它第一次结束后这样做。

I actually found what the issue might be. When it loads, it is pretty much just a splash image, and not the actual player. You can view this at http://thepartysource.com/index_test.php . If I set the 2nd clip to autoplay, it does so after the first finishes.

推荐答案

我不得不改变div.clips标签:

I had to change the div.clips tag to:

<!-- the player using splash image -->
<a href="videos/flowplayer-3.2.7.swf" class="player plain" id="videoPlayer">
</a>

指定HREF到的Flowplayer下手。这让在页面加载播放器的负载,而autoPlay开始工作。

specifying the href to the flowplayer to start with. This let the player load on page load, and autoPlay began working.

这篇关于的Flowplayer控制:自动隐藏而autoPlay的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆