0

我正在使用 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自动播放在ipad上不起作用如何显示控件

没有什么对我有用。

非常感谢您的帮助。

4

0 回答 0