aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/standalone
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/standalone')
-rw-r--r--client/src/standalone/videos/embed.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts
index 3193ae6ef..9076f1dc9 100644
--- a/client/src/standalone/videos/embed.ts
+++ b/client/src/standalone/videos/embed.ts
@@ -6,8 +6,12 @@ import '../../assets/player/peertube-videojs-plugin'
6import 'videojs-dock/dist/videojs-dock.es.js' 6import 'videojs-dock/dist/videojs-dock.es.js'
7import { VideoDetails } from '../../../../shared' 7import { VideoDetails } from '../../../../shared'
8 8
9function getVideoUrl (id: string) {
10 return window.location.origin + '/api/v1/videos/' + videoId
11}
12
9async function loadVideoInfo (videoId: string): Promise<VideoDetails> { 13async function loadVideoInfo (videoId: string): Promise<VideoDetails> {
10 const response = await fetch(window.location.origin + '/api/v1/videos/' + videoId) 14 const response = await fetch(getVideoUrl(videoId))
11 return response.json() 15 return response.json()
12} 16}
13 17
@@ -27,7 +31,8 @@ loadVideoInfo(videoId)
27 peertube: { 31 peertube: {
28 videoFiles: videoInfo.files, 32 videoFiles: videoInfo.files,
29 playerElement: videoElement, 33 playerElement: videoElement,
30 peerTubeLink: true 34 peerTubeLink: true,
35 videoViewUrl: getVideoUrl(videoId) + '/views'
31 }, 36 },
32 hotkeys: { 37 hotkeys: {
33 enableVolumeScroll: false 38 enableVolumeScroll: false