catch VideoJS exceptions

This commit is contained in:
Romain Neutron
2012-06-04 18:36:56 +02:00
parent 9449424b4b
commit ce8170b87b
2 changed files with 17 additions and 4 deletions

View File

@@ -23,9 +23,14 @@
</div>
<script type="text/javascript">
_V_("video_preview_tooltip").destroy();
_V_("video_preview_tooltip", {}, function(){
$(document).ready(function(){
try {
_V_("video_preview_tooltip", {}, function(){
});
} catch(err) {
console.error('An error has been catched during the execution of VideoJS', err);
}
});
</script>

View File

@@ -587,7 +587,11 @@
}
$.each($('#tooltip video'), function(i,el){
_V_($(el).attr('id')).destroy();
try {
_V_($(el).attr('id')).destroy();
} catch(err) {
console.error('An error has been catched during the execution of VideoJS', err);
}
});
helper.body.empty();
@@ -616,7 +620,11 @@ function unfix_tooltip()
$.tooltip.current = null;
$('#tooltip').hide();
$.each($('#tooltip video'), function(i,el){
try {
_V_($(el).attr('id')).destroy();
} catch(err) {
console.error('An error has been catched during the execution of VideoJS', err);
}
});
$('#tooltip .tooltip_closer').hide();
hideOverlay('_tooltip');