--- a/player/js/player.js Wed Jun 26 11:35:21 2013 +0200
+++ b/player/js/player.js Wed Jun 26 11:35:42 2013 +0200
@@ -29,6 +29,14 @@
}
);
+ function preventRightClick(selector) {
+ selector.on("contextmenu", function() {
+ return false;
+ });
+ }
+
+ preventRightClick($(".video-container video"));
+
$(".media-duration").text(myMedia.duration);
myMedia.on("timeupdate", function(t) {
@@ -329,6 +337,7 @@
}).join("")
);
imgel.fadeTo(400, 1);
+ preventRightClick(imgel);
}
var nextImage = function() {
@@ -452,7 +461,7 @@
positionDiv();
}
});
- return;
+ break;
}
if (/^(https?:\/\/)?(www\.)?dailymotion/.test(src)) {
@@ -470,7 +479,7 @@
positionDiv();
}
});
- return;
+ break;
}
if (/^(https?:\/\/)?(www\.)?soundcloud\.com/.test(src)) {
@@ -490,7 +499,7 @@
positionDiv();
}
});
- return;
+ break;
}
var extension = (src.match(/\.([\d\w]+)$/) || ["",""])[1],
@@ -514,8 +523,9 @@
positionDiv();
});
+ preventRightClick(media);
+
annotationDiv.find(".media-frame").html(media);
- return;
break;
@@ -526,26 +536,6 @@
switch (annotationinfo.annotation.content.markup) {
case "html":
annotationDiv.find(".text-contents").html(text);
-
- var ps = annotationDiv.find(".text-contents>p"),
- groups = [],
- last, group;
- ps.each(function(i, e) {
- if (last && group && last.nextElementSibling === e) {
- group.contents.push(e);
- } else {
- group = {
- master: e,
- contents: [e.cloneNode(true)]
- }
- groups.push(group);
- }
- last = e;
- });
- groups.forEach(function(g) {
- $(g.master).replaceWith($('<div class="column-group">').append(g.contents));
- });
-
break;
default:
annotationDiv.find(".text-contents").html(
@@ -556,6 +546,9 @@
break;
}
annotationDiv.find(".text-contents a").attr("target","_blank");
+ annotationDiv.find(".text-contents").css({
+ "max-height": $(".main-video").height() - 140
+ });
break;
@@ -565,12 +558,14 @@
annotationDiv.find(".link-contents").html(
annotationinfo.annotation.content.links.map(linkTemplate).join("")
- );
+ ).css({
+ "max-height": $(".main-video").height() - 140
+ });
break;
}
- positionDiv(true);
+ positionDiv();
}