Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DomLayoutManager

Hierarchy

  • LayoutManager<HTMLElement>
    • DomLayoutManager

Index

Constructors

Properties

Methods

Constructors

constructor

  • new DomLayoutManager(container: HTMLElement, preset?: LayoutPreset): DomLayoutManager

Properties

Private _container

_container: HTMLElement
internal

Private _innerContainer

_innerContainer: HTMLElement
internal

Private _lastHeight

_lastHeight: number
internal

Private _lastWidth

_lastWidth: number
internal

Private _parentMissing

_parentMissing: number
internal

Private _parentMissingMax

_parentMissingMax: number
internal

Private _remoteVideosTable

_remoteVideosTable: Hash<string, HTMLElement>
internal

Private _resizeInterval

_resizeInterval: number
internal

Methods

addOnLayout

  • addOnLayout(value: IAction1<Layout>): void
  • Adds a handler that is raised when a layout is calculated.

    Parameters

    • value: IAction1<Layout>

    Returns void

addRemoteMedia

  • addRemoteMedia(remoteMedia: IViewableMedia<HTMLElement>): boolean
  • Adds remote media to the layout.

    Parameters

    • remoteMedia: IViewableMedia<HTMLElement>

      The remote media.

    Returns boolean

    true if successful; otherwise, false.

addRemoteView

  • addRemoteView(id: string, view: HTMLElement): boolean
  • Adds a remote view to the layout.

    Parameters

    • id: string

      The remote view ID.

    • view: HTMLElement

      The remote view.

    Returns boolean

    true if successful; otherwise, false. Check the logs for additional information.

addRemoteViews

  • addRemoteViews(ids: string[], views: HTMLElement[]): boolean
  • Adds remote views to the layout.

    Parameters

    • ids: string[]

      The remote view IDs.

    • views: HTMLElement[]

      The remote views.

    Returns boolean

    true if successful; otherwise, false. Check the logs for additional information.

Protected addView

  • addView(view: HTMLElement): void
  • Parameters

    • view: HTMLElement

    Returns void

applyPreset

  • applyPreset(preset: LayoutPreset): void
  • Applies a preset.

    Parameters

    • preset: LayoutPreset

      The preset to apply.

    Returns void

calculateLayout

  • calculateLayout(layoutWidth: number, layoutHeight: number, remoteCount: number, origin: LayoutOrigin): Layout
  • Gets a video frame layout.

    Parameters

    • layoutWidth: number

      The total width of the layout.

    • layoutHeight: number

      The total height of the layout.

    • remoteCount: number

      The number of remote frames.

    • origin: LayoutOrigin

      The layout origin

    Returns Layout

    The video frame layout.

copyToPreset

  • copyToPreset(preset: LayoutPreset): void
  • Copies this preset's properties to another preset.

    Parameters

    • preset: LayoutPreset

      The target preset.

    Returns void

Protected dispatchToMainThread

  • dispatchToMainThread(action: IAction2<any, any>, arg1: any, arg2: any): void

getAlignment

  • getAlignment(): LayoutAlignment
  • Gets the alignment of the layout. Defaults to fm.icelink.layoutAlignment.BottomRight.

    Returns LayoutAlignment

getBlockHeight

  • getBlockHeight(): number
  • Gets the height of block elements in pixels. Overrides fm.icelink.layoutPreset.blockHeightPercent.

    Returns number

getBlockHeightPercent

  • getBlockHeightPercent(): number
  • Gets the height of block elements as a percent of the container height between 0.0 and 1.0. Overrides fm.icelink.layoutPreset.blockHeight.

    Returns number

getBlockMarginX

  • getBlockMarginX(): number
  • Gets the X-margin between block elements and the layout edge in pixels. Overrides fm.icelink.layoutPreset.blockMarginXPercent.

    Returns number

getBlockMarginXPercent

  • getBlockMarginXPercent(): number
  • Gets the X-margin between block elements and the layout edge as a percent of the container width between 0.0 and 1.0. Overrides fm.icelink.layoutPreset.blockMarginX.

    Returns number

