mirror of https://github.com/Chocobozzz/PeerTube
Add max video height on mobile
parent
7ccfb37f32
commit
acbffe9c0f
|
@ -10,8 +10,9 @@
|
||||||
width: 888px;
|
width: 888px;
|
||||||
height: 500px;
|
height: 500px;
|
||||||
|
|
||||||
@media screen and (max-width: 800px) {
|
@media screen and (max-width: 600px) {
|
||||||
height: auto;
|
height: auto;
|
||||||
|
max-height: calc(100vh - #{$header-height});
|
||||||
}
|
}
|
||||||
|
|
||||||
// VideoJS create an inner video player
|
// VideoJS create an inner video player
|
||||||
|
|
|
@ -100,11 +100,12 @@ function addOpenGraphAndOEmbedTags (htmlStringPage: string, video: VideoModel) {
|
||||||
'@type': 'VideoObject',
|
'@type': 'VideoObject',
|
||||||
name: videoNameEscaped,
|
name: videoNameEscaped,
|
||||||
description: videoDescriptionEscaped,
|
description: videoDescriptionEscaped,
|
||||||
|
thumbnailUrl: previewUrl,
|
||||||
|
uploadDate: video.createdAt.toISOString(),
|
||||||
duration: video.getActivityStreamDuration(),
|
duration: video.getActivityStreamDuration(),
|
||||||
thumbnailURL: previewUrl,
|
contentUrl: videoUrl,
|
||||||
contentURL: videoUrl,
|
embedUrl: embedUrl,
|
||||||
embedURL: embedUrl,
|
interactionCount: video.views
|
||||||
uploadDate: video.createdAt
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let tagsString = ''
|
let tagsString = ''
|
||||||
|
@ -124,6 +125,9 @@ function addOpenGraphAndOEmbedTags (htmlStringPage: string, video: VideoModel) {
|
||||||
// Schema.org
|
// Schema.org
|
||||||
tagsString += `<script type="application/ld+json">${JSON.stringify(schemaTags)}</script>`
|
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)
|
return htmlStringPage.replace(OPENGRAPH_AND_OEMBED_COMMENT, tagsString)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue