Skip to content
Snippets Groups Projects
Commit b3f74f39 authored by gnaegi's avatar gnaegi
Browse files

OO-1723 Add minify process for player.js

parent 8aafeaa5
No related branches found
No related tags found
No related merge requests found
......@@ -86,13 +86,13 @@ function o_start(){
<script type="text/javascript" src='$r.staticLink("bootstrap/javascripts/bootstrap/modal.js")'></script>
<script type="text/javascript" src='$r.staticLink("bootstrap/javascripts/bootstrap/tooltip.js")'></script>
<script type="text/javascript" src='$r.staticLink("bootstrap/javascripts/bootstrap/popover.js")'></script>
## The OpenOLAT video player. In separate file as it is also used in content iframes
<script type="text/javascript" src='$r.staticLink("movie/player.js")'></script>
#else
<script type="text/javascript" src='$r.staticLink("js/js.plugins.min.js")'></script>
<script type="text/javascript" src='$r.staticLink("movie/player.min.js")'></script>
#end
## The OpenOLAT video player. In separate file as it is also used in content iframes
<script type="text/javascript" src='$r.staticLink("movie/player.js")'></script>
#if($r.available("guidebug"))
<link type="text/css" href='$r.staticLink("js/jquery/tagsinput/bootstrap-tagsinput.css")' rel="stylesheet" />
<link type="text/css" href='$r.staticLink("js/jquery/fullcalendar/fullcalendar.css")' rel="stylesheet" />
......
......@@ -25,6 +25,7 @@ import java.util.Map;
import org.olat.core.dispatcher.impl.StaticMediaDispatcher;
import org.olat.core.gui.components.form.flexible.impl.elements.richText.plugins.TinyMCECustomPlugin;
import org.olat.core.helpers.Settings;
/**
* Description:<br>
......@@ -64,7 +65,15 @@ public class OlatMovieViewerPlugin extends TinyMCECustomPlugin {
// Get static URI for transparent GIF.
params.put("transparentImage", StaticMediaDispatcher.createStaticURIFor("images/transparent.gif", false));
params.put("playerScript", StaticMediaDispatcher.createStaticURIFor("movie/player.js", true));
// In production, we use the minified player, for debug the non-minified.
// However, in production the non-minified must be available as well to
// be compatible with old content that embedded the other code.
if (Settings.isDebuging()) {
params.put("playerScript", StaticMediaDispatcher.createStaticURIFor("movie/player.js", true));
} else {
params.put("playerScript", StaticMediaDispatcher.createStaticURIFor("movie/player.min.js", true));
}
setPluginParameters(params);
return params;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment