Skip to content

Commit

Permalink
Fix redundant level rendering in demo timline
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Walch committed Dec 2, 2020
1 parent 39f46f5 commit 5002726
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demo/chart/timeline-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export class TimelineChart {
borderColor = 'rgba(160, 0, 160, 1.0)';
}
datasets.push(datasetWithDefaults({
url: Array.isArray(level.url) ? level.url[0] : level.url,
url: Array.isArray(level.url) ? level.url[level.urlId || 0] : level.url,
trackType: 'level',
borderColor,
level: index
Expand All @@ -206,7 +206,7 @@ export class TimelineChart {
audioTracks.forEach((track: MediaPlaylist, i) => {
labels.push(getAudioTrackName(track, i));
datasets.push(datasetWithDefaults({
url: Array.isArray(track.url) ? track.url[0] : track.url,
url: track.url,
trackType: 'audioTrack',
borderColor: audioTrack === i ? 'rgba(32, 32, 240, 1.0)' : null,
audioTrack: i
Expand All @@ -227,7 +227,7 @@ export class TimelineChart {
subtitles.forEach((track, i) => {
labels.push(getSubtitlesName(track, i));
datasets.push(datasetWithDefaults({
url: Array.isArray(track.url) ? track.url[0] : track.url,
url: track.url,
trackType: 'subtitleTrack',
borderColor: subtitleTrack === i ? 'rgba(32, 32, 240, 1.0)' : null,
subtitleTrack: i
Expand Down

0 comments on commit 5002726

Please sign in to comment.