feat 显示视频 (#1905)

closes #1901
This commit is contained in:
Chenyang Shi 2019-04-10 11:32:25 +08:00 committed by DIYgod
parent a78523fcef
commit abfaa26d61
1 changed files with 6 additions and 0 deletions

View File

@ -51,6 +51,12 @@ module.exports = async (ctx) => {
images.push(`<p><img referrerpolicy="no-referrer" src="${contentItem.url.replace('xl', 'r')}"/></p>`);
} else if (contentItem.type === 'link') {
link = `<p><a href="${contentItem.url}" target="_blank">${contentItem.title}</a></p>`;
} else if (contentItem.type === 'video') {
link = `<p><video
controls = "controls"
width = "${contentItem.playlist[1].width}"
height = "${contentItem.playlist[1].height}"
src = "${contentItem.playlist[1].url}"></p>`;
}
});
description = `${text}${link}${images.join('')}`;