Namespace: Photon

Photon

Photon

Classes

Logger
Prints messages to browser console. Each logging method perfoms toString() calls and default formatting of arguments only after it checks logging level. Therefore disabled level logging method call with plain arguments doesn't involves much overhead. But if one prefer custom formatting or some calculation for logging methods arguments he should check logging level before doing this to avoid unnecessary operations: if(logger.isLevelEnabled(LogLevel.DEBUG)) { logger.debug("", someCall(x, y), x + "," + y); }
PhotonPeer

Namespaces

Chat
LoadBalancing
Voice

Members

(static, readonly) ConnectionProtocol

These are the options that can be used as underlying transport protocol.

Properties:
Name Type Description
Ws number WebSockets connection.
Wss number WebSockets Secure connection.

(static) IsEmscriptenBuild

True if Photon library is built with Emscripten.

(static, readonly) LogLevel :number

Log levels.

Type:
  • number
Properties:
Name Type Description
OFF number Logging off.
ERROR number
WARN number
INFO number
DEBUG number All logging is enabled.

(static) Version

Photon library version.

Methods

setOnLoad(onLoad)

Sets the callback to be called on Photon Voice library load finish.

Parameters:
Name Type Description
onLoad Photon.OnLoadCallback Callback.

Type Definitions

OnLoadCallback()

Photon

Photon

Classes

Logger
Prints messages to browser console. Each logging method perfoms toString() calls and default formatting of arguments only after it checks logging level. Therefore disabled level logging method call with plain arguments doesn't involves much overhead. But if one prefer custom formatting or some calculation for logging methods arguments he should check logging level before doing this to avoid unnecessary operations: if(logger.isLevelEnabled(LogLevel.DEBUG)) { logger.debug("", someCall(x, y), x + "," + y); }
PhotonPeer

Namespaces

Chat
LoadBalancing
Voice

Members

(static, readonly) ConnectionProtocol

These are the options that can be used as underlying transport protocol.

Properties:
Name Type Description
Ws number WebSockets connection.
Wss number WebSockets Secure connection.

(static) IsEmscriptenBuild

True if Photon library is built with Emscripten.

(static, readonly) LogLevel :number

Log levels.

Type:
  • number
Properties:
Name Type Description
OFF number Logging off.
ERROR number
WARN number
INFO number
DEBUG number All logging is enabled.

(static) Version

Photon library version.

Methods

setOnLoad(onLoad)

Sets the callback to be called on Photon Voice library load finish.

Parameters:
Name Type Description
onLoad Photon.OnLoadCallback Callback.

Type Definitions

OnLoadCallback()