From 0e99f8374a6c4aac19da9105c9b0c1f4950f87c7 Mon Sep 17 00:00:00 2001 From: clddup <105873086+clddup@users.noreply.github.com> Date: Fri, 30 Aug 2024 15:01:51 +0000 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20VideoPlayer=20=E7=9A=84=E5=AE=9E?= =?UTF-8?q?=E4=BE=8B=E6=9C=AA=E8=B5=8B=E5=80=BC=20#524?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/VideoPlayer/src/VideoPlayer.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/VideoPlayer/src/VideoPlayer.vue b/src/components/VideoPlayer/src/VideoPlayer.vue index 4fd639a..83c8d30 100644 --- a/src/components/VideoPlayer/src/VideoPlayer.vue +++ b/src/components/VideoPlayer/src/VideoPlayer.vue @@ -21,7 +21,7 @@ const videoEl = ref() const intiPlayer = () => { if (!unref(videoEl)) return - new Player({ + playerRef.value = new Player({ autoplay: false, ...props, el: unref(videoEl) From 3cd89bdd09ee45d97d1ea41a5ee7686ca56c4ff2 Mon Sep 17 00:00:00 2001 From: clddup <105873086+clddup@users.noreply.github.com> Date: Mon, 2 Sep 2024 08:54:42 +0000 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DisUrl=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E9=94=99=E8=AF=AFbug=20=20#526?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/is.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/utils/is.ts b/src/utils/is.ts index 8ac2e50..1651420 100644 --- a/src/utils/is.ts +++ b/src/utils/is.ts @@ -95,9 +95,12 @@ export const isServer = typeof window === 'undefined' export const isClient = !isServer export const isUrl = (path: string): boolean => { - const reg = - /(((^https?:(?:\/\/)?)(?:[-:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&%@.\w_]*)#?(?:[\w]*))?)$/ - return reg.test(path) + try { + new URL(path) + return true + } catch (_error) { + return false + } } export const isDark = (): boolean => {