Skip to content

Commit

Permalink
fix: source analytics (#738)
Browse files Browse the repository at this point in the history
* fix: source analytics

* chore: cleanup
  • Loading branch information
tsi authored Nov 26, 2024
1 parent bc732f9 commit 6c6f126
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/utils/get-analytics-player-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const getAnalyticsFromPlayerOptions = (playerOptions) => filterDefaultsAn
controlBar: (JSON.stringify(playerOptions.controlBar) !== JSON.stringify(defaults.controlBar)) && JSON.stringify(playerOptions.controlBar),

...getCloudinaryOptions(playerOptions.cloudinary),
...getSourceOptions(playerOptions.source),
...getSourceOptions(playerOptions.sourceOptions),
...getAdsOptions(playerOptions.ads),
...getPlaylistWidgetOptions(playerOptions.playlistWidget)
});
2 changes: 1 addition & 1 deletion src/video-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ class VideoPlayer extends Utils.mixin(Eventable) {
}

_onSourceChange(e, { sourceOptions }) {
this._sendInternalAnalytics({ ...(sourceOptions ?? { source: sourceOptions }) });
this._sendInternalAnalytics({ ...(sourceOptions && { sourceOptions }) });
// #if (!process.env.WEBPACK_BUILD_LIGHT)
this._initQualitySelector();
// #endif
Expand Down

0 comments on commit 6c6f126

Please sign in to comment.