Hi,
How can I make a trigger that runs if JW Player returns any error.
for example, when jw player says "video not found", i want to run a ajax function.
Hi,
How can I make a trigger that runs if JW Player returns any error.
for example, when jw player says "video not found", i want to run a ajax function.
There are a few steps here, but the process is basically as follows:
The code for that looks something like this:
<script type="text/javascript">
var player;
function playerReady(obj) {
player = document.getElementById(obj['id']);
player.addModelListener('ERROR', errorHandler);
};
function errorHandler(evt){
//Your Code Here
}
</script>
You should check out the documentation for more information on events you can listen for and adding event listeners.
Best,
Zach
Developer, LongTail Video