actually fix videos w/ autoplay

This commit is contained in:
Jill 2023-05-18 06:08:26 +03:00
parent d4710c3392
commit 93143cc9b1
Signed by: oat
GPG Key ID: 33489AA58A955108
1 changed files with 3 additions and 3 deletions

View File

@ -90,12 +90,12 @@ export function makeLazyEmbeds(hast) {
tagName: 'video', tagName: 'video',
properties: { properties: {
src: url.href, src: url.href,
autoplay: 'true',
playsinline: 'true',
// since we're not able to get external metadata, and we don't want to // since we're not able to get external metadata, and we don't want to
// make _all_ videos autoplay, we have to scan the searchParams for // make _all_ videos autoplay, we have to scan the searchParams for
// autoplay=false. this sucks! it's the best we can do // autoplay=false. this sucks! it's the best we can do
loop: (url.searchParams.get('autoplay') !== 'false').toString(), autoplay: (url.searchParams.get('autoplay') !== 'false') ? 'true' : undefined,
loop: 'true',
playsinline: 'true',
style: 'width:100%;max-width:600px', style: 'width:100%;max-width:600px',
controls: 'true' controls: 'true'
}, },