Skip to main content

Integrating the watchRTC SDK with server-side rendering frameworks like Next.js

When using server side rendering frameworks such as Next.js, the watchRTC SDK gets integrated and built on a server platform instead of inside the browser itself. This may lead to execution errors once you import and include the watchRTC SDK.

You may bump into something like this error message:

How to avoid this error message?

To avoid this error message, you just need load our watchRTC SDK dynamically:
useEffect(() => {
    async function initWRTC() {
      const watchrtc = await import("@testrtc/watchrtc-sdk");

Was this article helpful?

0 out of 0 found this helpful