Skip to content

Commit 4a5b5b1

Browse files
tsiclaude
andauthored
fix: report hdr source option in internal analytics (#1053)
* fix: report hdr source option in internal analytics The hdr field used hasConfig() (lodash isEmpty) which always returns null for booleans, so it was filtered out and never sent. Report the boolean directly instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix: report analytics and download source options in internal analytics Same hasConfig() (lodash isEmpty) bug as hdr: both are booleans that always collapsed to null and were filtered out, so they were never sent. Report the boolean directly instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 22bb57f commit 4a5b5b1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/utils/get-analytics-player-options.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const getSourceOptions = (sourceOptions = {}) => ({
2929
return undefined;
3030
})(),
3131
visualSearch: sourceOptions.visualSearch,
32-
download: hasConfig(sourceOptions.download),
33-
hdr: hasConfig(sourceOptions.hdr),
32+
download: sourceOptions.download === true ? true : undefined,
33+
hdr: sourceOptions.hdr === true ? true : undefined,
3434
recommendations: sourceOptions.recommendations && sourceOptions.recommendations.length,
3535
...(hasConfig(sourceOptions.adaptiveStreaming) ? {
3636
abrStrategy: sourceOptions?.adaptiveStreaming?.strategy === defaults.adaptiveStreaming.strategy ? undefined : sourceOptions?.adaptiveStreaming?.strategy,
@@ -96,7 +96,7 @@ const getPlaylistOptions = (playlistWidgetOptions = {}) => ({
9696

9797
export const getAnalyticsFromPlayerOptions = (playerOptions) => filterDefaultsAndNulls({
9898
aiHighlightsGraph: playerOptions.aiHighlightsGraph,
99-
analytics: hasConfig(playerOptions.analytics),
99+
analytics: playerOptions.analytics === true ? true : undefined,
100100
autoplay: playerOptions.autoplay,
101101
autoplayMode: playerOptions.autoplayMode,
102102
bigPlayButton: playerOptions.bigPlayButton,

0 commit comments

Comments
 (0)