show negotiated mse codecs in console on error

This commit is contained in:
Josh Hawkins
2025-11-24 09:04:00 -06:00
parent 1950f367f0
commit d43473867b
2 changed files with 9 additions and 2 deletions
+8 -1
View File
@@ -94,12 +94,19 @@ function MSEPlayer({
console.error(
`${camera} - MSE error '${error}': ${description} See the documentation: https://docs.frigate.video/configuration/live/#live-player-error-messages`,
);
if (mseCodecRef.current) {
// eslint-disable-next-line no-console
console.error(`${camera} - MSE codec in use: ${mseCodecRef.current}`);
console.error(
`${camera} - Browser negotiated codecs: ${mseCodecRef.current}`,
);
// eslint-disable-next-line no-console
console.error(`${camera} - Supported codecs: ${CODECS.join(", ")}`);
}
onError?.(error);
},
// we know that these deps are correct
// eslint-disable-next-line react-hooks/exhaustive-deps
[camera, onError],
);