YouTube Music as supported player (#3736)
This commit is contained in:
@@ -396,6 +396,7 @@ describe('parseEmbedPlayerFromUrl', () => {
|
|||||||
'https://youtube.com/watch?v=videoId&feature=share',
|
'https://youtube.com/watch?v=videoId&feature=share',
|
||||||
'https://youtube.com/shorts/videoId',
|
'https://youtube.com/shorts/videoId',
|
||||||
'https://m.youtube.com/watch?v=videoId',
|
'https://m.youtube.com/watch?v=videoId',
|
||||||
|
'https://music.youtube.com/watch?v=videoId',
|
||||||
|
|
||||||
'https://youtube.com/shorts/',
|
'https://youtube.com/shorts/',
|
||||||
'https://youtube.com/',
|
'https://youtube.com/',
|
||||||
@@ -504,6 +505,11 @@ describe('parseEmbedPlayerFromUrl', () => {
|
|||||||
source: 'youtube',
|
source: 'youtube',
|
||||||
playerUri: 'https://bsky.app/iframe/youtube.html?videoId=videoId&start=0',
|
playerUri: 'https://bsky.app/iframe/youtube.html?videoId=videoId&start=0',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'youtube_video',
|
||||||
|
source: 'youtube',
|
||||||
|
playerUri: 'https://bsky.app/iframe/youtube.html?videoId=videoId&start=0',
|
||||||
|
},
|
||||||
|
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
|
|||||||
@@ -95,7 +95,8 @@ export function parseEmbedPlayerFromUrl(
|
|||||||
if (
|
if (
|
||||||
urlp.hostname === 'www.youtube.com' ||
|
urlp.hostname === 'www.youtube.com' ||
|
||||||
urlp.hostname === 'youtube.com' ||
|
urlp.hostname === 'youtube.com' ||
|
||||||
urlp.hostname === 'm.youtube.com'
|
urlp.hostname === 'm.youtube.com' ||
|
||||||
|
urlp.hostname === 'music.youtube.com'
|
||||||
) {
|
) {
|
||||||
const [_, page, shortVideoId] = urlp.pathname.split('/')
|
const [_, page, shortVideoId] = urlp.pathname.split('/')
|
||||||
const videoId =
|
const videoId =
|
||||||
|
|||||||
Reference in New Issue
Block a user