Skip to content

Commit df11073

Browse files
authored
feat: add Mux + hls.js support back in (#1769)
1 parent 4d7fcb5 commit df11073

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/patterns.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { isMediaStream, isBlobUrl } from './utils'
33
export const MATCH_URL_YOUTUBE = /(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//
44
export const MATCH_URL_SOUNDCLOUD = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/
55
export const MATCH_URL_VIMEO = /vimeo\.com\/(?!progressive_redirect).+/
6-
export const MATCH_URL_MUX = /stream\.mux\.com\/(\w+)/
6+
// Match Mux m3u8 URLs without the extension so users can use hls.js with Mux by adding the `.m3u8` extension. https://regexr.com/7um5f
7+
export const MATCH_URL_MUX = /stream\.mux\.com\/(?!\w+\.m3u8)(\w+)/
78
export const MATCH_URL_FACEBOOK = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/
89
export const MATCH_URL_FACEBOOK_WATCH = /^https?:\/\/fb\.watch\/.+$/
910
export const MATCH_URL_STREAMABLE = /streamable\.com\/([a-z0-9]+)$/

0 commit comments

Comments
 (0)