Skip to content

Commit

Permalink
Adjust blob util
Browse files Browse the repository at this point in the history
  • Loading branch information
cookpete committed Nov 14, 2020
1 parent 2099e48 commit f9c5429
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/patterns.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isMediaStream, isBlobUri } from './utils'
import { isMediaStream, isBlobUrl } from './utils'

export const MATCH_URL_YOUTUBE = /(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//
export const MATCH_URL_SOUNDCLOUD = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/
Expand Down Expand Up @@ -30,7 +30,7 @@ const canPlayFile = url => {
}
return false
}
if (isMediaStream(url) || isBlobUri(url)) {
if (isMediaStream(url) || isBlobUrl(url)) {
return true
}
return (
Expand Down
4 changes: 2 additions & 2 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ export function isMediaStream (url) {
)
}

export function isBlobUri (url) {
return url.startsWith('blob:')
export function isBlobUrl (url) {
return /^blob:/.test(url)
}

export function supportsWebKitPresentationMode (video = document.createElement('video')) {
Expand Down

0 comments on commit f9c5429

Please sign in to comment.