aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-02-28 09:39:08 +0100
committerChocobozzz <me@florianbigard.com>2018-02-28 09:39:08 +0100
commitacbffe9c0f2c1761fef11d49fb3da97734b000e5 (patch)
tree013a453379da3d223f1f36721354ebc238c4d065
parent7ccfb37f328f2b2c338019238e58344032d5a381 (diff)
downloadPeerTube-acbffe9c0f2c1761fef11d49fb3da97734b000e5.tar.gz
PeerTube-acbffe9c0f2c1761fef11d49fb3da97734b000e5.tar.zst
PeerTube-acbffe9c0f2c1761fef11d49fb3da97734b000e5.zip
Add max video height on mobile
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.scss3
-rw-r--r--server/controllers/client.ts12
2 files changed, 10 insertions, 5 deletions
diff --git a/client/src/app/videos/+video-watch/video-watch.component.scss b/client/src/app/videos/+video-watch/video-watch.component.scss
index eb701e0ab..11518633c 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.scss
+++ b/client/src/app/videos/+video-watch/video-watch.component.scss
@@ -10,8 +10,9 @@
10 width: 888px; 10 width: 888px;
11 height: 500px; 11 height: 500px;
12 12
13 @media screen and (max-width: 800px) { 13 @media screen and (max-width: 600px) {
14 height: auto; 14 height: auto;
15 max-height: calc(100vh - #{$header-height});
15 } 16 }
16 17
17 // VideoJS create an inner video player 18 // VideoJS create an inner video player
diff --git a/server/controllers/client.ts b/server/controllers/client.ts
index df2eee9c9..b5dc7b7ed 100644
--- a/server/controllers/client.ts
+++ b/server/controllers/client.ts
@@ -100,11 +100,12 @@ function addOpenGraphAndOEmbedTags (htmlStringPage: string, video: VideoModel) {
100 '@type': 'VideoObject', 100 '@type': 'VideoObject',
101 name: videoNameEscaped, 101 name: videoNameEscaped,
102 description: videoDescriptionEscaped, 102 description: videoDescriptionEscaped,
103 thumbnailUrl: previewUrl,
104 uploadDate: video.createdAt.toISOString(),
103 duration: video.getActivityStreamDuration(), 105 duration: video.getActivityStreamDuration(),
104 thumbnailURL: previewUrl, 106 contentUrl: videoUrl,
105 contentURL: videoUrl, 107 embedUrl: embedUrl,
106 embedURL: embedUrl, 108 interactionCount: video.views
107 uploadDate: video.createdAt
108 } 109 }
109 110
110 let tagsString = '' 111 let tagsString = ''
@@ -124,6 +125,9 @@ function addOpenGraphAndOEmbedTags (htmlStringPage: string, video: VideoModel) {
124 // Schema.org 125 // Schema.org
125 tagsString += `<script type="application/ld+json">${JSON.stringify(schemaTags)}</script>` 126 tagsString += `<script type="application/ld+json">${JSON.stringify(schemaTags)}</script>`
126 127
128 // SEO
129 tagsString += `<link rel="canonical" href="${videoUrl}" />`
130
127 return htmlStringPage.replace(OPENGRAPH_AND_OEMBED_COMMENT, tagsString) 131 return htmlStringPage.replace(OPENGRAPH_AND_OEMBED_COMMENT, tagsString)
128} 132}
129 133