Skip to content

Commit

Permalink
fix: one event for internal analytics (#728)
Browse files Browse the repository at this point in the history
* fix: one event for internal analytics
  • Loading branch information
jakub-roch authored Nov 7, 2024
1 parent e6c9a9c commit 7552998
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/plugins/cloudinary/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class CloudinaryContext {
refresh();
}

this.player.trigger('cldsourcechanged', { source: src });
this.player.trigger('cldsourcechanged', { source: src, sourceOptions: options });

return _chainTarget;
};
Expand Down
6 changes: 2 additions & 4 deletions src/video-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 7552998

Please sign in to comment.