2018-05-08 13:01:34 +02:00
|
|
|
import { Session } from './Session';
|
|
|
|
import { Stream } from './Stream';
|
2018-04-26 15:33:47 +02:00
|
|
|
import { ConnectionOptions } from '../OpenViduInternal/Interfaces/Private/ConnectionOptions';
|
|
|
|
import { StreamOptionsServer } from '../OpenViduInternal/Interfaces/Private/StreamOptionsServer';
|
|
|
|
/**
|
|
|
|
* Represents each one of the user's connection to the session (the local one and other user's connections).
|
|
|
|
* Therefore each [[Session]] and [[Stream]] object has an attribute of type Connection
|
|
|
|
*/
|
|
|
|
export declare class Connection {
|
|
|
|
private session;
|
|
|
|
/**
|
|
|
|
* Unique identifier of the connection
|
|
|
|
*/
|
|
|
|
connectionId: string;
|
|
|
|
/**
|
|
|
|
* Time when this connection was created (UTC milliseconds)
|
|
|
|
*/
|
|
|
|
creationTime: number;
|
|
|
|
/**
|
|
|
|
* Data associated to this connection (and therefore to certain user). This is an important field:
|
|
|
|
* it allows you to broadcast all the information you want for each user (a username, for example)
|
|
|
|
*/
|
|
|
|
data: string;
|
|
|
|
/**
|
|
|
|
* @hidden
|
|
|
|
*/
|
|
|
|
stream: Stream;
|
|
|
|
/**
|
|
|
|
* @hidden
|
|
|
|
*/
|
|
|
|
options: ConnectionOptions | undefined;
|
|
|
|
/**
|
|
|
|
* @hidden
|
|
|
|
*/
|
|
|
|
disposed: boolean;
|
|
|
|
/**
|
|
|
|
* @hidden
|
|
|
|
*/
|
|
|
|
constructor(session: Session, opts?: ConnectionOptions);
|
|
|
|
/**
|
|
|
|
* @hidden
|
|
|
|
*/
|
2018-06-27 16:29:31 +02:00
|
|
|
sendIceCandidate(candidate: RTCIceCandidate): void;
|
2018-04-26 15:33:47 +02:00
|
|
|
/**
|
|
|
|
* @hidden
|
|
|
|
*/
|
|
|
|
initRemoteStreams(options: StreamOptionsServer[]): void;
|
|
|
|
/**
|
|
|
|
* @hidden
|
|
|
|
*/
|
|
|
|
addStream(stream: Stream): void;
|
|
|
|
/**
|
|
|
|
* @hidden
|
|
|
|
*/
|
|
|
|
removeStream(streamId: string): void;
|
|
|
|
/**
|
|
|
|
* @hidden
|
|
|
|
*/
|
|
|
|
dispose(): void;
|
|
|
|
}
|