aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/standalone/videos/shared/playlist-tracker.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/standalone/videos/shared/playlist-tracker.ts')
-rw-r--r--client/src/standalone/videos/shared/playlist-tracker.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/standalone/videos/shared/playlist-tracker.ts b/client/src/standalone/videos/shared/playlist-tracker.ts
index 75d10b4e2..9ea4be83f 100644
--- a/client/src/standalone/videos/shared/playlist-tracker.ts
+++ b/client/src/standalone/videos/shared/playlist-tracker.ts
@@ -1,4 +1,5 @@
1import { VideoPlaylist, VideoPlaylistElement } from '../../../../../shared/models' 1import { VideoPlaylist, VideoPlaylistElement } from '../../../../../shared/models'
2import { logger } from '../../../root-helpers'
2 3
3export class PlaylistTracker { 4export class PlaylistTracker {
4 private currentPlaylistElement: VideoPlaylistElement 5 private currentPlaylistElement: VideoPlaylistElement
@@ -68,7 +69,7 @@ export class PlaylistTracker {
68 setPosition (position: number) { 69 setPosition (position: number) {
69 this.currentPlaylistElement = this.playlistElements.find(e => e.position === position) 70 this.currentPlaylistElement = this.playlistElements.find(e => e.position === position)
70 if (!this.currentPlaylistElement || !this.currentPlaylistElement.video) { 71 if (!this.currentPlaylistElement || !this.currentPlaylistElement.video) {
71 console.error('Current playlist element is not valid.', this.currentPlaylistElement) 72 logger.error('Current playlist element is not valid.', this.currentPlaylistElement)
72 this.currentPlaylistElement = this.getNextPlaylistElement() 73 this.currentPlaylistElement = this.getNextPlaylistElement()
73 } 74 }
74 75