Merge pull request #1478 from laurent22/master
Throw an error instead of crashing app when video source is empty
This commit is contained in:
commit
98eb7a3137
2
Video.js
2
Video.js
@ -226,6 +226,8 @@ export default class Video extends Component {
|
||||
if (uri && uri.match(/^\//)) {
|
||||
uri = `file://${uri}`;
|
||||
}
|
||||
|
||||
if (!uri) throw new Error('Trying to load empty source.');
|
||||
|
||||
const isNetwork = !!(uri && uri.match(/^https?:/));
|
||||
const isAsset = !!(uri && uri.match(/^(assets-library|ipod-library|file|content|ms-appx|ms-appdata):/));
|
||||
|
Loading…
Reference in New Issue
Block a user