getBlockMarginY

  • getBlockMarginY(): number
  • Gets the Y-margin between block elements and the layout edge in pixels. Overrides fm.icelink.layoutPreset.blockMarginYPercent.

    Returns number

getBlockMarginYPercent

  • getBlockMarginYPercent(): number
  • Gets the Y-margin between block elements and the layout edge as a percent of the container height between 0.0 and 1.0. Overrides fm.icelink.layoutPreset.blockMarginY.

    Returns number

getBlockWidth

  • getBlockWidth(): number
  • Gets the width of block elements in pixels. Overrides fm.icelink.layoutPreset.blockWidthPercent.

    Returns number

getBlockWidthPercent

  • getBlockWidthPercent(): number
  • Gets the width of block elements as a percent of the container width between 0.0 and 1.0. Overrides fm.icelink.layoutPreset.blockWidth.

    Returns number

getContainer

  • getContainer(): HTMLElement
  • Returns HTMLElement

getDirection

  • getDirection(): LayoutDirection
  • Gets the direction of the layout flow. Defaults to fm.icelink.layoutDirection.Horizontal.

    Returns LayoutDirection

getDynamicProperties

  • getDynamicProperties(): Hash<string, Object>
  • Gets the dynamic properties on this instance.

    Returns Hash<string, Object>

getDynamicValue

  • getDynamicValue(key: string): Object
  • Gets a property value from the local cache.

    Parameters

    • key: string

      The property key. This key is used internally only, but should be namespaced to avoid conflict with third-party extensions.

    Returns Object

    The stored value, if found; otherwise null.

getFloatHeight

  • getFloatHeight(): number
  • Gets the height of floating elements in pixels. Overrides fm.icelink.layoutPreset.floatHeightPercent.

    Returns number

getFloatHeightPercent

  • getFloatHeightPercent(): number
  • Gets the height of floating elements as a percent of the container height between 0.0 and 1.0. Overrides fm.icelink.layoutPreset.floatHeight.

    Returns number

getFloatMarginX

  • getFloatMarginX(): number
  • Gets the X-margin between floating elements and the layout edge in pixels. Overrides fm.icelink.layoutPreset.floatMarginXPercent.

    Returns number

getFloatMarginXPercent

  • getFloatMarginXPercent(): number
  • Gets the X-margin between floating elements and the layout edge as a percent of the container width between 0.0 and 1.0. Overrides fm.icelink.layoutPreset.floatMarginX.

    Returns number

getFloatMarginY

  • getFloatMarginY(): number
  • Gets the Y-margin between floating elements and the layout edge in pixels. Overrides fm.icelink.layoutPreset.floatMarginYPercent.

    Returns number

getFloatMarginYPercent

  • getFloatMarginYPercent(): number
  • Gets the Y-margin between floating elements and the layout edge as a percent of the container height between 0.0 and 1.0. Overrides fm.icelink.layoutPreset.floatMarginY.

    Returns number

getFloatWidth

  • getFloatWidth(): number
  • Gets the width of floating elements in pixels. Overrides fm.icelink.layoutPreset.floatWidthPercent.

    Returns number

getFloatWidthPercent

  • getFloatWidthPercent(): number
  • Gets the width of floating elements as a percent of the container width between 0.0 and 1.0. Overrides fm.icelink.layoutPreset.floatWidth.

    Returns number

getInlineMargin

  • getInlineMargin(): number
  • Gets the size of the margin in pixels to use between inline elements.

    Returns number

getIsDirty

  • getIsDirty(): boolean
  • Gets a value indicating whether this instance is dirty.
    internal

    Returns boolean

getIsSerialized

  • getIsSerialized(): boolean

Protected getLayout

  • getLayout(layoutWidth: number, layoutHeight: number, remoteCount: number): Layout
  • getLayout(layoutWidth: number, layoutHeight: number, remoteCount: number, remoteViewIds: string[]): Layout
  • Gets a video frame layout.

    Parameters

    • layoutWidth: number

      The total width of the layout.

    • layoutHeight: number

      The total height of the layout.

    • remoteCount: number

      The number of remote frames.

    Returns Layout

    The video frame layout.

  • Gets a video frame layout.

    Parameters

    • layoutWidth: number

      The total width of the layout.

    • layoutHeight: number

      The total height of the layout.

    • remoteCount: number

      The number of remote frames.

    • remoteViewIds: string[]

      The array of remote view ids.

    Returns Layout

    The video frame layout.

