import { Peer } from './peer'; import { Stream } from './stream'; import { StreamInitData, StreamTransceiverFactoryArray, StreamTransceiverFactory } from './types'; /** * @module rtc */ /** * Represents the local user of the room * @class rtc.LocalPeer * @extends rtc.Peer * * @constructor */ export declare class LocalPeer extends Peer { streams: Record; channels: Record; _status: Record; constructor(); /** * Get an item of the status transferred to all remote peers * @method status * @param {String} key The key of the value. Will return * @return The value associated with the key */ /** * Set an item of the status transferred to all remote peers * @method status * @param {String} key The key of the value. Will return * @param value The value to store */ status(key: string, value?: any): string | undefined; /** * Add data channel which will be negotiated with all remote peers * @method addDataChannel * @param {String} [name='data'] Name of the data channel * @param {Object} [desc={ordered: true}] Options passed to `RTCDataChannel.createDataChannel()` */ addDataChannel(name: string, desc: Record): void; /** * Add local stream to be sent to all remote peers * @method addStream * @param {String} [name='stream'] Name of the stream * @param {Promise -> rtc.Stream | rtc.Stream | Object} stream The stream, a promise to the stream or the configuration to create a stream with `rtc.Stream.createStream()` * @return {Promise -> rtc.Stream} Promise of the stream which was added */ addStream(obj: Stream | Promise | MediaStreamConstraints, transceivers?: StreamTransceiverFactory | StreamTransceiverFactoryArray): Promise; addStream(name: string, obj: Stream | Promise | MediaStreamConstraints, transceivers?: StreamTransceiverFactory | StreamTransceiverFactoryArray): Promise; removeStream(name?: string): void; /** * Get local stream * @method stream * @param {String} [name='stream'] Name of the stream * @return {Promise -> rtc.Stream} Promise of the stream */ stream(name?: string): Promise; /** * Checks whether the peer is the local peer. Returns always `true` on this * class. * @method isLocal * @return {Boolean} Returns `true` */ isLocal(): boolean; }