Palette:signalingClient

From Derivative
Jump to navigation Jump to search

Summary
[edit]

The signalingClient COMP is a component that can be used to connect to a signalingServer COMP within TouchDesigner as well as exchange messages with other signalingClients through the signaling server it is connected with.

When a client is sending a signaling message to the server, a target should be specified as part of the Signaling API. More details about the Signaling API are available at Palette:signalingServer#SignalingAPI

The server is using the target property to route the message to a matching, connected, client.

The receiving client is then parsing the message and routing the message to a matching method using the signalingType property.

i.e. A signalingClient COMP is receiving a message where message['signalingType'] is equal to ClientEntered, the onMessageReceivedClientEntered() method will be called.

If no matching method is found, the signalingClient will fail gracefully.

While we advise to make use of Subscribers and the Subscribe() method to extend the signalingClient, users that want to extend the Signaling API with custom types should add new methods prefixed by onMessageReceived.

i.e If a user wants to add a custom type Animal, a matching method onMessageReceivedAnimal() should be available in the Palette:signalingClient Ext.

More details about Subscribers and the Subscribe() method are available on this page.

The communication protocol used as part of this signalingClient is WebSocket.

It is often used as part of WebRTC sessions.

PythonIcon.pngPalette:signalingClient Ext


Parameters - Signaling Client Page

Active Active - Start or stop the signaling client.

Reset Reset - Restart the signaling client and reset all states.

Host Host - The signaling server IP or URL to connect to. If the server is secured, it should use a secure protocol such as wss://.

Port Port - Port on which this client will connect to the signaling server. If attempting a secure connection not using port 443 then a "wss://" prefix is required on the Host parameter.

Forward To Subscribers Forwardtosubscribers - When enabled, any message received with a type that matches a type registered by a subscriber using the Subscribe() method will be forwarded to the registered subscriber.

Client Name Clientname - An optional parameter to be used to identify the client. Default is set when the client connected to a signaling server and a UUID was sent back.

Use JSON Schema In Usejsonschemain - Validate incoming Signaling API messages against JSON Schema.

Use JSON Schema Out Usejsonschemaout - Validate outgoing Signaling API messages against JSON Schema.

Use local RefResolver Uselocalrefresolver - Use JSON Schema files installed locally rather than validating from remote sources. Schema files available at https://github.com/TouchDesigner/SignalingAPI

Local Schema Folder Localschemafolder - A folder where the JSON Schema files for the Signaling API are available locally.

Clear schema cache Clearschemacache - Signaling API schema files are loaded once. Clearing the cache force them to reload on the next call that requires JSON Schema.

Signaling API Version Signalingapiversion - The Signaling API version. When a signaling client is being used, the API version of both the server and client should match.

Signaling API Schema Endpoint Signalingapischemaendpoint - The endpoint being used to fetch the JSON Schema files.


Parameters - Logger Page

Enable Logging Enablelogging - Enable advanced logging features. Useful to debug and track the signaling client activity.

Log to File Logtofile - When enabled, logging messages will be written to a time rotating log file.

Log Folder Logfolder - Path to the folder in which the log files will be written.

File Rotation Filerotation - Number of backup files to be kept when rotating log.

Log to Textport Logtotextport - When enabled, log messages will be displayed in the textport.

Log to Status Bar Logtostatusbar - When enabled, log messages will be displayed in the status bar.

Log Level Loglevel - - Filter level of log messages. The selected level is included as well as all levels above. i.e. if Warning is selected, Warning and Error messages will be included while Info messages will be excluded.

  • INFO INFO -
  • DEBUG DEBUG -
  • WARNING WARNING -
  • ERROR ERROR -
  • CRITICAL CRITICAL -


Parameters - About Page

Help Help - Open Help page in external browser.

Version Version - The component version number.

TouchDesigner Build:

Palette
Palette • Palette:arcBallCamera • Palette:arcBallGeometry • Palette:audioAnalysis • Palette:audioSet • Palette:battery • Palette:bitwigClip • Palette:bitwigClipSlot • Palette:bitwigDeviceRemotes • Palette:bitwigMain • Palette:bitwigNote • Palette:bitwigProjectRemotes • Palette:bitwigRemotesDevice • Palette:bitwigRemotesProject • Palette:bitwigRemotesTrack • Palette:bitwigSelect • Palette:bitwigSong • Palette:bitwigTrack • Palette:bitwigTrackRemotes • Palette:blendModes • Palette:bloom • Palette:camera • Palette:cameraBrowser • Palette:cameraViewport • Palette:camSchnappr • Palette:changeColor • Palette:changeToColor • Palette:checker • Palette:chromaKey • Palette:colorThreshold • Palette:compareComp • Palette:convolve • Palette:cornerPinSOP • Palette:cppParsTemplateGen • Palette:customAttributes • Palette:debugControl • Palette:dent • Palette:depthExtract • Palette:dilate • Palette:encoder • Palette:equalizer • Palette:feedback • Palette:feedbackEdge • Palette:firmata • Palette:gal • Palette:geoPanel • Palette:gestureCapture • Palette:graphPlot • Palette:histogram • Palette:hsvBlur • Palette:imageSearch • Palette:julia • Palette:kantanMapper • Palette:kinectCalibration • Palette:kinectPointcloud • Palette:leapPaint • Palette:lightTunnel • Palette:logger • Palette:mandelbrot • Palette:materialDesignIcons • Palette:mesh • Palette:monochrome • Palette:motionSense • Palette:movieEngine • Palette:moviePlayer • Palette:moviePlaylist • Palette:multiLevel • Palette:multiMix • Palette:noise • Palette:onScreenKeyboard • Palette:operatorPath • Palette:opticalFlow • Palette:pixelate • Palette:pixelRelocator • Palette:pointGenerator • Palette:pointillize • Palette:pointMerge • Palette:pointRender • Palette:pointRepack • Palette:pointTransform • Palette:pointWeight • Palette:popDialog • Palette:probe • Palette:projectorBlend • Palette:pushPins • Palette:puzzle • Palette:quadReproject • Palette:radialBlur • Palette:recorder • Palette:remotePanel • Palette:rgbaBlur • Palette:rgbaDelay • Palette:rgbContrast • Palette:sceneChanger • Palette:search • Palette:searchReplace • Palette:sharpen • Palette:sickEngine • Palette:signalingClient • Palette:signalingServer • Palette:softenAlpha • Palette:solarize • Palette:sopRender • Palette:splitter • Palette:stitcher • Palette:stoner • Palette:superFormula • Palette:SVG • Palette:sweetSpot • Palette:sweetSpotPreviz • Palette:synchroCache • Palette:synchroClient • Palette:synchroFrameIn • Palette:synchroFrameOut • Palette:synchroNDIIn • Palette:synchroSDIIn • Palette:synchroVideoOut • Palette:tdBitwigPackage • Palette:TDVR • Palette:transitMap • Palette:twirl • Palette:vectorScope • Palette:virtualFile • Palette:waveformMonitor • Palette:webBrowser • Palette:webRTC • Palette:webRTCPanel • Palette:webRTCPanelRcv • Palette:xyScope