Commit 5fd27f52 authored by Roman Sebastian Karwacik's avatar Roman Sebastian Karwacik
Browse files

Forbid context menu if video is not downloadable

parent 6359499c
......@@ -90,7 +90,6 @@
</div>
{% endif %}
<script>
function hintchapterclick (src) {
$.ajax({
......@@ -148,6 +147,12 @@ $(document).ready(function() {
videojs('videoplayer').currentTime($(this).data("seek-time"));
return false;
});
var downloadable = {{ ((videos|length > 0 and videos[0].downloadable) or ismod())|tojson }};
if (!downloadable) {
$("#videoplayer_html5_api").on('contextmenu', function(e) {
e.preventDefault();
});
}
});
</script>
{% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment