Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Don't log if it's google bot

Chocobozzz64f943c1cb97
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 ba9a8d6273..f16a706522 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
@@ -286,8 +286,11 @@ export class Html5Hlsjs {
if (this.errorCounts[data.type]) this.errorCounts[data.type] += 1
else this.errorCounts[data.type] = 1
- if (data.fatal) logger.error(error.message, { currentTime: this.player.currentTime(), data })
- else logger.warn(error.message)
+ // Google Bot doesn't support our codecs, but we don't really care
+ if (!/googlebot/i.test(navigator.userAgent)) {
+ if (data.fatal) logger.error(error.message, { currentTime: this.player.currentTime(), data })
+ else logger.warn(error.message)
+ }
if (data.type === Hlsjs.ErrorTypes.NETWORK_ERROR) {
error.code = 2