【问题标题】:Using jwplayer 6.11 video not Play on ipad使用 jwplayer 6.11 视频不能在 ipad 上播放
【发布时间】:2014-12-23 12:34:40
【问题描述】:

我们使用 JW Player 6.11 播放 .mp4 和 .flv 的视频,但无法正常工作。

  1. ios7
  2. iPhone

我怎样才能在那个时候为 iPad 解决这个问题?

function playvideo() {
        jwplayer("mediaplayer").setup({
            playlist: [{

                    sources: [
                    { file: "<?php echo $this->getUrl().'Content/video/'.trim($_product->getVideourl());?>",
                        //type: 'html5',
                    }
            ],

            title: "Play"
        }
        ],

        controlbar: "none",
        height:388,
        width: 610,
        streamer: "rtmp://s14flalja9b5hr.cloudfront.net/cfx/st",
        startparam: "ec_seek",
        fallback: false, 
        repeat: false, 
        autostart: true, 
        primary: 'flash', 
        bufferlength: '30',
        stretching: 'fill',
        onpause: 'true',
        events: {
            onReady: function() { 
                    var t = setInterval(function() {
                            jwplayer("mediaplayer").play();
                            clearInterval(t);
                    }, 500); 
            },
            onComplete: function() { 
                    var t = setInterval(function() {
                            jwplayer("mediaplayer").remove();
                            clearInterval(t);
                    }, 500); 

            },
        }
        });

jwplayer

【问题讨论】:

  • 您在这里使用的是 RTMP,并且您的一些代码是用于 JW5(例如流媒体),而不是 JW6 - support.jwplayer.com/customer/portal/articles/…
  • 不知道在哪里改变请用我的逻辑为 jw6 添加新代码
  • 如果要支持 iOS 或 Android,请不要使用 RTMP。
  • 我已经从代码中删除了 streamer: line 但在 ios8 或 7 中无法使用 flv 文件。
  • FLV 也只是 Flash。您需要适用于 iOS 的 MP4。

标签: jquery customization jwplayer iso


【解决方案1】:

RTMP 是一种仅限 Flash 的协议。无论您使用什么播放器脚本,它都需要 Flash。它不能在移动设备(iOS、Android)上使用,因为它们都不支持 Flash。

任何移动设备上也没有自动启动功能 - 这是设备本身的设计方式,您无法覆盖它。

【讨论】:

    【解决方案2】:

    @RaviPatel,您应该使用以下代码在 PC 等闪存设备中播放 rtmp,Laps 在不受支持的闪存设备中也可以播放 html5..

        jwplayer("myElement").setup({
            playlist: [{
                image: "/assets/myVideo.jpg",
                sources: [{ 
                    file: "rtmp://example.com/application/mp4:myVideo.mp4"
                },{
                    file: "/assets/myVideo.mp4"
                }]
            }],
            height: 360,
            primary: "flash",
            width: 640
        });
    

    这里,

    file: "rtmp://example.com/application/mp4:myVideo.mp4" is used for  flash mode
    

    file: "/assets/myVideo.mp4"is used for mobile devices like iOs and android..
    

    这是适合您的解决方案,试试这个,希望对您有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-01-14
      • 1970-01-01
      • 2013-10-02
      • 2014-11-13
      • 2012-10-12
      • 1970-01-01
      • 2012-06-13
      相关资源
      最近更新 更多