Set start time on YouTube embeds (#2565)

* fix: set start time on yt embeds

* fix: re-encode to be on the safe side

* chore: fix embed tests
This commit is contained in:
Mary 2024-01-19 12:25:57 +07:00 committed by GitHub
parent 0dfe740dd3
commit 4bd95b5ef2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 9 deletions

View file

@ -463,44 +463,44 @@ describe('parseEmbedPlayerFromUrl', () => {
type: 'youtube_video',
source: 'youtube',
playerUri:
'https://www.youtube.com/embed/videoId?autoplay=1&playsinline=1',
'https://www.youtube.com/embed/videoId?autoplay=1&playsinline=1&start=0',
},
{
type: 'youtube_video',
source: 'youtube',
playerUri:
'https://www.youtube.com/embed/videoId?autoplay=1&playsinline=1',
'https://www.youtube.com/embed/videoId?autoplay=1&playsinline=1&start=0',
},
{
type: 'youtube_video',
source: 'youtube',
playerUri:
'https://www.youtube.com/embed/videoId?autoplay=1&playsinline=1',
'https://www.youtube.com/embed/videoId?autoplay=1&playsinline=1&start=0',
},
{
type: 'youtube_video',
source: 'youtube',
playerUri:
'https://www.youtube.com/embed/videoId?autoplay=1&playsinline=1',
'https://www.youtube.com/embed/videoId?autoplay=1&playsinline=1&start=0',
},
{
type: 'youtube_video',
source: 'youtube',
playerUri:
'https://www.youtube.com/embed/videoId?autoplay=1&playsinline=1',
'https://www.youtube.com/embed/videoId?autoplay=1&playsinline=1&start=0',
},
{
type: 'youtube_short',
source: 'youtubeShorts',
hideDetails: true,
playerUri:
'https://www.youtube.com/embed/videoId?autoplay=1&playsinline=1',
'https://www.youtube.com/embed/videoId?autoplay=1&playsinline=1&start=0',
},
{
type: 'youtube_video',
source: 'youtube',
playerUri:
'https://www.youtube.com/embed/videoId?autoplay=1&playsinline=1',
'https://www.youtube.com/embed/videoId?autoplay=1&playsinline=1&start=0',
},
undefined,