jPlayer视频无法在iPad上播放

时间:2013-07-03 22:47:38

标签: javascript jquery ipad jplayer

我正在使用jPlayer在我的网站上播放视频。

它适用于所有浏览器,如firefox,safari,chrome,IE7-10,但不适用于iPad。

每当我点击播放按钮时,它会立即开始和停止。

这是代码

$(document).ready(function() {
    var this_webmv = "";
    var this_mp4 = "";
    var this_poster = "";
    $("a[video_path]").click(function() {
        this_webmv = "http://video.shaklee.jp/BusinessTools/" + $(this).attr("video_path") + ".webm";
        this_mp4 = "http://video.shaklee.jp/BusinessTools/" + $(this).attr("video_path") + ".mp4";
        this_poster = "https://content.shaklee.jp/images/member/" + $(this).attr("video_path") + "_poster.jpg";
        var title = $(this).find("b").html();
        $("#videoTitle").html(title);
        $("#jquery_jplayer_1").jPlayer("setMedia", {
            webmv: this_webmv,
            m4v: this_mp4,
            poster: this_poster
        });
    });
    $("#jquery_jplayer_1").jPlayer({
        ready: function() {
            $(this).jPlayer("setMedia", {
                webmv: this_webmv,
                m4v: this_mp4,
                poster: this_poster
            });
        },
        play: function() { // To avoid both jPlayers playing together.
            $(this).jPlayer("pauseOthers");
        },
        swfPath: "//{{$smarty.server.HTTP_HOST}}{{$market_uri}}assets/javascripts/external",
        preload: 'metadata',
        supplied: "webmv, m4v",
        solution: "html, flash",
        size: {
            width: "570px",
            height: "340px",
            cssClass: "jp-video-360p"
        },
        cssSelectorAncestor: "#jp_container_1"
    });
  });

我尝试了这里提到的解决方案

JQuery jPlayer autoplay not working on ipad how to show controls

没有什么对我有用。

非常感谢您的帮助。

0 个答案:

没有答案
相关问题