From 7552998726656d83ba228460b4dc687ae9d0c94d Mon Sep 17 00:00:00 2001 From: jakub-roch <70572646+jakub-roch@users.noreply.github.com> Date: Thu, 7 Nov 2024 10:50:01 +0100 Subject: [PATCH 1/2] fix: one event for internal analytics (#728) * fix: one event for internal analytics --- src/plugins/cloudinary/index.js | 2 +- src/video-player.js | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/plugins/cloudinary/index.js b/src/plugins/cloudinary/index.js index 7389881d..453c9d59 100644 --- a/src/plugins/cloudinary/index.js +++ b/src/plugins/cloudinary/index.js @@ -90,7 +90,7 @@ class CloudinaryContext { refresh(); } - this.player.trigger('cldsourcechanged', { source: src }); + this.player.trigger('cldsourcechanged', { source: src, sourceOptions: options }); return _chainTarget; }; diff --git a/src/video-player.js b/src/video-player.js index c1597415..61f1b180 100644 --- a/src/video-player.js +++ b/src/video-player.js @@ -475,8 +475,8 @@ class VideoPlayer extends Utils.mixin(Eventable) { } } - _onSourceChange() { - this._sendInternalAnalytics(); + _onSourceChange(e, { sourceOptions }) { + this._sendInternalAnalytics({ ...(sourceOptions ?? { source: sourceOptions }) }); // #if (!process.env.WEBPACK_BUILD_LIGHT) this._initQualitySelector(); // #endif @@ -541,8 +541,6 @@ class VideoPlayer extends Utils.mixin(Eventable) { }); } - this._sendInternalAnalytics({ source: options }); - if (publicId instanceof VideoSource) { return this.videojs.cloudinary.source(publicId, options); } From 9707d4d13fd91b3f572d02413979a2f47fb1edd3 Mon Sep 17 00:00:00 2001 From: cloudinary-jenkins Date: Thu, 7 Nov 2024 12:41:08 +0200 Subject: [PATCH 2/2] chore(edge): release 2.1.2-edge.0 (#732) --- CHANGELOG-edge.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG-edge.md b/CHANGELOG-edge.md index 1dab850f..4f4457b9 100644 --- a/CHANGELOG-edge.md +++ b/CHANGELOG-edge.md @@ -1,5 +1,12 @@ # Changelog +## [2.1.2-edge.0](https://github.com/cloudinary/cloudinary-video-player/compare/v2.1.1-edge.2...v2.1.2-edge.0) (2024-11-07) + + +### Bug Fixes + +* one event for internal analytics ([#728](https://github.com/cloudinary/cloudinary-video-player/issues/728)) ([7552998](https://github.com/cloudinary/cloudinary-video-player/commit/7552998726656d83ba228460b4dc687ae9d0c94d)) + ## [2.1.1-edge.2](https://github.com/cloudinary/cloudinary-video-player/compare/v2.1.1-edge.1...v2.1.1-edge.2) (2024-10-27) diff --git a/package-lock.json b/package-lock.json index 2489fb02..d0d7f597 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cloudinary-video-player", - "version": "2.1.1-edge.2", + "version": "2.1.2-edge.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cloudinary-video-player", - "version": "2.1.1-edge.2", + "version": "2.1.2-edge.0", "license": "MIT", "dependencies": { "@cloudinary/url-gen": "^1.20.0", diff --git a/package.json b/package.json index a3655537..b18b3b67 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudinary-video-player", - "version": "2.1.1-edge.2", + "version": "2.1.2-edge.0", "description": "Cloudinary Video Player", "author": "Cloudinary", "license": "MIT",