Javascript API Reference
    Preparing search index...

    Class realtimeStore

    Index
      • This method can be used to subscribe to real-time updates for a specific key.

      • The provided callback function is executed whenever the value associated with the key is updated by any participant.

      Parameters

      • key: string

        The key to observe for updates.

      • callback: Function

        A function that handles value updates along with the ID of the participant who made the change.

      Returns Promise<string>

      try {
      const observerId = await meeting.realtimeStore.observe(
      "Blocked_Students",
      (value, updatedBy) => {
      console.log("Value updated:", value, "by", updatedBy);
      }
      );
      } catch (error) {
      console.error("Failed to observe key:", error);
      }
      • This method can be used to stop receiving updates for a previously registered observer.

      • Safe to call from cleanup paths: this method never rejects. An unknown, already-stopped, or missing observerId resolves as a no-op, and a failed server unsubscribe is recorded in telemetry rather than surfaced.

      Parameters

      • observerId: string

        The unique observer ID returned by the observe() method.

      Returns Promise<void>

      try {
      await meeting.realtimeStore.stopObserving(observerId);
      console.log("Stopped observing successfully!");
      } catch (error) {
      console.error("Failed to stop observing:", error);
      }