add extra check for video source response
This commit is contained in:
parent
f59cdb1929
commit
2436c3eb70
1 changed files with 1 additions and 1 deletions
|
@ -312,7 +312,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
|||
containerRef.current.appendChild(wrapper);
|
||||
|
||||
fetch(source).then(response => {
|
||||
if (response.redirected && response.url && response.url.endsWith('m3u8')) {
|
||||
if (response && response.redirected && response.url && response.url.endsWith('m3u8')) {
|
||||
videoJsOptions.sources[0].type = 'application/x-mpegURL';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue