cloudinary-video-player 2.1.2-edge.1 → 2.1.2-edge.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cld-video-player.js +20 -9
- package/dist/cld-video-player.light.js +20 -9
- package/dist/cld-video-player.light.min.js +1 -1
- package/dist/cld-video-player.min.js +1 -1
- package/lib/all.js +1 -1
- package/lib/cld-video-player.js +1 -1
- package/lib/player.js +1 -1
- package/lib/videoPlayer.js +1 -1
- package/package.json +1 -1
package/dist/cld-video-player.js
CHANGED
|
@@ -9243,7 +9243,7 @@ class CloudinaryAnalytics {
|
|
|
9243
9243
|
this.cloudinaryAnalytics.startManualTracking(metadata, {
|
|
9244
9244
|
...(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(this.analyticsOptions) ? this.analyticsOptions : {}),
|
|
9245
9245
|
videoPlayerType: 'cloudinary video player',
|
|
9246
|
-
videoPlayerVersion: "2.1.2-edge.
|
|
9246
|
+
videoPlayerVersion: "2.1.2-edge.2"
|
|
9247
9247
|
});
|
|
9248
9248
|
} else if (this.currentVideMetadata.cloudName !== metadata.cloudName || this.currentVideMetadata.publicId !== metadata.publicId) {
|
|
9249
9249
|
this.cloudinaryAnalytics.stopManualTracking();
|
|
@@ -9614,7 +9614,7 @@ class CloudinaryContext {
|
|
|
9614
9614
|
options.sourceTypes = options.sourceTypes || _this.sourceTypes();
|
|
9615
9615
|
options.poster = options.poster || posterOptionsForCurrent();
|
|
9616
9616
|
options.queryParams = Object.assign(options.queryParams || {}, options.usageReport ? {
|
|
9617
|
-
_s: `vp-${"2.1.2-edge.
|
|
9617
|
+
_s: `vp-${"2.1.2-edge.2"}`
|
|
9618
9618
|
} : {});
|
|
9619
9619
|
if (options.sourceTypes.indexOf('audio') > -1) {
|
|
9620
9620
|
builtSrc = new _models_audio_source_audio_source__WEBPACK_IMPORTED_MODULE_7__["default"](publicId, options);
|
|
@@ -10878,7 +10878,7 @@ const contextMenuContent = player => {
|
|
|
10878
10878
|
const isFullscreen = player.isFullscreen();
|
|
10879
10879
|
const aboutMenuItem = {
|
|
10880
10880
|
class: 'player-version',
|
|
10881
|
-
label: 'Cloudinary Player v' + "2.1.2-edge.
|
|
10881
|
+
label: 'Cloudinary Player v' + "2.1.2-edge.2"
|
|
10882
10882
|
};
|
|
10883
10883
|
if (!player.controls()) {
|
|
10884
10884
|
return [aboutMenuItem];
|
|
@@ -12566,13 +12566,13 @@ const isKeyInTransformation = (transformation, key) => {
|
|
|
12566
12566
|
};
|
|
12567
12567
|
const addTextTracks = (tracks, videojs) => {
|
|
12568
12568
|
tracks.forEach(track => {
|
|
12569
|
-
if (track.src) {
|
|
12569
|
+
if (track.src && track.src.endsWith('.vtt')) {
|
|
12570
12570
|
fetch(track.src, GET_ERROR_DEFAULT_REQUEST).then(r => {
|
|
12571
12571
|
if (r.status >= 200 && r.status <= 399) {
|
|
12572
12572
|
videojs.addRemoteTextTrack(track, true);
|
|
12573
12573
|
}
|
|
12574
12574
|
});
|
|
12575
|
-
} else if (videojs.pacedTranscript) {
|
|
12575
|
+
} else if (videojs.pacedTranscript && (!track.src || track.src.endsWith('.transcript'))) {
|
|
12576
12576
|
videojs.pacedTranscript(track);
|
|
12577
12577
|
}
|
|
12578
12578
|
});
|
|
@@ -12870,6 +12870,19 @@ const getCloudinaryOptions = function () {
|
|
|
12870
12870
|
posterOptionsPublicId: cloudinaryOptions.posterOptions && hasConfig(cloudinaryOptions.posterOptions.publicId)
|
|
12871
12871
|
};
|
|
12872
12872
|
};
|
|
12873
|
+
const getTranscriptOptions = function () {
|
|
12874
|
+
let textTracks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12875
|
+
const tracksArr = [textTracks.captions, ...textTracks.subtitles];
|
|
12876
|
+
return {
|
|
12877
|
+
textTracks: hasConfig(textTracks),
|
|
12878
|
+
pacedTextTracks: hasConfig(textTracks) && JSON.stringify(textTracks || {}).includes('"maxWords":') || null,
|
|
12879
|
+
wordHighlight: hasConfig(textTracks) && JSON.stringify(textTracks || {}).includes('"wordHighlight":') || null,
|
|
12880
|
+
transcriptAutoLoaded: tracksArr.some(track => !track.url) || null,
|
|
12881
|
+
transcriptFromURl: tracksArr.some(track => track.url?.endsWith('.transcript')) || null,
|
|
12882
|
+
transcriptLanguages: tracksArr.filter(track => !track.url).map(track => track.language || '').join(',') || null,
|
|
12883
|
+
vttFromUrl: tracksArr.some(track => track.url?.endsWith('.vtt')) || null
|
|
12884
|
+
};
|
|
12885
|
+
};
|
|
12873
12886
|
const getSourceOptions = function () {
|
|
12874
12887
|
let sourceOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12875
12888
|
return {
|
|
@@ -12883,9 +12896,7 @@ const getSourceOptions = function () {
|
|
|
12883
12896
|
sourceInfoDescription: sourceOptions.info.description
|
|
12884
12897
|
} : {}),
|
|
12885
12898
|
...(sourceOptions.textTracks ? {
|
|
12886
|
-
textTracks
|
|
12887
|
-
pacedTextTracks: hasConfig(sourceOptions.textTracks) && JSON.stringify(sourceOptions.textTracks || {}).includes('"maxWords":'),
|
|
12888
|
-
wordHighlight: hasConfig(sourceOptions.textTracks) && JSON.stringify(sourceOptions.textTracks || {}).includes('"wordHighlight":'),
|
|
12899
|
+
...(hasConfig(sourceOptions.textTracks) && getTranscriptOptions(sourceOptions.textTracks)),
|
|
12889
12900
|
...(sourceOptions.textTracks.options ? {
|
|
12890
12901
|
styledTextTracksTheme: sourceOptions.textTracks.options.theme,
|
|
12891
12902
|
styledTextTracksFont: sourceOptions.textTracks.options.fontFace,
|
|
@@ -13475,7 +13486,7 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
|
|
|
13475
13486
|
const analyticsData = (0,_utils_get_analytics_player_options__WEBPACK_IMPORTED_MODULE_18__.getAnalyticsFromPlayerOptions)(options);
|
|
13476
13487
|
const analyticsParams = new URLSearchParams(analyticsData).toString();
|
|
13477
13488
|
const baseParams = new URLSearchParams({
|
|
13478
|
-
vpVersion: "2.1.2-edge.
|
|
13489
|
+
vpVersion: "2.1.2-edge.2",
|
|
13479
13490
|
vpInstanceId: this.getVPInstanceId(),
|
|
13480
13491
|
// #if (process.env.WEBPACK_BUILD_LIGHT)
|
|
13481
13492
|
// vpLightBuild: true,
|
|
@@ -1407,7 +1407,7 @@ class CloudinaryAnalytics {
|
|
|
1407
1407
|
this.cloudinaryAnalytics.startManualTracking(metadata, {
|
|
1408
1408
|
...(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(this.analyticsOptions) ? this.analyticsOptions : {}),
|
|
1409
1409
|
videoPlayerType: 'cloudinary video player',
|
|
1410
|
-
videoPlayerVersion: "2.1.2-edge.
|
|
1410
|
+
videoPlayerVersion: "2.1.2-edge.2"
|
|
1411
1411
|
});
|
|
1412
1412
|
} else if (this.currentVideMetadata.cloudName !== metadata.cloudName || this.currentVideMetadata.publicId !== metadata.publicId) {
|
|
1413
1413
|
this.cloudinaryAnalytics.stopManualTracking();
|
|
@@ -1778,7 +1778,7 @@ class CloudinaryContext {
|
|
|
1778
1778
|
options.sourceTypes = options.sourceTypes || _this.sourceTypes();
|
|
1779
1779
|
options.poster = options.poster || posterOptionsForCurrent();
|
|
1780
1780
|
options.queryParams = Object.assign(options.queryParams || {}, options.usageReport ? {
|
|
1781
|
-
_s: `vp-${"2.1.2-edge.
|
|
1781
|
+
_s: `vp-${"2.1.2-edge.2"}`
|
|
1782
1782
|
} : {});
|
|
1783
1783
|
if (options.sourceTypes.indexOf('audio') > -1) {
|
|
1784
1784
|
builtSrc = new _models_audio_source_audio_source__WEBPACK_IMPORTED_MODULE_7__["default"](publicId, options);
|
|
@@ -3042,7 +3042,7 @@ const contextMenuContent = player => {
|
|
|
3042
3042
|
const isFullscreen = player.isFullscreen();
|
|
3043
3043
|
const aboutMenuItem = {
|
|
3044
3044
|
class: 'player-version',
|
|
3045
|
-
label: 'Cloudinary Player v' + "2.1.2-edge.
|
|
3045
|
+
label: 'Cloudinary Player v' + "2.1.2-edge.2"
|
|
3046
3046
|
};
|
|
3047
3047
|
if (!player.controls()) {
|
|
3048
3048
|
return [aboutMenuItem];
|
|
@@ -4441,13 +4441,13 @@ const isKeyInTransformation = (transformation, key) => {
|
|
|
4441
4441
|
};
|
|
4442
4442
|
const addTextTracks = (tracks, videojs) => {
|
|
4443
4443
|
tracks.forEach(track => {
|
|
4444
|
-
if (track.src) {
|
|
4444
|
+
if (track.src && track.src.endsWith('.vtt')) {
|
|
4445
4445
|
fetch(track.src, GET_ERROR_DEFAULT_REQUEST).then(r => {
|
|
4446
4446
|
if (r.status >= 200 && r.status <= 399) {
|
|
4447
4447
|
videojs.addRemoteTextTrack(track, true);
|
|
4448
4448
|
}
|
|
4449
4449
|
});
|
|
4450
|
-
} else if (videojs.pacedTranscript) {
|
|
4450
|
+
} else if (videojs.pacedTranscript && (!track.src || track.src.endsWith('.transcript'))) {
|
|
4451
4451
|
videojs.pacedTranscript(track);
|
|
4452
4452
|
}
|
|
4453
4453
|
});
|
|
@@ -4745,6 +4745,19 @@ const getCloudinaryOptions = function () {
|
|
|
4745
4745
|
posterOptionsPublicId: cloudinaryOptions.posterOptions && hasConfig(cloudinaryOptions.posterOptions.publicId)
|
|
4746
4746
|
};
|
|
4747
4747
|
};
|
|
4748
|
+
const getTranscriptOptions = function () {
|
|
4749
|
+
let textTracks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4750
|
+
const tracksArr = [textTracks.captions, ...textTracks.subtitles];
|
|
4751
|
+
return {
|
|
4752
|
+
textTracks: hasConfig(textTracks),
|
|
4753
|
+
pacedTextTracks: hasConfig(textTracks) && JSON.stringify(textTracks || {}).includes('"maxWords":') || null,
|
|
4754
|
+
wordHighlight: hasConfig(textTracks) && JSON.stringify(textTracks || {}).includes('"wordHighlight":') || null,
|
|
4755
|
+
transcriptAutoLoaded: tracksArr.some(track => !track.url) || null,
|
|
4756
|
+
transcriptFromURl: tracksArr.some(track => track.url?.endsWith('.transcript')) || null,
|
|
4757
|
+
transcriptLanguages: tracksArr.filter(track => !track.url).map(track => track.language || '').join(',') || null,
|
|
4758
|
+
vttFromUrl: tracksArr.some(track => track.url?.endsWith('.vtt')) || null
|
|
4759
|
+
};
|
|
4760
|
+
};
|
|
4748
4761
|
const getSourceOptions = function () {
|
|
4749
4762
|
let sourceOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4750
4763
|
return {
|
|
@@ -4758,9 +4771,7 @@ const getSourceOptions = function () {
|
|
|
4758
4771
|
sourceInfoDescription: sourceOptions.info.description
|
|
4759
4772
|
} : {}),
|
|
4760
4773
|
...(sourceOptions.textTracks ? {
|
|
4761
|
-
textTracks
|
|
4762
|
-
pacedTextTracks: hasConfig(sourceOptions.textTracks) && JSON.stringify(sourceOptions.textTracks || {}).includes('"maxWords":'),
|
|
4763
|
-
wordHighlight: hasConfig(sourceOptions.textTracks) && JSON.stringify(sourceOptions.textTracks || {}).includes('"wordHighlight":'),
|
|
4774
|
+
...(hasConfig(sourceOptions.textTracks) && getTranscriptOptions(sourceOptions.textTracks)),
|
|
4764
4775
|
...(sourceOptions.textTracks.options ? {
|
|
4765
4776
|
styledTextTracksTheme: sourceOptions.textTracks.options.theme,
|
|
4766
4777
|
styledTextTracksFont: sourceOptions.textTracks.options.fontFace,
|
|
@@ -5349,7 +5360,7 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
|
|
|
5349
5360
|
const analyticsData = (0,_utils_get_analytics_player_options__WEBPACK_IMPORTED_MODULE_18__.getAnalyticsFromPlayerOptions)(options);
|
|
5350
5361
|
const analyticsParams = new URLSearchParams(analyticsData).toString();
|
|
5351
5362
|
const baseParams = new URLSearchParams({
|
|
5352
|
-
vpVersion: "2.1.2-edge.
|
|
5363
|
+
vpVersion: "2.1.2-edge.2",
|
|
5353
5364
|
vpInstanceId: this.getVPInstanceId(),
|
|
5354
5365
|
// #if (process.env.WEBPACK_BUILD_LIGHT)
|
|
5355
5366
|
vpLightBuild: true,
|