Merge pull request #1760 from tangly1024/fix/media-video-play

Fix/media video play
This commit is contained in:
tangly1024
2024-01-09 11:33:03 +08:00
committed by GitHub
3 changed files with 6 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
# 环境变量 @see https://www.nextjs.cn/docs/basic-features/environment-variables
NEXT_PUBLIC_VERSION=4.1.3
NEXT_PUBLIC_VERSION=4.1.4
# 可在此添加环境变量,去掉最左边的(# )注释即可

View File

@@ -102,7 +102,10 @@ function filterPostBlocks(id, pageBlock, slice) {
}
// 如果是文件或嵌入式PDF需要重新加密签名
if ((b?.value?.type === 'file' || b?.value?.type === 'pdf' || b?.value?.type === 'video') && b?.value?.properties?.source?.[0][0]) {
if ((b?.value?.type === 'file' || b?.value?.type === 'pdf' || b?.value?.type === 'video' || b?.value?.type === 'audio') &&
b?.value?.properties?.source?.[0][0] &&
b?.value?.properties?.source?.[0][0].indexOf('amazonaws.com') > 0
) {
const oldUrl = b?.value?.properties?.source?.[0][0]
const newUrl = `https://notion.so/signed/${encodeURIComponent(oldUrl)}?table=block&id=${b?.value?.id}`
b.value.properties.source[0][0] = newUrl

View File

@@ -1,6 +1,6 @@
{
"name": "notion-next",
"version": "4.1.3",
"version": "4.1.4",
"homepage": "https://github.com/tangly1024/NotionNext.git",
"license": "MIT",
"repository": {