feat: Prints the error on problem sharing YouTube video.

This commit is contained in:
damencho
2022-12-12 08:00:42 -06:00
committed by Дамян Минков
parent ef2631e95a
commit 338b02a6b6
4 changed files with 16 additions and 46 deletions

View File

@@ -209,10 +209,12 @@ class AbstractVideoManager extends PureComponent<Props> {
/**
* Handle video error.
*
* @param {Object|undefined} e - The error returned by the API or none.
* @returns {void}
*/
onError() {
logger.error('Error in the video player');
onError(e) {
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._displayWarning();
}