自动播放不适用于流

发布于 2024-12-23 13:29:48 字数 950 浏览 3 评论 0原文

我只是设置 flowplayer 来播放 rtmp 流,但由于某种原因,我需要单击启动屏幕(播放流文本)来启动视频,即使我有 autoPlay: true 。

这是一个错误,还是我缺少一些配置设置?

<!-- video -->
        <div id="stream" class="stream" style="width: 1000px; height: 650px; display: block;">
            Play stream text   
        </div>

    <script type="text/javascript">
         flowplayer("stream", "/flowplayer/flowplayer-3.2.7.swf", {

            clip: {
                url: 'mystream',
                live: 'true',
                provider: 'rtmp',
                scaling: 'orig',
                autoPlay: true
            },

            plugins: {
                rtmp: {
                    url: '/flowplayer/flowplayer.rtmp-3.2.3.swf',
                    netConnectionUrl: 'rtmp://mms.mysite.com/live/'
                }
            },

            canvas: {
                backgroundGradient: 'none'
            }
        });
    </script>

I just setup flowplayer to play rtmp streams, but for some reason I need to click on the splash screen (Play stream text) to start the video even though I have autoPlay: true.

Is this a bug, or am I missing some configuration settings?

<!-- video -->
        <div id="stream" class="stream" style="width: 1000px; height: 650px; display: block;">
            Play stream text   
        </div>

    <script type="text/javascript">
         flowplayer("stream", "/flowplayer/flowplayer-3.2.7.swf", {

            clip: {
                url: 'mystream',
                live: 'true',
                provider: 'rtmp',
                scaling: 'orig',
                autoPlay: true
            },

            plugins: {
                rtmp: {
                    url: '/flowplayer/flowplayer.rtmp-3.2.3.swf',
                    netConnectionUrl: 'rtmp://mms.mysite.com/live/'
                }
            },

            canvas: {
                backgroundGradient: 'none'
            }
        });
    </script>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

简单爱 2024-12-30 13:29:48

我想原因是所谓的启动屏幕不应该按照您建议的方式使用。如果您在 div 之间放置任何内容,或者作为要使用的文档,它始终会成为可单击区域,并且仅当播放器真正加载时(单击后), autoPlay true 才会生效。

我认为获得闪屏的更好方法是使用文档中推荐的方法:http://flowplayer。 org/documentation/skinning/

I guess the reason is that the so called splash screen should not be used as the way you suggest. If you put anything between the div, or as the documents to use , it always becomes a click-able area and the autoPlay true will come into place only when the player being really loaded (after you clicked).

I think the better way to go for the splashscreen would to use the recommended way in the document: http://flowplayer.org/documentation/skinning/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文