getLayoutOrigin

  • getLayoutOrigin(): LayoutOrigin
  • Gets the layout origin. Defaults to TopLeft.

    Returns LayoutOrigin

getLocalView

  • getLocalView(): HTMLElement
  • Gets the local view from the layout.

    Returns HTMLElement

    The local view.

getMode

  • getMode(): LayoutMode
  • Gets the mode used by the layout engine. Defaults to fm.icelink.layoutMode.FloatLocal.

    Returns LayoutMode

getRemoteView

  • getRemoteView(id: string): HTMLElement
  • Gets a remote view from the layout.

    Parameters

    • id: string

      The remote view ID.

    Returns HTMLElement

    The remote view.

getRemoteViewIds

  • getRemoteViewIds(): string[]
  • Gets the IDs of the remote views in the layout.

    Returns string[]

    The remote view IDs.

getRemoteViews

  • getRemoteViews(ids: string[]): Array<HTMLElement>
  • getRemoteViews(): Array<HTMLElement>
  • Gets remote views from the layout.

    Parameters

    • ids: string[]

      The remote view IDs.

    Returns Array<HTMLElement>

    The remote views.

  • Gets all remote views from the layout.

    Returns Array<HTMLElement>

    The remote views.

getSerialized

  • getSerialized(): string

getTypeString

  • getTypeString(): string

layout

  • layout(): void

layoutOnMainThread

  • layoutOnMainThread(): void
  • Positions the local and remote views within the layout after dispatching to the main thread.

    Returns void

removeOnLayout

  • removeOnLayout(value: IAction1<Layout>): void
  • Removes a handler that is raised when a layout is calculated.

    Parameters

    • value: IAction1<Layout>

    Returns void

removeRemoteMedia

  • removeRemoteMedia(remoteMedia: IViewableMedia<HTMLElement>): boolean
  • Removes remote media from the layout.

    Parameters

    • remoteMedia: IViewableMedia<HTMLElement>

      The remote media.

    Returns boolean

    true if successful; otherwise, false.

removeRemoteView

  • removeRemoteView(id: string): boolean
  • Removes a remote view from the layout.

    Parameters

    • id: string

      The remote view ID.

    Returns boolean

    true if successful; otherwise, false. Check the logs for additional information.

removeRemoteViews

  • removeRemoteViews(ids: string[]): boolean
  • removeRemoteViews(): void
  • Removes remote views from the layout.

    Parameters

    • ids: string[]

      The remote view IDs.

    Returns boolean

    true if successful; otherwise, false. Check the logs for additional information.

  • Removes all remote views from the layout.

    Returns void

Protected removeView

  • removeView(view: HTMLElement): void
  • Parameters

    • view: HTMLElement

    Returns void

reset

  • reset(): void
  • Removes all remote views from the layout, then removes the local view from the layout.

    Returns void

setAlignment

  • setAlignment(value: LayoutAlignment): void
  • Sets the alignment of the layout. Defaults to fm.icelink.layoutAlignment.BottomRight.

    Parameters

    • value: LayoutAlignment

    Returns void

setBlockHeight

  • setBlockHeight(value: number): void
  • Sets the height of block elements in pixels. Overrides fm.icelink.layoutPreset.blockHeightPercent.

    Parameters

    • value: number

    Returns void

setBlockHeightPercent

  • setBlockHeightPercent(value: number): void
  • Sets the height of block elements as a percent of the container height between 0.0 and 1.0. Overrides fm.icelink.layoutPreset.blockHeight.

    Parameters

    • value: number

    Returns void

setBlockMarginX

  • setBlockMarginX(value: number): void
  • Sets the X-margin between block elements and the layout edge in pixels. Overrides fm.icelink.layoutPreset.blockMarginXPercent.

    Parameters

    • value: number

    Returns void

