Skip to content
Snippets Groups Projects
Commit 5fd27f52 authored by Roman Sebastian Karwacik's avatar Roman Sebastian Karwacik
Browse files

Forbid context menu if video is not downloadable

parent 6359499c
No related branches found
No related tags found
No related merge requests found
......@@ -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 %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment