Add max video height on mobile
authorChocobozzz <me@florianbigard.com>
Wed, 28 Feb 2018 08:39:08 +0000 (09:39 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 28 Feb 2018 08:39:08 +0000 (09:39 +0100)
client/src/app/videos/+video-watch/video-watch.component.scss
server/controllers/client.ts

index eb701e0abac6d51587f1a6b24536680ce11edcef..11518633c075074de04126a736b6ea9dba84625f 100644 (file)
@@ -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
index df2eee9c987278711ffc3f1f1ce85668441a390b..b5dc7b7eddf13d9ca2cc121dfa16ff065852e8f8 100644 (file)
@@ -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 += `<script type="application/ld+json">${JSON.stringify(schemaTags)}</script>`
 
+  // SEO
+  tagsString += `<link rel="canonical" href="${videoUrl}" />`
+
   return htmlStringPage.replace(OPENGRAPH_AND_OEMBED_COMMENT, tagsString)
 }