@@ -43,7 +43,7 @@ function getTwitchParent(): string {
4343 */
4444function getEmbedInfo ( url : string ) : EmbedInfo | null {
4545 const youtubeMatch = url . match (
46- / (?: y o u t u b e \. c o m \/ w a t c h \? v = | y o u t u \. b e \/ | y o u t u b e \. c o m \/ e m b e d \/ ) ( [ a - z A - Z 0 - 9 _ - ] { 11 } ) /
46+ / (?: y o u t u b e \. c o m \/ w a t c h \? (?: . * & ) ? v = | y o u t u \. b e \/ | y o u t u b e \. c o m \/ e m b e d \/ ) ( [ a - z A - Z 0 - 9 _ - ] { 11 } ) /
4747 )
4848 if ( youtubeMatch ) {
4949 return { url : `https://www.youtube.com/embed/${ youtubeMatch [ 1 ] } ` , type : 'iframe' }
@@ -68,7 +68,7 @@ function getEmbedInfo(url: string): EmbedInfo | null {
6868 }
6969
7070 const twitchChannelMatch = url . match ( / t w i t c h \. t v \/ ( [ a - z A - Z 0 - 9 _ ] + ) (?: \/ | $ ) / )
71- if ( twitchChannelMatch && ! url . includes ( '/videos/' ) ) {
71+ if ( twitchChannelMatch && ! url . includes ( '/videos/' ) && ! url . includes ( '/clip/' ) ) {
7272 return {
7373 url : `https://player.twitch.tv/?channel=${ twitchChannelMatch [ 1 ] } &parent=${ getTwitchParent ( ) } ` ,
7474 type : 'iframe' ,
@@ -240,11 +240,6 @@ function getEmbedInfo(url: string): EmbedInfo | null {
240240 return { url : `https://play.vidyard.com/${ vidyardMatch [ 1 ] } ` , type : 'iframe' }
241241 }
242242
243- const muxMatch = url . match ( / s t r e a m \. m u x \. c o m \/ ( [ a - z A - Z 0 - 9 ] + ) / )
244- if ( muxMatch ) {
245- return { url : `https://stream.mux.com/${ muxMatch [ 1 ] } .m3u8` , type : 'video' }
246- }
247-
248243 const cfStreamMatch =
249244 url . match ( / c l o u d f l a r e s t r e a m \. c o m \/ ( [ a - z A - Z 0 - 9 ] + ) / ) ||
250245 url . match ( / v i d e o d e l i v e r y \. n e t \/ ( [ a - z A - Z 0 - 9 ] + ) / )
@@ -271,24 +266,6 @@ function getEmbedInfo(url: string): EmbedInfo | null {
271266 }
272267 }
273268
274- const bandcampTrackMatch = url . match ( / ( [ a - z A - Z 0 - 9 - ] + ) \. b a n d c a m p \. c o m \/ t r a c k \/ ( [ a - z A - Z 0 - 9 - ] + ) / )
275- if ( bandcampTrackMatch ) {
276- return {
277- url : `https://bandcamp.com/EmbeddedPlayer/artist=${ bandcampTrackMatch [ 1 ] } /track=${ bandcampTrackMatch [ 2 ] } /size=large/bgcol=333333/linkcol=0f91ff/tracklist=false/transparent=true/` ,
278- type : 'iframe' ,
279- aspectRatio : '1/1' ,
280- }
281- }
282-
283- const bandcampAlbumMatch = url . match ( / ( [ a - z A - Z 0 - 9 - ] + ) \. b a n d c a m p \. c o m \/ a l b u m \/ ( [ a - z A - Z 0 - 9 - ] + ) / )
284- if ( bandcampAlbumMatch ) {
285- return {
286- url : `https://bandcamp.com/EmbeddedPlayer/artist=${ bandcampAlbumMatch [ 1 ] } /album=${ bandcampAlbumMatch [ 2 ] } /size=large/bgcol=333333/linkcol=0f91ff/transparent=true/` ,
287- type : 'iframe' ,
288- aspectRatio : '1/1' ,
289- }
290- }
291-
292269 const googleDriveMatch = url . match ( / d r i v e \. g o o g l e \. c o m \/ f i l e \/ d \/ ( [ a - z A - Z 0 - 9 _ - ] + ) / )
293270 if ( googleDriveMatch ) {
294271 return { url : `https://drive.google.com/file/d/${ googleDriveMatch [ 1 ] } /preview` , type : 'iframe' }
0 commit comments