fix og metadata for videos
This commit is contained in:
parent
af6af84a2a
commit
6a58cd0265
1 changed files with 9 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
const { parseURI } = require('lbry-redux');
|
||||
// const { generateStreamUrl } = require('../../src/ui/util/lbrytv');
|
||||
const { generateStreamUrl } = require('../../src/ui/util/lbrytv');
|
||||
const { WEB_SERVER_PORT, DOMAIN } = require('../../config');
|
||||
const { readFileSync } = require('fs');
|
||||
const express = require('express');
|
||||
|
@ -111,14 +111,14 @@ app.get('*', async (req, res) => {
|
|||
head += `<meta property="og:url" content="${DOMAIN}/${claim.name}:${claim.claim_id}"/>`;
|
||||
|
||||
if (claim.source_media_type && claim.source_media_type.startsWith('video/')) {
|
||||
// const videoUrl = generateStreamUrl(claim.name, claim.claim_id);
|
||||
// head += `<meta property="og:video" content="${videoUrl}" />`;
|
||||
// head += `<meta property="og:video:secure_url" content="${videoUrl}" />`;
|
||||
// head += `<meta property="og:video:type" content="${claim.source_media_type}" />`;
|
||||
// if (claim.frame_width && claim.frame_height) {
|
||||
// head += `<meta property="og:video:width" content="${claim.frame_width}/>`;
|
||||
// head += `<meta property="og:video:height" content="${claim.frame_height}/>`;
|
||||
// }
|
||||
const videoUrl = generateStreamUrl(claim.name, claim.claim_id);
|
||||
head += `<meta property="og:video" content="${videoUrl}" />`;
|
||||
head += `<meta property="og:video:secure_url" content="${videoUrl}" />`;
|
||||
head += `<meta property="og:video:type" content="${claim.source_media_type}" />`;
|
||||
if (claim.frame_width && claim.frame_height) {
|
||||
head += `<meta property="og:video:width" content="${claim.frame_width}"/>`;
|
||||
head += `<meta property="og:video:height" content="${claim.frame_height}"/>`;
|
||||
}
|
||||
}
|
||||
|
||||
html = insertToHead(html, head);
|
||||
|
|
Loading…
Reference in a new issue