-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Currently in the reference implementation the function fixed_play_time(time) returns played_segments_segment_end if Math.abs(played_segments_segment_end - time) < 1
example:
- play segment: 16.268 _ 16.873
- seek to 15.973
- play to 16.183
- pause
results in:https://w3id.org/xapi/video/extensions/played-segments: "16.268[.]16.873[,]16.873[.]16.183"
expected:https://w3id.org/xapi/video/extensions/played-segments: "16.268[.]16.873[,]15.973[.]16.183"
probable reason: 16.873 - 15.973 = 0.9 < 1
What is the reason for condition Math.abs(played_segments_segment_end - time) >= 1?
Probable fix?
function fixed_play_time(time) {
if (played_segments_segment_end == null) {
return time;
}
var diff = time - played_segments_segment_end;
if( diff <= 1 && diff > 0) {
return played_segments_segment_end;
} else {
return time;
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels