Skip to content

Commit 2067f3b

Browse files
author
Yaniv Aran-Shamir
committed
fixed testUrl not called in minified version
1 parent a01bc56 commit 2067f3b

File tree

6 files changed

+8
-3
lines changed

6 files changed

+8
-3
lines changed

docs/custom-cld-errors.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,9 @@
2828
publicId: 'snow_horses',
2929
});
3030
player.on('error', function (e) {
31-
if (e.Player.videojs.error_.code === 11) {
3231
var title = document.querySelector('.error-container');
3332
title.innerHTML = 'Error !!!!!!!!! ' + e.Player.videojs.error_.message + 'and status code was ' + e.Player.videojs.error_.statusCode;
3433
title.style.color = 'red';
35-
}
3634
})
3735

3836
}, false);

src/plugins/cloudinary/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ class CloudinaryContext extends mixin(Playlistable) {
299299
}
300300

301301
currentSourceType() {
302-
return this.source().constructor.name;
302+
return this.source().getType();
303303
}
304304

305305
currentPublicId() {

src/plugins/cloudinary/models/audio-source.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class AudioSource extends VideoSource {
2626

2727
super(publicId, options);
2828
let _poster = null;
29+
this._type = 'AudioSource';
30+
2931
this.poster = (publicId, options = {}) => {
3032
if (!publicId) {
3133
return _poster;

src/plugins/cloudinary/models/base-source.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ class BaseSource {
6464
return this;
6565
};
6666

67+
this.getType = () => this._type;
68+
6769
const { cloudinaryConfig } = sliceAndUnsetProperties(options, 'cloudinaryConfig');
6870
if (!cloudinaryConfig) {
6971
throw new Error('Source is missing \'cloudinaryConfig\'.');
@@ -81,6 +83,7 @@ class BaseSource {
8183
this.publicId(publicId);
8284
}
8385

86+
8487
config() {
8588
const cld = new cloudinary.Cloudinary(this.cloudinaryConfig().config());
8689
cld.config(this.resourceConfig());

src/plugins/cloudinary/models/image-source.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class ImageSource extends BaseSource {
1919
options = assign({}, DEFAULT_IMAGE_PARAMS, options);
2020

2121
super(publicId, options);
22+
this._type = 'ImageSource';
2223
}
2324
}
2425

src/plugins/cloudinary/models/video-source.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class VideoSource extends BaseSource {
4848
let _sourceTransformation = null;
4949
let _info = null;
5050
let _recommendations = null;
51+
this._type = 'VideoSource';
5152

5253
this.poster = (publicId, options = {}) => {
5354
if (!publicId) {

0 commit comments

Comments
 (0)