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", 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); }