aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/standalone/videos
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/standalone/videos')
-rw-r--r--client/src/standalone/videos/shared/playlist-tracker.ts6
-rw-r--r--client/src/standalone/videos/tsconfig.json4
2 files changed, 5 insertions, 5 deletions
diff --git a/client/src/standalone/videos/shared/playlist-tracker.ts b/client/src/standalone/videos/shared/playlist-tracker.ts
index 9ea4be83f..d8708826d 100644
--- a/client/src/standalone/videos/shared/playlist-tracker.ts
+++ b/client/src/standalone/videos/shared/playlist-tracker.ts
@@ -32,7 +32,7 @@ export class PlaylistTracker {
32 32
33 const next = this.playlistElements.find(e => e.position === position) 33 const next = this.playlistElements.find(e => e.position === position)
34 34
35 if (!next || !next.video) { 35 if (!next?.video) {
36 return this.getNextPlaylistElement(position + 1) 36 return this.getNextPlaylistElement(position + 1)
37 } 37 }
38 38
@@ -52,7 +52,7 @@ export class PlaylistTracker {
52 52
53 const prev = this.playlistElements.find(e => e.position === position) 53 const prev = this.playlistElements.find(e => e.position === position)
54 54
55 if (!prev || !prev.video) { 55 if (!prev?.video) {
56 return this.getNextPlaylistElement(position - 1) 56 return this.getNextPlaylistElement(position - 1)
57 } 57 }
58 58
@@ -68,7 +68,7 @@ export class PlaylistTracker {
68 68
69 setPosition (position: number) { 69 setPosition (position: number) {
70 this.currentPlaylistElement = this.playlistElements.find(e => e.position === position) 70 this.currentPlaylistElement = this.playlistElements.find(e => e.position === position)
71 if (!this.currentPlaylistElement || !this.currentPlaylistElement.video) { 71 if (!this.currentPlaylistElement?.video) {
72 logger.error('Current playlist element is not valid.', this.currentPlaylistElement) 72 logger.error('Current playlist element is not valid.', this.currentPlaylistElement)
73 this.currentPlaylistElement = this.getNextPlaylistElement() 73 this.currentPlaylistElement = this.getNextPlaylistElement()
74 } 74 }
diff --git a/client/src/standalone/videos/tsconfig.json b/client/src/standalone/videos/tsconfig.json
index e0cab7ca3..7d532985c 100644
--- a/client/src/standalone/videos/tsconfig.json
+++ b/client/src/standalone/videos/tsconfig.json
@@ -1,7 +1,7 @@
1{ 1{
2 "extends": "../../../tsconfig.json", 2 "extends": "../../../tsconfig.json",
3 "include": [ 3 "include": [
4 "src/standalone/videos/embed.ts", 4 "./embed.ts",
5 "src/standalone/videos/test-embed.ts" 5 "./test-embed.ts"
6 ] 6 ]
7} 7}