Skip to content

Commit

Permalink
#THM-805 make edit suggested in PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-lienau committed May 20, 2024
1 parent 7eea1ac commit 9d48c2d
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,13 @@ function TrackScrubberButton({ player, trackScrubberRef, timeToolRef, isPlaylist
In playlists, markers are timepoint information representing highlighting annotations,
therefore omit reading markers information for track scrubber in playlist contexts.
*/
if (player.markers && typeof player.makrers !== 'function' && player.markers.getMarkers()?.length > 0 && !isPlaylist) {
const track = player.markers.getMarkers()[0];
if (track.key != currentTrack?.key) {
setCurrentTrack(track);
if (player.markers && typeof player.markers !== 'function' && !isPlaylist) {
const markers = player.markers.getMarkers();
if (markers.length) {
const track = markers.filter(m => m.class == 'ramp--track-marker--fragment');
if (track?.length > 0 && track[0].key !== currentTrack?.key) {
setCurrentTrack(track[0]);
}
}
}
/*
Expand Down

0 comments on commit 9d48c2d

Please sign in to comment.