diff --git a/client/src/assets/player/shared/p2p-media-loader/hls-plugin.ts b/client/src/assets/player/shared/p2p-media-loader/hls-plugin.ts index 3096d41ae..fd5fb2525 100644 --- a/client/src/assets/player/shared/p2p-media-loader/hls-plugin.ts +++ b/client/src/assets/player/shared/p2p-media-loader/hls-plugin.ts @@ -298,7 +298,7 @@ export class Html5Hlsjs { if (this.errorCounts[data.type]) this.errorCounts[data.type] += 1 else this.errorCounts[data.type] = 1 - // Google Bot doesn't support our codecs, but we don't really care + // Google Bot doesn't support our codecs, but it should not prevent indexing if (!/googlebot/i.test(navigator.userAgent)) { if (data.fatal) logger.error(error.message, { currentTime: this.player.currentTime(), data }) else logger.clientWarn(error.message) diff --git a/client/src/assets/player/shared/peertube/peertube-plugin.ts b/client/src/assets/player/shared/peertube/peertube-plugin.ts index 6fc39a0e3..6682836c7 100644 --- a/client/src/assets/player/shared/peertube/peertube-plugin.ts +++ b/client/src/assets/player/shared/peertube/peertube-plugin.ts @@ -202,7 +202,12 @@ class PeerTubePlugin extends Plugin { this.player.addClass('vjs-error-display-enabled') - logger.error('Fatal error in player', this.player.error()) + // Google Bot may throw codecs, but it should not prevent indexing + if (!/googlebot/i.test(navigator.userAgent)) { + console.error(this.player.error()) + } else { + logger.error('Fatal error in player', this.player.error()) + } } hideFatalError () { diff --git a/client/src/standalone/videos/embed.html b/client/src/standalone/videos/embed.html index b9373a5d2..24f35fc40 100644 --- a/client/src/standalone/videos/embed.html +++ b/client/src/standalone/videos/embed.html @@ -95,6 +95,12 @@ return } + // Google Bot doesn't support our codecs, but it should not prevent indexing + if (!/googlebot/i.test(navigator.userAgent)) { + console.error(err) + return + } + // Video element is already created, don't crash the player if (document.querySelector('.vjs-can-play')) { if (window.logger && typeof window.logger.error === 'function') {