cloudinary-video-player 2.4.2-edge.0 → 2.4.2-edge.1
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 +12 -13
- package/dist/cld-video-player.light.js +12 -13
- 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/light/index.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
|
@@ -8979,7 +8979,7 @@ const EVENT_DEFAULTS = {
|
|
|
8979
8979
|
const DEFAULT_OPTIONS = {
|
|
8980
8980
|
events: DEFAULT_EVENTS,
|
|
8981
8981
|
category: 'Video',
|
|
8982
|
-
defaultLabel: player => player.cloudinary
|
|
8982
|
+
defaultLabel: player => player.cloudinary?.currentPublicId() || player.currentSource().src
|
|
8983
8983
|
};
|
|
8984
8984
|
class AnalyticsPlugin {
|
|
8985
8985
|
constructor(player) {
|
|
@@ -9189,13 +9189,12 @@ class AnalyticsPlugin {
|
|
|
9189
9189
|
nonInteraction = false
|
|
9190
9190
|
} = _ref;
|
|
9191
9191
|
const eventData = {
|
|
9192
|
-
|
|
9193
|
-
|
|
9194
|
-
|
|
9195
|
-
|
|
9196
|
-
nonInteraction: nonInteraction
|
|
9192
|
+
event_category: this.options.category,
|
|
9193
|
+
event_label: label || this.options.defaultLabel(this.player),
|
|
9194
|
+
value: value || Math.round(this.player.currentTime()),
|
|
9195
|
+
non_interaction: nonInteraction
|
|
9197
9196
|
};
|
|
9198
|
-
window.
|
|
9197
|
+
window.gtag('event', action, eventData);
|
|
9199
9198
|
}
|
|
9200
9199
|
videoload() {
|
|
9201
9200
|
this.track({
|
|
@@ -9389,7 +9388,7 @@ class CloudinaryAnalytics {
|
|
|
9389
9388
|
this.cloudinaryAnalytics.startManualTracking(metadata, {
|
|
9390
9389
|
...(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(this.analyticsOptions) ? this.analyticsOptions : {}),
|
|
9391
9390
|
videoPlayerType: 'cloudinary video player',
|
|
9392
|
-
videoPlayerVersion: "2.4.2-edge.
|
|
9391
|
+
videoPlayerVersion: "2.4.2-edge.1"
|
|
9393
9392
|
});
|
|
9394
9393
|
} else if (this.currentVideMetadata.cloudName !== metadata.cloudName || this.currentVideMetadata.publicId !== metadata.publicId) {
|
|
9395
9394
|
this.cloudinaryAnalytics.stopManualTracking();
|
|
@@ -9762,7 +9761,7 @@ class CloudinaryContext {
|
|
|
9762
9761
|
options.sourceTypes = options.sourceTypes || _this.sourceTypes();
|
|
9763
9762
|
options.poster = options.poster || posterOptionsForCurrent();
|
|
9764
9763
|
options.queryParams = Object.assign(options.queryParams || {}, options.usageReport ? {
|
|
9765
|
-
_s: `vp-${"2.4.2-edge.
|
|
9764
|
+
_s: `vp-${"2.4.2-edge.1"}`
|
|
9766
9765
|
} : {});
|
|
9767
9766
|
if (options.sourceTypes.indexOf('audio') > -1) {
|
|
9768
9767
|
builtSrc = new _models_audio_source_audio_source__WEBPACK_IMPORTED_MODULE_7__["default"](publicId, options);
|
|
@@ -11029,7 +11028,7 @@ const contextMenuContent = player => {
|
|
|
11029
11028
|
const isFullscreen = player.isFullscreen();
|
|
11030
11029
|
const aboutMenuItem = {
|
|
11031
11030
|
class: 'player-version',
|
|
11032
|
-
label: 'Cloudinary Player v' + "2.4.2-edge.
|
|
11031
|
+
label: 'Cloudinary Player v' + "2.4.2-edge.1"
|
|
11033
11032
|
};
|
|
11034
11033
|
if (!player.controls()) {
|
|
11035
11034
|
return [aboutMenuItem];
|
|
@@ -13812,7 +13811,7 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
|
|
|
13812
13811
|
const analyticsData = (0,_utils_get_analytics_player_options__WEBPACK_IMPORTED_MODULE_18__.getAnalyticsFromPlayerOptions)(options);
|
|
13813
13812
|
const analyticsParams = new URLSearchParams(analyticsData).toString();
|
|
13814
13813
|
const baseParams = new URLSearchParams({
|
|
13815
|
-
vpVersion: "2.4.2-edge.
|
|
13814
|
+
vpVersion: "2.4.2-edge.1",
|
|
13816
13815
|
vpInstanceId: this.getVPInstanceId(),
|
|
13817
13816
|
// #if (process.env.WEBPACK_BUILD_LIGHT)
|
|
13818
13817
|
// vpLightBuild: true,
|
|
@@ -14096,8 +14095,8 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
|
|
|
14096
14095
|
}
|
|
14097
14096
|
_initAnalytics() {
|
|
14098
14097
|
const analyticsOpts = this.playerOptions.analytics;
|
|
14099
|
-
if (!window.
|
|
14100
|
-
console.error('Google Analytics script is missing');
|
|
14098
|
+
if (!window.gtag && analyticsOpts) {
|
|
14099
|
+
console.error('Google Analytics script (gtag) is missing.');
|
|
14101
14100
|
return;
|
|
14102
14101
|
}
|
|
14103
14102
|
if (analyticsOpts) {
|
|
@@ -1008,7 +1008,7 @@ const EVENT_DEFAULTS = {
|
|
|
1008
1008
|
const DEFAULT_OPTIONS = {
|
|
1009
1009
|
events: DEFAULT_EVENTS,
|
|
1010
1010
|
category: 'Video',
|
|
1011
|
-
defaultLabel: player => player.cloudinary
|
|
1011
|
+
defaultLabel: player => player.cloudinary?.currentPublicId() || player.currentSource().src
|
|
1012
1012
|
};
|
|
1013
1013
|
class AnalyticsPlugin {
|
|
1014
1014
|
constructor(player) {
|
|
@@ -1218,13 +1218,12 @@ class AnalyticsPlugin {
|
|
|
1218
1218
|
nonInteraction = false
|
|
1219
1219
|
} = _ref;
|
|
1220
1220
|
const eventData = {
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
nonInteraction: nonInteraction
|
|
1221
|
+
event_category: this.options.category,
|
|
1222
|
+
event_label: label || this.options.defaultLabel(this.player),
|
|
1223
|
+
value: value || Math.round(this.player.currentTime()),
|
|
1224
|
+
non_interaction: nonInteraction
|
|
1226
1225
|
};
|
|
1227
|
-
window.
|
|
1226
|
+
window.gtag('event', action, eventData);
|
|
1228
1227
|
}
|
|
1229
1228
|
videoload() {
|
|
1230
1229
|
this.track({
|
|
@@ -1418,7 +1417,7 @@ class CloudinaryAnalytics {
|
|
|
1418
1417
|
this.cloudinaryAnalytics.startManualTracking(metadata, {
|
|
1419
1418
|
...(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(this.analyticsOptions) ? this.analyticsOptions : {}),
|
|
1420
1419
|
videoPlayerType: 'cloudinary video player',
|
|
1421
|
-
videoPlayerVersion: "2.4.2-edge.
|
|
1420
|
+
videoPlayerVersion: "2.4.2-edge.1"
|
|
1422
1421
|
});
|
|
1423
1422
|
} else if (this.currentVideMetadata.cloudName !== metadata.cloudName || this.currentVideMetadata.publicId !== metadata.publicId) {
|
|
1424
1423
|
this.cloudinaryAnalytics.stopManualTracking();
|
|
@@ -1791,7 +1790,7 @@ class CloudinaryContext {
|
|
|
1791
1790
|
options.sourceTypes = options.sourceTypes || _this.sourceTypes();
|
|
1792
1791
|
options.poster = options.poster || posterOptionsForCurrent();
|
|
1793
1792
|
options.queryParams = Object.assign(options.queryParams || {}, options.usageReport ? {
|
|
1794
|
-
_s: `vp-${"2.4.2-edge.
|
|
1793
|
+
_s: `vp-${"2.4.2-edge.1"}`
|
|
1795
1794
|
} : {});
|
|
1796
1795
|
if (options.sourceTypes.indexOf('audio') > -1) {
|
|
1797
1796
|
builtSrc = new _models_audio_source_audio_source__WEBPACK_IMPORTED_MODULE_7__["default"](publicId, options);
|
|
@@ -3058,7 +3057,7 @@ const contextMenuContent = player => {
|
|
|
3058
3057
|
const isFullscreen = player.isFullscreen();
|
|
3059
3058
|
const aboutMenuItem = {
|
|
3060
3059
|
class: 'player-version',
|
|
3061
|
-
label: 'Cloudinary Player v' + "2.4.2-edge.
|
|
3060
|
+
label: 'Cloudinary Player v' + "2.4.2-edge.1"
|
|
3062
3061
|
};
|
|
3063
3062
|
if (!player.controls()) {
|
|
3064
3063
|
return [aboutMenuItem];
|
|
@@ -5553,7 +5552,7 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
|
|
|
5553
5552
|
const analyticsData = (0,_utils_get_analytics_player_options__WEBPACK_IMPORTED_MODULE_18__.getAnalyticsFromPlayerOptions)(options);
|
|
5554
5553
|
const analyticsParams = new URLSearchParams(analyticsData).toString();
|
|
5555
5554
|
const baseParams = new URLSearchParams({
|
|
5556
|
-
vpVersion: "2.4.2-edge.
|
|
5555
|
+
vpVersion: "2.4.2-edge.1",
|
|
5557
5556
|
vpInstanceId: this.getVPInstanceId(),
|
|
5558
5557
|
// #if (process.env.WEBPACK_BUILD_LIGHT)
|
|
5559
5558
|
vpLightBuild: true,
|
|
@@ -5836,8 +5835,8 @@ class VideoPlayer extends _utils__WEBPACK_IMPORTED_MODULE_9__["default"].mixin(_
|
|
|
5836
5835
|
}
|
|
5837
5836
|
_initAnalytics() {
|
|
5838
5837
|
const analyticsOpts = this.playerOptions.analytics;
|
|
5839
|
-
if (!window.
|
|
5840
|
-
console.error('Google Analytics script is missing');
|
|
5838
|
+
if (!window.gtag && analyticsOpts) {
|
|
5839
|
+
console.error('Google Analytics script (gtag) is missing.');
|
|
5841
5840
|
return;
|
|
5842
5841
|
}
|
|
5843
5842
|
if (analyticsOpts) {
|