Const
The LiveObjects plugin that provides a RealtimeClient instance with the ability to use LiveObjects functionality.
To create a client that includes this plugin, include it in the client options that you pass to the RealtimeClient.constructor:
import { Realtime } from 'ably';import { LiveObjects } from 'ably/liveobjects';const realtime = new Realtime({ ...options, plugins: { LiveObjects } }); Copy
import { Realtime } from 'ably';import { LiveObjects } from 'ably/liveobjects';const realtime = new Realtime({ ...options, plugins: { LiveObjects } });
The LiveObjects plugin can also be used with a BaseRealtime client:
import { BaseRealtime, WebSocketTransport, FetchRequest } from 'ably/modular';import { LiveObjects } from 'ably/liveobjects';const realtime = new BaseRealtime({ ...options, plugins: { WebSocketTransport, FetchRequest, LiveObjects } }); Copy
import { BaseRealtime, WebSocketTransport, FetchRequest } from 'ably/modular';import { LiveObjects } from 'ably/liveobjects';const realtime = new BaseRealtime({ ...options, plugins: { WebSocketTransport, FetchRequest, LiveObjects } });
You can also import individual utilities alongside the plugin:
import { LiveObjects, LiveCounter, LiveMap } from 'ably/liveobjects'; Copy
import { LiveObjects, LiveCounter, LiveMap } from 'ably/liveobjects';
Generated using TypeDoc
The LiveObjects plugin that provides a RealtimeClient instance with the ability to use LiveObjects functionality.
To create a client that includes this plugin, include it in the client options that you pass to the RealtimeClient.constructor:
The LiveObjects plugin can also be used with a BaseRealtime client:
You can also import individual utilities alongside the plugin: