Skip to content

Commit

Permalink
Add testUrlWithGet to default player params
Browse files Browse the repository at this point in the history
  • Loading branch information
nirmaoz authored and Nir Maoz committed Nov 17, 2019
1 parent 62c0431 commit 6062f81
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/video-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ const PLAYER_PARAMS = CLOUDINARY_PARAMS.concat([
'floatingWhenNotVisible',
'ads',
'showJumpControls',
'textTracks'
'textTracks',
'testUrlWithGet'
]);

const TEST_URL_DEFAULT_REQUEST = { method: 'head' };
Expand Down Expand Up @@ -545,7 +546,7 @@ class VideoPlayer extends Utils.mixin(Eventable) {
if (err) {
this.videojs.error({ code: 10, message: err.message, statusCode: resp.statusCode });
}
if (resp.statusCode !== 200) {
if (resp.statusCode < 200 || resp.statusCode > 299) {
const errorMsg = resp.headers['x-cld-error'] || (err && err.message ? err.message : '');
const cloudName = this.cloudinaryConfig().config().cloud_name;
this.videojs.error(cloudinaryErrorsConverter({
Expand Down

0 comments on commit 6062f81

Please sign in to comment.