@folklore/tracking
Advanced tools
Comparing version 0.0.23 to 0.0.24
@@ -215,3 +215,4 @@ 'use strict'; | ||
thumbnail = null, | ||
progressSteps = [0.1, 0.25, 0.5, 0.75, 0.9] | ||
progressSteps = [0.1, 0.25, 0.5, 0.75, 0.9, 1.0], | ||
onProgress = null | ||
} = params || {}; | ||
@@ -281,2 +282,5 @@ const tracking = useTracking$1(); | ||
})); | ||
if (onProgress !== null) { | ||
onProgress(step); | ||
} | ||
}); | ||
@@ -295,3 +299,3 @@ if (stepsToTrack !== null && stepsToTrack.length > 0) { | ||
} | ||
}, [currentTime, progressTrackedRef.current, id]); | ||
}, [currentTime, progressTrackedRef.current, id, onProgress]); | ||
} | ||
@@ -298,0 +302,0 @@ |
@@ -206,3 +206,4 @@ import { v4 } from 'uuid'; | ||
thumbnail = null, | ||
progressSteps = [0.1, 0.25, 0.5, 0.75, 0.9] | ||
progressSteps = [0.1, 0.25, 0.5, 0.75, 0.9, 1.0], | ||
onProgress = null | ||
} = params || {}; | ||
@@ -272,2 +273,5 @@ const tracking = useTracking$1(); | ||
})); | ||
if (onProgress !== null) { | ||
onProgress(step); | ||
} | ||
}); | ||
@@ -286,5 +290,5 @@ if (stepsToTrack !== null && stepsToTrack.length > 0) { | ||
} | ||
}, [currentTime, progressTrackedRef.current, id]); | ||
}, [currentTime, progressTrackedRef.current, id, onProgress]); | ||
} | ||
export { Tracking$1 as Tracking, TrackingContainer, TrackingContext$1 as TrackingContext, Tracking$1 as default, useTracking$1 as useTracking, useVideoTracking, withTracking$1 as withTracking }; |
{ | ||
"name": "@folklore/tracking", | ||
"version": "0.0.23", | ||
"version": "0.0.24", | ||
"description": "Tracking utilities", | ||
@@ -54,3 +54,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "9bd23dcb6eb2c28a53fa4d93326ed650a9a42393" | ||
"gitHead": "df836ad45cb4ebccaa3f66a825c67719f35eddb3" | ||
} |
18548
579