Skip to content

Commit 5f571d7

Browse files
committed
Round youtube volume sent on volumechange (closes #1126)
#1127
1 parent 6a4b13d commit 5f571d7

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@snowplow/browser-plugin-youtube-tracking",
5+
"comment": "Round youtube volume sent on volumechange (closes #1126)",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@snowplow/browser-plugin-youtube-tracking"
10+
}

plugins/browser-plugin-youtube-tracking/src/buildYouTubeEvent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function getMediaPlayerEntities(
8989
muted: player.isMuted(),
9090
paused: playerStates[YT.PlayerState.PAUSED],
9191
playbackRate: player.getPlaybackRate(),
92-
volume: player.getVolume(),
92+
volume: Math.round(player.getVolume()),
9393
};
9494

9595
if (e === SnowplowEvent.PERCENTPROGRESS) {

0 commit comments

Comments
 (0)