setBlockMarginXPercent

  • setBlockMarginXPercent(value: number): void
  • Sets the X-margin between block elements and the layout edge as a percent of the container width between 0.0 and 1.0. Overrides fm.icelink.layoutPreset.blockMarginX.

    Parameters

    • value: number

    Returns void

setBlockMarginY

  • setBlockMarginY(value: number): void
  • Sets the Y-margin between block elements and the layout edge in pixels. Overrides fm.icelink.layoutPreset.blockMarginYPercent.

    Parameters

    • value: number

    Returns void

setBlockMarginYPercent

  • setBlockMarginYPercent(value: number): void
  • Sets the Y-margin between block elements and the layout edge as a percent of the container height between 0.0 and 1.0. Overrides fm.icelink.layoutPreset.blockMarginY.

    Parameters

    • value: number

    Returns void

setBlockWidth

  • setBlockWidth(value: number): void
  • Sets the width of block elements in pixels. Overrides fm.icelink.layoutPreset.blockWidthPercent.

    Parameters

    • value: number

    Returns void

setBlockWidthPercent

  • setBlockWidthPercent(value: number): void
  • Sets the width of block elements as a percent of the container width between 0.0 and 1.0. Overrides fm.icelink.layoutPreset.blockWidth.

    Parameters

    • value: number

    Returns void

setDirection

  • setDirection(value: LayoutDirection): void
  • Sets the direction of the layout flow. Defaults to fm.icelink.layoutDirection.Horizontal.

    Parameters

    • value: LayoutDirection

    Returns void

setDynamicProperties

  • setDynamicProperties(value: Hash<string, Object>): void
  • internal

    Parameters

    • value: Hash<string, Object>

    Returns void

setDynamicValue

  • setDynamicValue(key: string, value: Object): void
  • Sets a property value in the local cache.

    Parameters

    • key: string

      The property key. This key is used internally only, but should be namespaced to avoid conflict with third-party extensions.

    • value: Object

      The property value. This can be any object that needs to be stored for future use.

    Returns void

setFloatHeight

  • setFloatHeight(value: number): void
  • Sets the height of floating elements in pixels. Overrides fm.icelink.layoutPreset.floatHeightPercent.

    Parameters

    • value: number

    Returns void

setFloatHeightPercent

  • setFloatHeightPercent(value: number): void
  • Sets the height of floating elements as a percent of the container height between 0.0 and 1.0. Overrides fm.icelink.layoutPreset.floatHeight.

    Parameters

    • value: number

    Returns void

setFloatMarginX

  • setFloatMarginX(value: number): void
  • Sets the X-margin between floating elements and the layout edge in pixels. Overrides fm.icelink.layoutPreset.floatMarginXPercent.

    Parameters

    • value: number

    Returns void

setFloatMarginXPercent

  • setFloatMarginXPercent(value: number): void
  • Sets the X-margin between floating elements and the layout edge as a percent of the container width between 0.0 and 1.0. Overrides fm.icelink.layoutPreset.floatMarginX.

    Parameters

    • value: number

    Returns void

setFloatMarginY

  • setFloatMarginY(value: number): void
  • Sets the Y-margin between floating elements and the layout edge in pixels. Overrides fm.icelink.layoutPreset.floatMarginYPercent.

    Parameters

    • value: number

    Returns void

setFloatMarginYPercent

  • setFloatMarginYPercent(value: number): void
  • Sets the Y-margin between floating elements and the layout edge as a percent of the container height between 0.0 and 1.0. Overrides fm.icelink.layoutPreset.floatMarginY.

    Parameters

    • value: number

    Returns void

setFloatWidth

  • setFloatWidth(value: number): void
  • Sets the width of floating elements in pixels. Overrides fm.icelink.layoutPreset.floatWidthPercent.

    Parameters

    • value: number

    Returns void

setFloatWidthPercent

  • setFloatWidthPercent(value: number): void
  • Sets the width of floating elements as a percent of the container width between 0.0 and 1.0. Overrides fm.icelink.layoutPreset.floatWidth.

    Parameters

    • value: number

    Returns void

