aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-07-12 12:16:13 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-07-12 12:16:13 +0200
commit43f61d2635113001c3d19e3299d8700a00d47e48 (patch)
treeb47aa13c08a4d98df974dfcba47b1b2a468127ff
parentf981dae8617271a2dc713bb683951730b306e0c5 (diff)
downloadPeerTube-43f61d2635113001c3d19e3299d8700a00d47e48.tar.gz
PeerTube-43f61d2635113001c3d19e3299d8700a00d47e48.tar.zst
PeerTube-43f61d2635113001c3d19e3299d8700a00d47e48.zip
Add preview to embed
-rw-r--r--client/src/app/videos/shared/video.model.ts5
-rw-r--r--client/src/standalone/videos/embed.html7
2 files changed, 8 insertions, 4 deletions
diff --git a/client/src/app/videos/shared/video.model.ts b/client/src/app/videos/shared/video.model.ts
index 9ed6a0641..f0556343f 100644
--- a/client/src/app/videos/shared/video.model.ts
+++ b/client/src/app/videos/shared/video.model.ts
@@ -23,6 +23,8 @@ export class Video implements VideoServerModel {
23 tags: string[] 23 tags: string[]
24 thumbnailPath: string 24 thumbnailPath: string
25 thumbnailUrl: string 25 thumbnailUrl: string
26 previewPath: string
27 previewUrl: string
26 views: number 28 views: number
27 likes: number 29 likes: number
28 dislikes: number 30 dislikes: number
@@ -60,6 +62,7 @@ export class Video implements VideoServerModel {
60 podHost: string, 62 podHost: string,
61 tags: string[], 63 tags: string[],
62 thumbnailPath: string, 64 thumbnailPath: string,
65 previewPath: string,
63 views: number, 66 views: number,
64 likes: number, 67 likes: number,
65 dislikes: number, 68 dislikes: number,
@@ -85,6 +88,8 @@ export class Video implements VideoServerModel {
85 this.tags = hash.tags 88 this.tags = hash.tags
86 this.thumbnailPath = hash.thumbnailPath 89 this.thumbnailPath = hash.thumbnailPath
87 this.thumbnailUrl = API_URL + hash.thumbnailPath 90 this.thumbnailUrl = API_URL + hash.thumbnailPath
91 this.previewPath = hash.previewPath
92 this.previewUrl = API_URL + hash.previewPath
88 this.views = hash.views 93 this.views = hash.views
89 this.likes = hash.likes 94 this.likes = hash.likes
90 this.dislikes = hash.dislikes 95 this.dislikes = hash.dislikes
diff --git a/client/src/standalone/videos/embed.html b/client/src/standalone/videos/embed.html
index 0a1c3eadf..365dc3fa2 100644
--- a/client/src/standalone/videos/embed.html
+++ b/client/src/standalone/videos/embed.html
@@ -88,10 +88,9 @@
88 88
89 loadVideoInfos(videoId, function (videoInfos) { 89 loadVideoInfos(videoId, function (videoInfos) {
90 var magnetUri = videoInfos.magnetUri 90 var magnetUri = videoInfos.magnetUri
91 // FIXME: use poster? 91 var videoContainer = document.getElementById('video-container')
92 // var videoContainer = document.getElementById('video-container') 92 var previewUrl = window.location.protocol + '//' + videoInfos.podHost + videoInfos.previewPath
93 // var thumbnailUrl = 'http://' + videoInfos.podUrl + videoInfos.thumbnailPath 93 videoContainer.poster = previewUrl
94 // videoContainer.poster = thumbnailUrl
95 94
96 videojs('video-container', { controls: true, autoplay: false }, function () { 95 videojs('video-container', { controls: true, autoplay: false }, function () {
97 var player = this 96 var player = this