Layout

Defines the object passed in as the $layout parameter of the OpenTok->setArchiveLayout() and OpenTok->updateBroadcastLayout() methods.

To instantiate a Layout object, call one of the static methods of the Layout class: getBestFit(), getPIP(), getVerticalPresentation(), getHorizontalPresentation(), or createCustom().

See OpenTok->setArchiveLayout(), OpenTok->updateBroadcastLayout(), Customizing the video layout for composed archives, and Configuring video layout for OpenTok live streaming broadcasts.

Interfaces, Classes, Traits and Enums

JsonSerializable

Table of Contents

LAYOUT_BESTFIT  = 'bestFit'

LAYOUT_CUSTOM  = 'custom'

LAYOUT_HORIZONTAL  = 'horizontalPresentation'

LAYOUT_PIP  = 'pip'

LAYOUT_VERTICAL  = 'verticalPresentation'

createCustom()  : Layout : Returns a Layout object defining a custom layout type.

getBestFit()  : Layout : Returns a Layout object defining the "best fit" predefined layout type.

getHorizontalPresentation()  : Layout : Returns a Layout object defining the "horizontal presentation" predefined layout type.

getPIP()  : Layout : Returns a Layout object defining the "picture-in-picture" predefined layout type.

getVerticalPresentation()  : Layout : Returns a Layout object defining the "vertical presentation" predefined layout type.

jsonSerialize()  : mixed

setScreenshareType()  : Layout

toArray()  : array<string|int, mixed>

toJson()  : string : Return a json-encoded string representation of the layout

Constants

LAYOUT_BESTFIT

public mixed LAYOUT_BESTFIT = 'bestFit'

LAYOUT_CUSTOM

public mixed LAYOUT_CUSTOM = 'custom'

LAYOUT_HORIZONTAL

public mixed LAYOUT_HORIZONTAL = 'horizontalPresentation'

LAYOUT_PIP

public mixed LAYOUT_PIP = 'pip'

LAYOUT_VERTICAL

public mixed LAYOUT_VERTICAL = 'verticalPresentation'

Methods

createCustom()

Returns a Layout object defining a custom layout type.

public static createCustom(array<string|int, mixed> $options) : Layout

Parameters

$options : array&lt;string|int, mixed&gt; : An array containing one property: $stylesheet, which is a string containing the stylesheet to be used for the layout.

Return values

Layout

getBestFit()

Returns a Layout object defining the "best fit" predefined layout type.

public static getBestFit() : Layout

Return values

Layout

getHorizontalPresentation()

Returns a Layout object defining the "horizontal presentation" predefined layout type.

public static getHorizontalPresentation() : Layout

Return values

Layout

getPIP()

Returns a Layout object defining the "picture-in-picture" predefined layout type.

public static getPIP() : Layout

Return values

Layout

getVerticalPresentation()

Returns a Layout object defining the "vertical presentation" predefined layout type.

public static getVerticalPresentation() : Layout

Return values

Layout

jsonSerialize()

public jsonSerialize() : mixed

Return values

mixed —

setScreenshareType()

public setScreenshareType(string $screenshareType) : Layout

Parameters

$screenshareType : string

Return values

Layout

toArray()

public toArray() : array<string|int, mixed>

Return values

array&lt;string|int, mixed&gt; —

toJson()

Return a json-encoded string representation of the layout

public toJson() : string

Return values

string —