setInlineMargin

  • setInlineMargin(value: number): void
  • Sets the size of the margin in pixels to use between inline elements.

    Parameters

    • value: number

    Returns void

setIsDirty

  • setIsDirty(value: boolean): void
  • Sets a value indicating whether this instance is dirty.
    internal

    Parameters

    • value: boolean

    Returns void

setIsSerialized

  • setIsSerialized(value: boolean): void
  • internal

    Parameters

    • value: boolean

    Returns void

Protected setLayoutOrigin

  • setLayoutOrigin(value: LayoutOrigin): void
  • Sets the layout origin. Defaults to TopLeft.

    Parameters

    • value: LayoutOrigin

    Returns void

setLocalMedia

  • setLocalMedia(localMedia: IViewableMedia<HTMLElement>): boolean
  • Adds the local media to the layout.

    Parameters

    • localMedia: IViewableMedia<HTMLElement>

      The local media.

    Returns boolean

    true if successful; otherwise, false.

setLocalView

  • setLocalView(view: HTMLElement): boolean
  • Adds the local view to the layout.

    Parameters

    • view: HTMLElement

      The local view.

    Returns boolean

    true if successful; otherwise, false. Check the logs for additional information.

setMode

  • setMode(value: LayoutMode): void
  • Sets the mode used by the layout engine. Defaults to fm.icelink.layoutMode.FloatLocal.

    Parameters

    • value: LayoutMode

    Returns void

setSerialized

  • setSerialized(value: string): void
  • internal

    Parameters

    • value: string

    Returns void

swapRemoteMedia

  • swapRemoteMedia(remoteMediaToRemove: IViewableMedia<HTMLElement>, remoteMediaToAdd: IViewableMedia<HTMLElement>): boolean
  • Swaps remote media in the layout.

    Parameters

    • remoteMediaToRemove: IViewableMedia<HTMLElement>

      The remote media to remove.

    • remoteMediaToAdd: IViewableMedia<HTMLElement>

      The remote media to add.

    Returns boolean

swapRemoteView

  • swapRemoteView(idToRemove: string, idToAdd: string, viewToAdd: HTMLElement): boolean
  • Swaps a remote view in the layout.

    Parameters

    • idToRemove: string

      The remote view ID to remove.

    • idToAdd: string

      The remote view ID to add.

    • viewToAdd: HTMLElement

      The remote view to add.

    Returns boolean

swapRemoteViews

  • swapRemoteViews(idsToRemove: string[], idsToAdd: string[], viewsToAdd: HTMLElement[]): boolean
  • Swaps remote views in the layout.

    Parameters

    • idsToRemove: string[]

      The remote view IDs to remove.

    • idsToAdd: string[]

      The remote view IDs to add.

    • viewsToAdd: HTMLElement[]

      The remote views to add.

    Returns boolean

    true if successful; otherwise, false. Check the logs for additional information.

unsetDynamicValue

  • unsetDynamicValue(key: string): boolean
  • Unsets a property value in the local cache.

    Parameters

    • key: string

      The property key. This key is used internally only, but should be namespaced to avoid conflict with third-party extensions.

    Returns boolean

    true if the value was removed; otherwise, false.

unsetLocalView

  • unsetLocalView(): boolean
  • Removes the local view from the layout.

    Returns boolean

    true if successful; otherwise, false. Check the logs for additional information.

Static getFacetime

  • getFacetime(): LayoutPreset
  • Gets a Facetime-style layout preset.

    Returns LayoutPreset

Static getGoogleHangouts

  • getGoogleHangouts(): LayoutPreset
  • Gets a Google Hangouts-style layout preset. Note that this will present differently on mobile devices.

    Returns LayoutPreset

Static getSkype

  • getSkype(): LayoutPreset
  • Gets a Skype-style layout preset. Note that this will present differently on mobile devices.

    Returns LayoutPreset

Static transformFrame

  • transformFrame(frame: LayoutFrame, origin: LayoutOrigin, layoutWidth: number, layoutHeight: number): void
  • internal

    Parameters

    • frame: LayoutFrame
    • origin: LayoutOrigin
    • layoutWidth: number
    • layoutHeight: number

    Returns void