使用jQuery使用Flowplayer嵌入电影

请按照以下简单步骤使用Flowplayer (开放源代码视频播放器) 嵌入电影 。 您可以对播放器进行大量定制,我将在单独的文章中更详细地分享这些定制-包括ipad支持,自定义控件,RTMP / RTSP实时流,自动播放,剪辑缩放,播放器调试,更改分辨率,动态视频尺寸等...这篇文章详细介绍了播放器的最小设置,以帮助您入门。

相关文章:

scaling-fit

的HTML

  
  
Status Ready.

jQuery的

//video or stream address
var streamAddressFull = "http://streamaddress/mp4:filename/playlist.m3u8",
    vidElem = $('#fms'),
    statusElem = $('#video-stream-status .status');

$f('fms', "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf",
{
    /** ------- Error Handling -------- **/

    debug: debug,  //output all events triggered by the Flash component to the console

    onError: function(e)
    {
        statusElem.html("Error: (code:"+e+").");
    },

    // we need at least this version of flash
    version: [9, 115],

    // older versions will see a custom message
    onFail: function()
    {
          statusElem.html("You need the latest Flash version to view MP4 movies. " + "Your version is " + this.getVersion());
    },

    onBeforeLoad:function()
    {
        statusElem.html("Loading...");
    },

    /** ------- Clip Configurations -------- **/

    clip:
    {
        url: streamAddressFull,
        scaling: 'fit', //fit, scale, orig, half
        autoPlay: true,
        autoBuffering: true,

        onStart: function(clip)
        {
            statusElem.html("Playing.");
        }
    },

    plugins:
    {
        controls:
        {
            // display properties such as size, location and opacity
            right: 0,
            bottom: 0,
            opacity: 0.95,
            backgroundGradient: 'low', //faded slightly
        }
    },

    /** ------- Look and Feel -------- **/

    canvas:
    {
        backgroundGradient: 'none',
        backgroundColor: '#000000'
    }

});

From: https://www.sitepoint.com/jquery-embed-movie-flowplayer/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值