import { EventDispatcher } from '../../events'; import { Resolution } from '../../gen/stream/v1/stream_pb'; import type { RobotClient } from '../../robot'; import type { Options } from '../../types'; import type { Stream } from './stream'; /** * A gRPC-web client for a Stream. * * @group Clients */ export declare class StreamClient extends EventDispatcher implements Stream { private client; private readonly options; private streams; constructor(client: RobotClient, options?: Options); add(name: string): Promise; remove(name: string): Promise; /** * Get the available livestream resolutions for a camera component. If the * stream client cannot find any available resolutions, an empty list will be * returned. * * @param resourceName - The name of a camera component. * @returns A list of available resolutions for livestreaming. */ getOptions(resourceName: string): Promise; /** * Set the livestream options for a camera component. This will change the * resolution of the stream to the specified width and height. * * @param name - The name of a camera component. * @param width - The width of the resolution. * @param height - The height of the resolution. */ setOptions(name: string, width: number, height: number): Promise; /** * Reset the livestream options for a camera component. This will reset the * resolution to the default component attributes. * * @param name - The name of a camera component. */ resetOptions(name: string): Promise; private STREAM_TIMEOUT; /** * Get a stream by name from a StreamClient. Will time out if stream is not * received within 5 seconds. * * @param name - The name of a camera component. */ getStream: (name: string) => Promise; }