Skip to content

Commit a7942be

Browse files
Fix: Fix mediaContentComplete calculation (#66) (#68)
1 parent 38e472d commit a7942be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

media/src/main/java/com/mparticle/media/MediaSession.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ class MediaSession protected constructor(builder: Builder) {
602602
}
603603

604604
mediaSessionEndTimestamp = System.currentTimeMillis()
605-
if (mediaContentCompleteLimit < 100 && (duration != null && currentPlayheadPosition != null) && ((currentPlayheadPosition!! / duration!!) >= (mediaContentCompleteLimit / 100))) {
605+
if (mediaContentCompleteLimit < 100 && (duration != null && currentPlayheadPosition != null) && ((currentPlayheadPosition!! / duration!!.toDouble()) >= (mediaContentCompleteLimit / 100.0))) {
606606
mediaContentComplete = true
607607
}
608608

0 commit comments

Comments
 (0)