From d67b3c45b5fc01c6e4c03b8e056eaf79f1accebe Mon Sep 17 00:00:00 2001 From: olivier bouillet Date: Sun, 2 Oct 2022 21:33:03 +0200 Subject: [PATCH] fix: improve initial test for checking url validity --- Video.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Video.js b/Video.js index e9ac1466..0a449e43 100644 --- a/Video.js +++ b/Video.js @@ -285,7 +285,7 @@ export default class Video extends Component { const isNetwork = !!(uri && uri.match(/^https?:/i)); const isAsset = !!(uri && uri.match(/^(assets-library|ph|ipod-library|file|content|ms-appx|ms-appdata):/i)); - if (uri && !isNetwork && !isAsset) { + if ((uri || uri === '') && !isNetwork && !isAsset) { if (this.props.onError) { this.props.onError({error: {errorString: 'invalid url, player will stop', errorCode: 'INVALID_URL'}}); }