2018-05-08 13:01:34 +02:00
|
|
|
import { OpenVidu } from './OpenVidu';
|
|
|
|
import { Session } from './Session';
|
2018-06-01 14:39:38 +02:00
|
|
|
import { StreamManager } from './StreamManager';
|
2018-04-26 15:33:47 +02:00
|
|
|
import { EventDispatcher } from '../OpenViduInternal/Interfaces/Public/EventDispatcher';
|
|
|
|
import { PublisherProperties } from '../OpenViduInternal/Interfaces/Public/PublisherProperties';
|
2018-06-01 14:39:38 +02:00
|
|
|
import { Event } from '../OpenViduInternal/Events/Event';
|
2018-04-26 15:33:47 +02:00
|
|
|
/**
|
|
|
|
* Packs local media streams. Participants can publish it to a session. Initialized with [[OpenVidu.initPublisher]] method
|
|
|
|
*/
|
2018-06-01 14:39:38 +02:00
|
|
|
export declare class Publisher extends StreamManager {
|
2018-04-26 15:33:47 +02:00
|
|
|
private openvidu;
|
|
|
|
/**
|
|
|
|
* Whether the Publisher has been granted access to the requested input devices or not
|
|
|
|
*/
|
|
|
|
accessAllowed: boolean;
|
|
|
|
/**
|
2018-06-01 14:39:38 +02:00
|
|
|
* Whether you have called [[Publisher.subscribeToRemote]] with value `true` or `false` (*false* by default)
|
2018-04-26 15:33:47 +02:00
|
|
|
*/
|
2018-06-01 14:39:38 +02:00
|
|
|
isSubscribedToRemote: boolean;
|
2018-04-26 15:33:47 +02:00
|
|
|
/**
|
|
|
|
* The [[Session]] to which the Publisher belongs
|
|
|
|
*/
|
|
|
|
session: Session;
|
2018-06-01 14:39:38 +02:00
|
|
|
private accessDenied;
|
2018-04-26 15:33:47 +02:00
|
|
|
private properties;
|
|
|
|
private permissionDialogTimeout;
|
|
|
|
/**
|
|
|
|
* @hidden
|
|
|
|
*/
|
2018-06-01 14:39:38 +02:00
|
|
|
constructor(targEl: string | HTMLElement, properties: PublisherProperties, openvidu: OpenVidu);
|
2018-04-26 15:33:47 +02:00
|
|
|
/**
|
|
|
|
* Publish or unpublish the audio stream (if available). Calling this method twice in a row passing same value will have no effect
|
|
|
|
* @param value `true` to publish the audio stream, `false` to unpublish it
|
|
|
|
*/
|
|
|
|
publishAudio(value: boolean): void;
|
|
|
|
/**
|
|
|
|
* Publish or unpublish the video stream (if available). Calling this method twice in a row passing same value will have no effect
|
|
|
|
* @param value `true` to publish the video stream, `false` to unpublish it
|
|
|
|
*/
|
|
|
|
publishVideo(value: boolean): void;
|
|
|
|
/**
|
2018-06-01 14:39:38 +02:00
|
|
|
* Call this method before [[Session.publish]] to subscribe to your Publisher's remote stream instead of using the local stream, as any other user would do.
|
2018-04-26 15:33:47 +02:00
|
|
|
*/
|
2018-06-01 14:39:38 +02:00
|
|
|
subscribeToRemote(value?: boolean): void;
|
2018-04-26 15:33:47 +02:00
|
|
|
/**
|
|
|
|
* See [[EventDispatcher.on]]
|
|
|
|
*/
|
2018-06-01 14:39:38 +02:00
|
|
|
on(type: string, handler: (event: Event) => void): EventDispatcher;
|
2018-04-26 15:33:47 +02:00
|
|
|
/**
|
|
|
|
* See [[EventDispatcher.once]]
|
|
|
|
*/
|
2018-06-01 14:39:38 +02:00
|
|
|
once(type: string, handler: (event: Event) => void): Publisher;
|
2018-04-26 15:33:47 +02:00
|
|
|
/**
|
|
|
|
* @hidden
|
|
|
|
*/
|
|
|
|
initialize(): Promise<any>;
|
|
|
|
/**
|
|
|
|
* @hidden
|
|
|
|
*/
|
|
|
|
updateSession(session: Session): void;
|
|
|
|
/**
|
|
|
|
* @hidden
|
|
|
|
*/
|
|
|
|
emitEvent(type: string, eventArray: any[]): void;
|
2018-06-01 14:39:38 +02:00
|
|
|
/**
|
|
|
|
* @hidden
|
|
|
|
*/
|
|
|
|
reestablishStreamPlayingEvent(): void;
|
2018-06-04 14:33:57 +02:00
|
|
|
private setPermissionDialogTimer;
|
|
|
|
private clearPermissionDialogTimer;
|
2018-04-26 15:33:47 +02:00
|
|
|
}
|