feat: Prints the error on problem sharing YouTube video.
This commit is contained in:
parent
ef2631e95a
commit
338b02a6b6
|
@ -121,7 +121,7 @@
|
||||||
"react-textarea-autosize": "8.3.0",
|
"react-textarea-autosize": "8.3.0",
|
||||||
"react-transition-group": "2.4.0",
|
"react-transition-group": "2.4.0",
|
||||||
"react-window": "1.8.6",
|
"react-window": "1.8.6",
|
||||||
"react-youtube": "7.13.1",
|
"react-youtube": "10.1.0",
|
||||||
"redux": "4.0.4",
|
"redux": "4.0.4",
|
||||||
"redux-thunk": "2.4.1",
|
"redux-thunk": "2.4.1",
|
||||||
"resemblejs": "4.0.0",
|
"resemblejs": "4.0.0",
|
||||||
|
@ -16766,36 +16766,21 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/react-youtube": {
|
"node_modules/react-youtube": {
|
||||||
"version": "7.13.1",
|
"version": "10.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-youtube/-/react-youtube-7.13.1.tgz",
|
"resolved": "https://registry.npmjs.org/react-youtube/-/react-youtube-10.1.0.tgz",
|
||||||
"integrity": "sha512-b++TLHmHDpd0ZBS1wcbYabbuchU+W4jtx5A2MUQX0BINNKKsaIQX29sn/aLvZ9v5luwAoceia3VGtyz9blaB9w==",
|
"integrity": "sha512-ZfGtcVpk0SSZtWCSTYOQKhfx5/1cfyEW1JN/mugGNfAxT3rmVJeMbGpA9+e78yG21ls5nc/5uZJETE3cm3knBg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fast-deep-equal": "3.1.3",
|
"fast-deep-equal": "3.1.3",
|
||||||
"prop-types": "15.7.2",
|
"prop-types": "15.8.1",
|
||||||
"youtube-player": "5.5.2"
|
"youtube-player": "5.5.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 10.x"
|
"node": ">= 14.x"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": ">=0.14.1"
|
"react": ">=0.14.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/react-youtube/node_modules/prop-types": {
|
|
||||||
"version": "15.7.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz",
|
|
||||||
"integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"loose-envify": "^1.4.0",
|
|
||||||
"object-assign": "^4.1.1",
|
|
||||||
"react-is": "^16.8.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/react-youtube/node_modules/react-is": {
|
|
||||||
"version": "16.13.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
|
||||||
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
|
||||||
},
|
|
||||||
"node_modules/readable-stream": {
|
"node_modules/readable-stream": {
|
||||||
"version": "3.6.0",
|
"version": "3.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
|
||||||
|
@ -32978,30 +32963,13 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-youtube": {
|
"react-youtube": {
|
||||||
"version": "7.13.1",
|
"version": "10.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-youtube/-/react-youtube-7.13.1.tgz",
|
"resolved": "https://registry.npmjs.org/react-youtube/-/react-youtube-10.1.0.tgz",
|
||||||
"integrity": "sha512-b++TLHmHDpd0ZBS1wcbYabbuchU+W4jtx5A2MUQX0BINNKKsaIQX29sn/aLvZ9v5luwAoceia3VGtyz9blaB9w==",
|
"integrity": "sha512-ZfGtcVpk0SSZtWCSTYOQKhfx5/1cfyEW1JN/mugGNfAxT3rmVJeMbGpA9+e78yG21ls5nc/5uZJETE3cm3knBg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"fast-deep-equal": "3.1.3",
|
"fast-deep-equal": "3.1.3",
|
||||||
"prop-types": "15.7.2",
|
"prop-types": "15.8.1",
|
||||||
"youtube-player": "5.5.2"
|
"youtube-player": "5.5.2"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"prop-types": {
|
|
||||||
"version": "15.7.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz",
|
|
||||||
"integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==",
|
|
||||||
"requires": {
|
|
||||||
"loose-envify": "^1.4.0",
|
|
||||||
"object-assign": "^4.1.1",
|
|
||||||
"react-is": "^16.8.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"react-is": {
|
|
||||||
"version": "16.13.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
|
||||||
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"readable-stream": {
|
"readable-stream": {
|
||||||
|
|
|
@ -126,7 +126,7 @@
|
||||||
"react-textarea-autosize": "8.3.0",
|
"react-textarea-autosize": "8.3.0",
|
||||||
"react-transition-group": "2.4.0",
|
"react-transition-group": "2.4.0",
|
||||||
"react-window": "1.8.6",
|
"react-window": "1.8.6",
|
||||||
"react-youtube": "7.13.1",
|
"react-youtube": "10.1.0",
|
||||||
"redux": "4.0.4",
|
"redux": "4.0.4",
|
||||||
"redux-thunk": "2.4.1",
|
"redux-thunk": "2.4.1",
|
||||||
"resemblejs": "4.0.0",
|
"resemblejs": "4.0.0",
|
||||||
|
|
|
@ -209,10 +209,12 @@ class AbstractVideoManager extends PureComponent<Props> {
|
||||||
/**
|
/**
|
||||||
* Handle video error.
|
* Handle video error.
|
||||||
*
|
*
|
||||||
|
* @param {Object|undefined} e - The error returned by the API or none.
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
onError() {
|
onError(e) {
|
||||||
logger.error('Error in the video player');
|
logger.error('Error in the video player', e?.data,
|
||||||
|
e?.data ? 'Check error code at https://developers.google.com/youtube/iframe_api_reference#onError' : '');
|
||||||
this.props._stopSharedVideo();
|
this.props._stopSharedVideo();
|
||||||
this.props._displayWarning();
|
this.props._displayWarning();
|
||||||
}
|
}
|
||||||
|
|
|
@ -201,7 +201,7 @@ class YoutubeVideoManager extends AbstractVideoManager {
|
||||||
'rel': 0
|
'rel': 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onError: () => this.onError(),
|
onError: e => this.onError(e),
|
||||||
onReady: this.onPlayerReady,
|
onReady: this.onPlayerReady,
|
||||||
onStateChange: this.onPlayerStateChange,
|
onStateChange: this.onPlayerStateChange,
|
||||||
videoId
|
videoId
|
||||||
|
|
Loading…
Reference in New Issue