From adaf63670a318769e3e01ee4dc9ff9a84a5f2a7d Mon Sep 17 00:00:00 2001 From: Felix Hsu Date: Mon, 26 Sep 2022 21:12:18 +0800 Subject: [PATCH] fix(thepaper): thepaper video cannot playback in fullscreen correctly (#10908) * 1. fix timezone shift 2. add podcast for voice article 3.use list icon for list feed 4. category support * extract logo using cheerio * fix the fallback logo image on list feed * fix the deepscan insufficient null checking * add support for album type article * video playback not working correctly on weixin --- lib/v2/thepaper/templates/video_detail.art | 17 ++++++++++++----- lib/v2/thepaper/utils.js | 2 ++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/v2/thepaper/templates/video_detail.art b/lib/v2/thepaper/templates/video_detail.art index f8ac883f2..23191e8fe 100644 --- a/lib/v2/thepaper/templates/video_detail.art +++ b/lib/v2/thepaper/templates/video_detail.art @@ -1,6 +1,13 @@ - + controls + playsinline="true" + webkit-playsinline="true" + x5-playsinline="true" + x5-video-player-type="h5" + x5-video-orientation="landscape|portrait" + x5-video-player-fullscreen="true" + x-webkit-airplay="allow" + preload="metadata" + poster="{{ videos.coverUrl}}" +> diff --git a/lib/v2/thepaper/utils.js b/lib/v2/thepaper/utils.js index 3a5aca4de..f69f1ea6e 100644 --- a/lib/v2/thepaper/utils.js +++ b/lib/v2/thepaper/utils.js @@ -33,6 +33,8 @@ module.exports = { if (contentDetail.videos) { description = art(path.join(__dirname, 'templates/video_detail.art'), { + // see https://nanmu.me/zh-cn/posts/2020/strange-html-video-tag-behavior-in-wechat/ + // for video tag details videos: contentDetail.videos, }) + description; }