Documentation
Configuration
The player offers a basic runtime configuration option. Below you will find a sample code showing how to disable the ShowAnswers and HideAnswers events using this functionality.
<html>
<head>
<script type="text/javascript" language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" language="javascript" src="icplayer/icplayer.nocache.js"></script>
<script language="javascript">
var player;
function icOnAppLoaded(){
player = icCreatePlayer('_icplayer');
player.setConfig({
events: {
disabled: ['ShowAnswers', 'HideAnswers']
}
});
player.load('content/default.ic.xml');
}
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</head>
<body>
<div id="_icplayer"></div>
</body>
</html>
The whole configuration is set through the setConfig() method called before the load() function.
Available configuration options
Option | Description |
---|---|
events.disabled | An array of event names that should be disabled. Whenever one of the disabled events is fired (regardless of whether it is done via the module or the JavaScript API), a RuntimeError will be thrown. |