mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser: allow undefined as targetElement property. Typo fix
parent
353dd2b545
commit
215f2828dd
|
@ -174,10 +174,10 @@ export class OpenVidu {
|
|||
}
|
||||
|
||||
|
||||
initPublisher(targetElement: string | HTMLElement): Publisher;
|
||||
initPublisher(targetElement: string | HTMLElement, properties: PublisherProperties): Publisher;
|
||||
initPublisher(targetElement: string | HTMLElement, completionHandler: (error: Error | undefined) => void): Publisher;
|
||||
initPublisher(targetElement: string | HTMLElement, properties: PublisherProperties, completionHandler: (error: Error | undefined) => void): Publisher;
|
||||
initPublisher(targetElement: string | HTMLElement | undefined): Publisher;
|
||||
initPublisher(targetElement: string | HTMLElement | undefined, properties: PublisherProperties): Publisher;
|
||||
initPublisher(targetElement: string | HTMLElement | undefined, completionHandler: (error: Error | undefined) => void): Publisher;
|
||||
initPublisher(targetElement: string | HTMLElement | undefined, properties: PublisherProperties, completionHandler: (error: Error | undefined) => void): Publisher;
|
||||
|
||||
/**
|
||||
* Returns a new publisher
|
||||
|
@ -199,7 +199,7 @@ export class OpenVidu {
|
|||
* @param completionHandler `error` parameter is null if `initPublisher` succeeds, and is defined if it fails.
|
||||
* `completionHandler` function is called before the Publisher dispatches an `accessAllowed` or an `accessDenied` event
|
||||
*/
|
||||
initPublisher(targetElement: string | HTMLElement, param2?, param3?): Publisher {
|
||||
initPublisher(targetElement: string | HTMLElement | undefined, param2?, param3?): Publisher {
|
||||
|
||||
let properties: PublisherProperties;
|
||||
|
||||
|
@ -266,10 +266,10 @@ export class OpenVidu {
|
|||
*
|
||||
* > WARNING: events `accessDialogOpened` and `accessDialogClosed` will not be dispatched if using this method instead of [[OpenVidu.initPublisher]]
|
||||
*/
|
||||
initPublisherAsync(targetElement: string | HTMLElement): Promise<Publisher>;
|
||||
initPublisherAsync(targetElement: string | HTMLElement, properties: PublisherProperties): Promise<Publisher>;
|
||||
initPublisherAsync(targetElement: string | HTMLElement | undefined): Promise<Publisher>;
|
||||
initPublisherAsync(targetElement: string | HTMLElement | undefined, properties: PublisherProperties): Promise<Publisher>;
|
||||
|
||||
initPublisherAsync(targetElement: string | HTMLElement, properties?: PublisherProperties): Promise<Publisher> {
|
||||
initPublisherAsync(targetElement: string | HTMLElement | undefined, properties?: PublisherProperties): Promise<Publisher> {
|
||||
return new Promise<Publisher>((resolve, reject) => {
|
||||
|
||||
let publisher: Publisher;
|
||||
|
|
|
@ -214,10 +214,10 @@ export class Session extends EventDispatcher {
|
|||
this.leave(false, 'disconnect');
|
||||
}
|
||||
|
||||
subscribe(stream: Stream, targetElement: string | HTMLElement): Subscriber;
|
||||
subscribe(stream: Stream, targetElement: string | HTMLElement, properties: SubscriberProperties): Subscriber;
|
||||
subscribe(stream: Stream, targetElement: string | HTMLElement, completionHandler: (error: Error | undefined) => void): Subscriber;
|
||||
subscribe(stream: Stream, targetElement: string | HTMLElement, properties: SubscriberProperties, completionHandler: (error: Error | undefined) => void): Subscriber;
|
||||
subscribe(stream: Stream, targetElement: string | HTMLElement | undefined): Subscriber;
|
||||
subscribe(stream: Stream, targetElement: string | HTMLElement | undefined, properties: SubscriberProperties): Subscriber;
|
||||
subscribe(stream: Stream, targetElement: string | HTMLElement | undefined, completionHandler: (error: Error | undefined) => void): Subscriber;
|
||||
subscribe(stream: Stream, targetElement: string | HTMLElement | undefined, properties: SubscriberProperties, completionHandler: (error: Error | undefined) => void): Subscriber;
|
||||
|
||||
/**
|
||||
* Subscribes to a `stream`, adding a new HTML video element to DOM with `subscriberProperties` settings. This method is usually called in the callback of `streamCreated` event.
|
||||
|
@ -234,7 +234,7 @@ export class Session extends EventDispatcher {
|
|||
* You can always call method [[Subscriber.addVideoElement]] or [[Subscriber.createVideoElement]] to manage the video elements on your own (see [Manage video players](/en/stable/cheatsheet/manage-videos) section)
|
||||
* @param completionHandler `error` parameter is null if `subscribe` succeeds, and is defined if it fails.
|
||||
*/
|
||||
subscribe(stream: Stream, targetElement: string | HTMLElement, param3?: ((error: Error | undefined) => void) | SubscriberProperties, param4?: ((error: Error | undefined) => void)): Subscriber {
|
||||
subscribe(stream: Stream, targetElement: string | HTMLElement | undefined, param3?: ((error: Error | undefined) => void) | SubscriberProperties, param4?: ((error: Error | undefined) => void)): Subscriber {
|
||||
let properties: SubscriberProperties = {};
|
||||
if (!!param3 && typeof param3 !== 'function') {
|
||||
properties = {
|
||||
|
|
|
@ -29,7 +29,7 @@ const logger: OpenViduLogger = OpenViduLogger.getInstance();
|
|||
/**
|
||||
* Triggered by:
|
||||
* - `streamCreated` (available for [Session](/en/stable/api/openvidu-browser/interfaces/SessionEventMap.html#streamCreated) and [Publisher](/en/stable/api/openvidu-browser/interfaces/PublisherEventMap.html#streamCreated) objects)
|
||||
* - `streamDestroyed]` (available for [Session](/en/stable/api/openvidu-browser/interfaces/SessionEventMap.html#streamDestroyed) and [Publisher](/en/stable/api/openvidu-browser/interfaces/PublisherEventMap.html#streamDestroyed) objects)
|
||||
* - `streamDestroyed` (available for [Session](/en/stable/api/openvidu-browser/interfaces/SessionEventMap.html#streamDestroyed) and [Publisher](/en/stable/api/openvidu-browser/interfaces/PublisherEventMap.html#streamDestroyed) objects)
|
||||
*/
|
||||
export class StreamEvent extends Event {
|
||||
|
||||
|
|
Loading…
Reference in New Issue