0
クリックしたサムネイルに応じて画像や動画を入れ替えるギャラリーの一環としてmediaelement.jsを使用しようとしています。ここでIEでプレーヤーを動的に作成できない
http://www.altny.com/portfolio/interactive.htmlこれはSafariとFirefoxの上で作業している
// portfolio image/video swap
$("div.gallery-thumb a.gallery-swap").click(function() {
var newDesc = "<p>" + $(this).attr("title") + "</p>";
var newSource = $(this).attr("href");
if ($(this).attr("rel") == "image") {
var newImage = "url(" + newSource + ")";
$("section#project-image").empty().css("background-image",newImage);
$("section#project-image").prepend(newDesc);
} else if ($(this).attr("rel") == "video") {
// video handling
$("section#project-image").css("background-image","none").empty().prepend("<video id=\"project-player\" src=\"" + newSource + "\" width=\"400\" height=\"270\"></video>");
$("video#project-player").mediaelementplayer();
$("div.mejs-container").css("margin","0 auto");
$("section#project-image").append(newDesc);
}
return false;
});
(別の.jsファイルにjqueryのを使用して)私のコードですが、(私はドン」IE8では動作しません:URLはこちら現在7または9にアクセスできません)。 mediaelement.jsを不適切に使用していますか?