From acbffe9c0f2c1761fef11d49fb3da97734b000e5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 28 Feb 2018 09:39:08 +0100 Subject: [PATCH] Add max video height on mobile --- .../videos/+video-watch/video-watch.component.scss | 3 ++- server/controllers/client.ts | 12 ++++++++---- 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 @@ width: 888px; height: 500px; - @media screen and (max-width: 800px) { + @media screen and (max-width: 600px) { height: auto; + max-height: calc(100vh - #{$header-height}); } // 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) { '@type': 'VideoObject', name: videoNameEscaped, description: videoDescriptionEscaped, + thumbnailUrl: previewUrl, + uploadDate: video.createdAt.toISOString(), duration: video.getActivityStreamDuration(), - thumbnailURL: previewUrl, - contentURL: videoUrl, - embedURL: embedUrl, - uploadDate: video.createdAt + contentUrl: videoUrl, + embedUrl: embedUrl, + interactionCount: video.views } let tagsString = '' @@ -124,6 +125,9 @@ function addOpenGraphAndOEmbedTags (htmlStringPage: string, video: VideoModel) { // Schema.org tagsString += `` + // SEO + tagsString += `` + return htmlStringPage.replace(OPENGRAPH_AND_OEMBED_COMMENT, tagsString) } -- 2.25.1