diff --git a/src/player.js b/src/player.js index e03c3e1b..17b13e37 100644 --- a/src/player.js +++ b/src/player.js @@ -429,7 +429,7 @@ class ClapperPlayer extends GstClapper.Clapper return false; const now = this.position / Gst.SECOND; - const chapterTimes = Object.keys(chapters); + const chapterTimes = Object.keys(chapters).sort((a, b) => a - b); if(isPrevious) chapterTimes.reverse();