import { Logger } from '../../../common/utils'; import { BaseComponent } from '../../base'; import { ComponentNames } from '../../types'; import { PresenceMouseProps, Transform } from '../types'; export declare class PointersHTML extends BaseComponent { name: ComponentNames; protected logger: Logger; private presences; private localParticipant; private container; private wrapper; private mouses; private userBeingFollowedId; private animationFrame; private isPrivate; private containerTagname; private transformation; private camera; private pointerMoveObserver; private goToPresenceCallback; /** * @function constructor * @param {string} containerId The id of the container element, inside of which may be rendered * @param {object} options The options object, used to customize the behavior of the component * @param {string} options.onGoToPresence The callback function to be called when the user, through presence controls like that of the Who Is Online component, is set to go to a participant's position */ constructor(containerId: string, options?: PresenceMouseProps); /** * @function start * @description start presence-mouse component * @returns {void} */ protected start(): void; /** * @function destroy * @description destroy presence-mouse component * @returns {void} */ protected destroy(): void; /** * @function subscribeToRealtimeEvents * @description subscribe to realtime events * @returns {void} */ private subscribeToRealtimeEvents; /** * @function unsubscribeFromRealtimeEvents * @description subscribe to realtime events * @returns {void} */ private unsubscribeFromRealtimeEvents; /** * @function addListeners * @description adds the mousemove and mouseout listeners to the wrapper with the specified id * @returns {void} */ private addListeners; /** * @function removeListeners * @description removes the mousemove and mouseout listeners from the container * @returns {void} */ private removeListeners; /** * @function onMyParticipantMouseMove * @description event to update my participant mouse position to others participants * @returns {void} */ private onMyParticipantMouseMove; /** * @function onMyParticipantMouseLeave * @returns {void} */ private onMyParticipantMouseLeave; /** * @function goToMouse * @description scrolls the screen to the mouse pointer or calls the user callback to do so * @param id - the id of the mouse pointer * @returns */ private goToMouse; /** * @function followMouse * @description handler for follow mouse event * @param id */ private followMouse; /** * @function setParticipantPrivate * @description perform animation in presence mouse * @returns {void} */ private setParticipantPrivate; /** * @function onPresenceJoinedRoom * @description handler for presence joined room event * @param {PresenceEvent} presence * @returns {void} */ private onPresenceJoinedRoom; /** * @function onPresenceLeftRoom * @description handler for presence left room event * @param {PresenceEvent} presence * @returns {void} */ private onPresenceLeftRoom; /** * @function onPresenceUpdate * @description handler for presence update event * @param {PresenceEvent} presence * @returns {void} */ private onPresenceUpdate; /** * @function setPositionNotStatic * @description sets the position of the element to relative if it is static * @param {HTMLElement} element the element to be checked * @returns {void} */ private setPositionNotStatic; /** * @function createMouseElement * @description create mouse element * @param mouse - participant mouse * @returns {HTMLDivElement} */ private createMouseElement; /** * @function updateSVGPosition * @description - Updates the position of the wrapper of a element * @param {SVGElement} element - The svg element * @returns {void} */ private updateSVGPosition; /** * @function createSVGWrapper * @description - Creates a wrapper for an svg element * @param {SVGElement} svg - The svg element * @param {string} id - The data attribute value of the svg element */ private createSVGWrapper; /** * @function createRectWrapper * @description - Creates a wrapper for a rect element * @param {SVGElement} rect - The rect element * @param {string} id - The data attribute value of the rect element */ private createRectWrapper; /** * @function createEllipseWrapper * @description - Creates a wrapper for an ellipse element * @returns {void} */ private createEllipseWrapper; /** * @function transform * @description stores that information about which transformations should the pointers go through * @param {Transform} transformation Which transformations to apply */ transform(transformation: Transform): void; /** * @function animate * @description perform animation in presence mouse * @returns {void} */ private animate; private updateParticipantsMouses; /** * @function updateVoidElementWrapper * @description - Updates the position of each wrapper for void elements * @returns {void} */ private updateVoidElementWrapper; /** * @function updateSVGElementWrapper * @description - Updates the position of each wrapper for void elements * @returns {void} */ private updateSVGElementWrapper; /** * @function renderWrapper * @description prepares, creates and renders a wrapper for the specified element * @returns {void} */ private renderWrapper; /** * @function removePresenceMouseParticipant * @description handler remove external participant mouse * @param {string} participantId - external participant id * @returns {void} * */ private removePresenceMouseParticipant; /** * @function renderPresenceMouses * @description add presence mouses to screen * @param {ParticipantMouse} mouse - presence mouse change data * @returns {void} * */ private renderPresenceMouses; /** * @function renderElementWrapper * @description - Creates wrapper for regular, non-void and non-svg related elements * @param {HTMLElement} element - The element to be wrapped * @param {string} id - The id of the element * @returns {void} */ private renderElementWrapper; /** * @function renderVoidElementWrapper * @description - Creates wrapper for void elements * @param {HTMLElement} element - The element to be wrapped * @param {string} id - The id of the element * @returns {void} */ private renderVoidElementWrapper; /** * @function renderSVGElementWrapper * @description - Handles the creation of wrappers for svg elements * @param {SVGElement} element - The svg element (be it an ellipse or a rect) * @param {string} id - The data attribute value of the svg element * @returns {void} */ private renderSVGElementWrapper; }