【问题标题】:How to change preview image at onComplete event?如何在 onComplete 事件中更改预览图像?
【发布时间】:2012-02-10 10:20:52
【问题描述】:

我正在使用以下源代码使用 jwpalyer 显示视频文件。

  jwplayer('mediaplayer').setup({
    'id': 'mediaplayer',
    'width': '649',
    'image': "<?=$siteURL?>/views/index/preview.jpg",       
    'height': '300',
    'file': '<?=siteURL?>/views/index/video.mp4',

    'flashplayer': '<?=siteURL?>/scripts/jwplayer/player.swf',
    'modes': [
         {type: 'flash', src: '<?=siteURL?>/scripts/jwplayer/player.swf?autostart=true'},
        {
            type: 'html5'
        },

        {type: 'download'}
    ],
    'events': {
        onComplete: function(e){
        }
    }
  });

我想更改视频末尾的“图片”。我添加了“onComplete”事件,但我不知道如何仅更改“图像”属性。

我已经阅读了 jwplayer api 和谷歌搜索,没有运气..

【问题讨论】:

    标签: jwplayer


    【解决方案1】:

    onComplete 函数中添加这个:

    this.load({
        "file": "originalvideofile.mp4",
        "image": "newimage.jpg"
    });
    

    【讨论】:

    • 我的版本是6.12。但这种方法不适用于 chrome。还有其他选择吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-12-30
    相关资源
    最近更新 更多