diff options
Diffstat (limited to 'client/src/standalone/videos/embed.ts')
-rw-r--r-- | client/src/standalone/videos/embed.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index d0676968e..3193ae6ef 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts | |||
@@ -6,9 +6,9 @@ import '../../assets/player/peertube-videojs-plugin' | |||
6 | import 'videojs-dock/dist/videojs-dock.es.js' | 6 | import 'videojs-dock/dist/videojs-dock.es.js' |
7 | import { VideoDetails } from '../../../../shared' | 7 | import { VideoDetails } from '../../../../shared' |
8 | 8 | ||
9 | async function loadVideoInfo (videoId: string) { | 9 | async function loadVideoInfo (videoId: string): Promise<VideoDetails> { |
10 | const response = await fetch(window.location.origin + '/api/v1/videos/' + videoId) | 10 | const response = await fetch(window.location.origin + '/api/v1/videos/' + videoId) |
11 | return response.json(); | 11 | return response.json() |
12 | } | 12 | } |
13 | 13 | ||
14 | const urlParts = window.location.href.split('/') | 14 | const urlParts = window.location.href.split('/') |
@@ -42,6 +42,4 @@ loadVideoInfo(videoId) | |||
42 | }) | 42 | }) |
43 | }) | 43 | }) |
44 | }) | 44 | }) |
45 | .catch(err => { | 45 | .catch(err => console.error(err)) |
46 | console.error(err); | ||
47 | }) | ||