mirror of
https://github.com/mehotkhan/BandersnatchInteractive.git
synced 2025-07-28 01:33:23 +00:00
assets/scripts.js: Fix handling of IDNT segment
This segment does not have an end-time, so treat all timestamps past its start time as belonging to it. Fixes #null appearing in hashes and stored locations.
This commit is contained in:
parent
941c975e36
commit
3e17def067
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ function resolveSegmentGroup(sg) {
|
||||||
/// There will be exactly one segment for any timestamp within the video file.
|
/// There will be exactly one segment for any timestamp within the video file.
|
||||||
function getSegmentId(ms) {
|
function getSegmentId(ms) {
|
||||||
for (const [k, v] of Object.entries(segmentMap.segments)) {
|
for (const [k, v] of Object.entries(segmentMap.segments)) {
|
||||||
if (ms >= v.startTimeMs && ms < v.endTimeMs) {
|
if (ms >= v.startTimeMs && (!v.endTimeMs || ms < v.endTimeMs)) {
|
||||||
return k;
|
return k;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue