1
0
mirror of https://github.com/videojs/video.js.git synced 2025-07-15 01:34:23 +02:00

Fixed an issue with ajax errors

This commit is contained in:
Steve Heffernan
2011-11-30 14:05:28 -08:00
parent 78a3b16e9c
commit ec145f6d4d
2 changed files with 7 additions and 3 deletions

View File

@ -248,7 +248,9 @@ _V_.extend({
if (request.status == 200 || local && request.status == 0) { if (request.status == 200 || local && request.status == 0) {
onSuccess(request.responseText); onSuccess(request.responseText);
} else { } else {
onError(); if (onError) {
onError();
}
} }
} }
}); });
@ -257,7 +259,9 @@ _V_.extend({
request.send(); request.send();
} catch(e) { } catch(e) {
_V_.log("VideoJS XMLHttpRequest (send)", e); _V_.log("VideoJS XMLHttpRequest (send)", e);
onError(e); if (onError) {
onError(e);
}
} }
}, },

View File

@ -277,7 +277,7 @@ _V_.H5swf = _V_.PlaybackTech.extend({
play: function(){ this.el.vjs_play(); }, play: function(){ this.el.vjs_play(); },
pause: function(){ this.el.vjs_pause(); }, pause: function(){ this.el.vjs_pause(); },
src: function(src){ this.el.vjs_src(src); }, src: function(src){ this.el.vjs_src(src); },
load: function(){ this.el.vjs_load(); _V_.log("load"); }, load: function(){ this.el.vjs_load(); },
poster: function(){ this.el.vjs_getProperty("poster"); }, poster: function(){ this.el.vjs_getProperty("poster"); },
buffered: function(){ buffered: function(){